@done-coding/admin-core 0.4.0 → 0.5.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/bridge/index.mjs +30 -42
- package/es/components/app-layout/AppHeader.vue.mjs +2 -2
- package/es/components/app-layout/AppHeader.vue2.mjs +16 -19
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +63 -52
- package/es/components/data-view/utils.mjs +36 -0
- package/es/components/display/TabsMain.vue.mjs +1 -1
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +44 -44
- package/es/components/misc/ActionConfirm.vue2.mjs +16 -16
- package/es/components/modal/ConfirmModal.vue.mjs +3 -3
- package/es/components/modal/DetailModal.vue.mjs +10 -10
- package/es/components/table/TableMain.vue.mjs +3 -3
- package/es/components/table/TableMain.vue2.mjs +167 -177
- package/es/components/table/TableToolbar.vue.mjs +3 -3
- package/es/components/table/TableToolbar.vue2.mjs +8 -4
- package/es/index.mjs +150 -180
- package/es/style.css +1 -1
- package/package.json +6 -5
- package/types/bridge/index.d.ts +3 -6
- package/types/bridge/route.d.ts +0 -1
- package/types/components/app-layout/AppBody.vue.d.ts +14 -34
- package/types/components/app-layout/AppBreadcrumb.vue.d.ts +6 -19
- package/types/components/app-layout/AppFooter.vue.d.ts +1 -1
- package/types/components/app-layout/AppHeader.vue.d.ts +15 -39
- package/types/components/app-layout/AppLayout.vue.d.ts +17 -50
- package/types/components/app-layout/AppPage.vue.d.ts +14 -39
- package/types/components/app-layout/AppSidebar.vue.d.ts +15 -37
- package/types/components/app-layout/index.d.ts +1 -19
- package/types/components/app-layout/types.d.ts +0 -1
- package/types/components/data-view/DataListView.vue.d.ts +9 -9
- package/types/components/data-view/DataListViewItem.vue.d.ts +19 -17
- package/types/components/data-view/index.d.ts +0 -1
- package/types/components/data-view/types.d.ts +9 -18
- package/types/components/data-view/utils.d.ts +5 -0
- package/types/components/display/ActionBtnGroup.vue.d.ts +8 -6
- package/types/components/display/HeightProvider.vue.d.ts +15 -31
- package/types/components/display/TabsHeader.vue.d.ts +27 -34
- package/types/components/display/TabsMain.vue.d.ts +14 -75
- package/types/components/display/TabsNaturalFlow.vue.d.ts +11 -5
- package/types/components/display/TabsRefineFlow.vue.d.ts +13 -31
- package/types/components/display/WatchSize.vue.d.ts +20 -32
- package/types/components/display/index.d.ts +0 -3
- package/types/components/display/types.d.ts +1 -2
- package/types/components/form/FormItem.vue.d.ts +208 -33
- package/types/components/form/FormMain.vue.d.ts +6 -7
- package/types/components/form/FormRadioGroup.vue.d.ts +14 -31
- package/types/components/form/FormSearch.vue.d.ts +5 -6
- package/types/components/form/FormSelect.vue.d.ts +19 -40
- package/types/components/form/FormTree.vue.d.ts +2037 -32
- package/types/components/form/FormVerifyCode.vue.d.ts +6 -6
- package/types/components/form/FormVerifyImage.vue.d.ts +6 -6
- package/types/components/form/form-search-utils.d.ts +0 -1
- package/types/components/form/index.d.ts +0 -3
- package/types/components/form/types.d.ts +2 -3
- package/types/components/form/utils.d.ts +0 -1
- package/types/components/list-page/ListPage.vue.d.ts +32 -33
- package/types/components/list-page/index.d.ts +0 -3
- package/types/components/list-page/types.d.ts +0 -1
- package/types/components/menu/MenuItemSub.vue.d.ts +3 -15
- package/types/components/menu/MenuTree.vue.d.ts +117 -19
- package/types/components/menu/index.d.ts +0 -3
- package/types/components/misc/ActionBtn.vue.d.ts +10 -11
- package/types/components/misc/ActionConfirm.vue.d.ts +21 -60
- package/types/components/misc/AutoRefresh.vue.d.ts +18 -24
- package/types/components/misc/TriggerAutoImport.vue.d.ts +8 -2
- package/types/components/misc/index.d.ts +4 -14
- package/types/components/misc/types.d.ts +0 -1
- package/types/components/modal/DetailModal.vue.d.ts +5 -6
- package/types/components/modal/ModalPorter.vue.d.ts +13 -18
- package/types/components/modal/ModalShelf.vue.d.ts +13 -18
- package/types/components/modal/index.d.ts +0 -4
- package/types/components/modal/modal-shelf-core.d.ts +0 -1
- package/types/components/modal/modal-shelf-hierarchy.d.ts +0 -1
- package/types/components/modal/modal-shelf-types.d.ts +0 -1
- package/types/components/modal/types.d.ts +0 -1
- package/types/components/panel/PanelEditSwitch.vue.d.ts +17 -20
- package/types/components/panel/PanelItem.vue.d.ts +7 -16
- package/types/components/panel/PanelMain.vue.d.ts +5 -6
- package/types/components/panel/index.d.ts +0 -4
- package/types/components/panel/types.d.ts +0 -1
- package/types/components/table/TableMain.vue.d.ts +12 -12
- package/types/components/table/TableToolbar.vue.d.ts +17 -108
- package/types/components/table/ToolbarButtons.vue.d.ts +15 -17
- package/types/components/table/index.d.ts +0 -3
- package/types/components/table/types.d.ts +59 -19
- package/types/config/list-model.d.ts +2 -1
- package/types/helpers/form.d.ts +0 -1
- package/types/helpers/index.d.ts +0 -10
- package/types/helpers/list-helper.d.ts +0 -1
- package/types/hooks/menus-dispatch.d.ts +0 -1
- package/types/hooks/use-channel-viewport-height.d.ts +0 -1
- package/types/index.d.ts +0 -13
- package/types/inject/key.d.ts +0 -1
- package/types/router/guard/index.d.ts +0 -1
- package/types/router/guard/login.d.ts +0 -1
- package/types/router/guard/permission.d.ts +0 -1
- package/types/router/guard/types.d.ts +0 -1
- package/types/store/app.d.ts +1 -2
- package/types/store/router-permission.d.ts +0 -1
- package/types/store/user.d.ts +0 -1
- package/types/types/route.d.ts +0 -1
- package/types/utils/export.d.ts +11 -10
- package/types/utils/router.d.ts +0 -1
- package/es/components/app-layout/index.mjs +0 -32
- package/es/components/display/index.mjs +0 -18
- package/es/components/form/index.mjs +0 -32
- package/es/components/list-page/index.mjs +0 -14
- package/es/components/menu/index.mjs +0 -12
- package/es/components/misc/ActionButton.vue.mjs +0 -52
- package/es/components/misc/ActionButton.vue2.mjs +0 -4
- package/es/components/misc/ActionButtonDanger.vue.mjs +0 -32
- package/es/components/misc/ActionButtonDanger.vue2.mjs +0 -4
- package/es/components/misc/ActionButtonWarn.vue.mjs +0 -32
- package/es/components/misc/ActionButtonWarn.vue2.mjs +0 -4
- package/es/components/misc/index.mjs +0 -32
- package/es/components/modal/index.mjs +0 -23
- package/es/components/panel/index.mjs +0 -20
- package/es/components/table/index.mjs +0 -14
- package/types/components/misc/ActionButton.vue.d.ts +0 -24
- package/types/components/misc/ActionButtonDanger.vue.d.ts +0 -19
- package/types/components/misc/ActionButtonWarn.vue.d.ts +0 -19
- package/types/components/modal/ConfirmModal.vue.d.ts +0 -124
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElTableColumn as me, ElEmpty as de, ElPagination as he } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/pagination/style/css";
|
|
4
|
-
import "element-plus/es/components/table/style/css";
|
|
5
4
|
import "element-plus/es/components/empty/style/css";
|
|
6
5
|
import "element-plus/es/components/table-column/style/css";
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
6
|
+
import { defineComponent as ve, useCssVars as ye, useModel as Ce, useAttrs as Se, ref as f, computed as p, markRaw as J, shallowRef as be, onMounted as we, onActivated as xe, watch as m, openBlock as s, createElementBlock as S, createBlock as d, unref as n, withCtx as h, createVNode as q, mergeProps as g, createCommentVNode as Ee, resolveDynamicComponent as I, Fragment as P, renderList as Pe, createSlots as Re, renderSlot as _, createTextVNode as k, toDisplayString as Y, normalizeProps as Te, guardReactiveProps as ze, withDirectives as Ie, createElementVNode as _e, isRef as D, vShow as ke, mergeModels as F } from "vue";
|
|
7
|
+
import G from "lodash/cloneDeep";
|
|
8
|
+
import U from "lodash/omit";
|
|
9
|
+
import Z from "lodash/set";
|
|
10
|
+
import Q from "lodash/get";
|
|
11
|
+
import He from "./TableToolbar.vue.mjs";
|
|
12
|
+
import Ae from "../display/WatchSize.vue.mjs";
|
|
13
|
+
import Ve from "../data-view/DataListView.vue.mjs";
|
|
14
|
+
import { ElTable as Ne } from "element-plus";
|
|
15
|
+
import { pickExportColumns as Le } from "../../utils/export.mjs";
|
|
16
16
|
import { useChannelViewportHeight as Me } from "../../hooks/use-channel-viewport-height.mjs";
|
|
17
|
-
import { APP_API_LIST_MODEL_KEY_CONFIG as
|
|
18
|
-
const Oe = { class: "table-main" },
|
|
17
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as R } from "../../config/list-model.mjs";
|
|
18
|
+
const Oe = { class: "table-main" }, Ke = { class: "table-main-pagination" }, ot = /* @__PURE__ */ ve({
|
|
19
19
|
__name: "TableMain",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ F({
|
|
21
21
|
showPager: { type: Boolean, default: !0 },
|
|
22
22
|
customView: { type: Boolean, default: !1 },
|
|
23
23
|
showToolbar: { type: Boolean, default: !0 },
|
|
@@ -42,216 +42,206 @@ const Oe = { class: "table-main" }, Be = { class: "table-main-pagination" }, nt
|
|
|
42
42
|
isAutoRefresh: { type: Boolean },
|
|
43
43
|
isAutoRefreshModifiers: {}
|
|
44
44
|
}),
|
|
45
|
-
emits: /* @__PURE__ */
|
|
46
|
-
setup(
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
emits: /* @__PURE__ */ F(["pageChange", "pageSizeChange", "dataChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh"]),
|
|
46
|
+
setup(u, { expose: W, emit: X }) {
|
|
47
|
+
ye((e) => ({
|
|
48
|
+
v9176f014: e.headerColor
|
|
49
49
|
}));
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
const a = u, v = X, H = Ce(u, "isAutoRefresh"), ee = Se(), b = f([]), w = f(0), i = f(0), l = f(1), y = f(!1), T = f(!1), A = f([]), te = p(
|
|
51
|
+
() => ({
|
|
52
|
+
columns: Le(a.columns),
|
|
53
|
+
selectedList: A.value,
|
|
54
|
+
currentPageList: b.value,
|
|
55
|
+
api: a.api,
|
|
56
|
+
query: a.query,
|
|
57
|
+
total: w.value,
|
|
58
|
+
hasSelection: a.columns.some((e) => e.type === "selection")
|
|
59
|
+
})
|
|
60
|
+
), V = f(0), ae = (e) => {
|
|
61
|
+
V.value = e;
|
|
62
|
+
}, oe = p(
|
|
63
|
+
() => a.customView ? J(Ve) : J(Ne)
|
|
64
|
+
), z = be(), re = p(
|
|
65
|
+
() => a.columns.some((e) => e.type === "selection")
|
|
66
|
+
), { viewportHeightFinal: ne } = Me(a, {
|
|
66
67
|
fallback: 500
|
|
67
|
-
}),
|
|
68
|
-
() =>
|
|
69
|
-
),
|
|
70
|
-
const { maxHeight: e, refine: t, dataViewMaxHeightMinValue:
|
|
68
|
+
}), N = p(() => a.showPager ? 35 : 0), L = p(
|
|
69
|
+
() => a.showToolbar ? V.value : 0
|
|
70
|
+
), le = p(() => {
|
|
71
|
+
const { maxHeight: e, refine: t, dataViewMaxHeightMinValue: r } = a;
|
|
71
72
|
return e ? Math.max(
|
|
72
|
-
e -
|
|
73
|
-
|
|
73
|
+
e - N.value - L.value,
|
|
74
|
+
r
|
|
74
75
|
) : t ? Math.max(
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
ne.value - N.value - L.value - a.refineReduceHeight,
|
|
77
|
+
r
|
|
77
78
|
) : void 0;
|
|
78
|
-
}), x =
|
|
79
|
-
const e =
|
|
80
|
-
return
|
|
79
|
+
}), x = p(() => {
|
|
80
|
+
const e = G(a.query || {});
|
|
81
|
+
return Z(e, R.PAGE_SIZE_KEY, i.value), Z(
|
|
81
82
|
e,
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
R.CURRENT_PAGE_KEY,
|
|
84
|
+
l.value
|
|
84
85
|
), e;
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
}), se = p(() => ({
|
|
87
|
+
...a.tableProps,
|
|
88
|
+
...ee,
|
|
89
|
+
// customView 下,需要手动处理 selectable
|
|
90
|
+
...a.customView ? {
|
|
91
|
+
selectable: re.value,
|
|
92
|
+
columns: a.columns
|
|
93
|
+
} : {}
|
|
94
|
+
})), ie = (e) => {
|
|
95
|
+
var r;
|
|
96
|
+
const t = (r = a.tableProps) == null ? void 0 : r.onSelectionChange;
|
|
97
|
+
A.value = e, t == null || t(e);
|
|
98
|
+
}, M = (e, t = !0) => {
|
|
99
|
+
const r = JSON.stringify(e) === JSON.stringify(x.value);
|
|
100
|
+
return !r && t && console.warn(
|
|
99
101
|
`同一地方 并发请求 参数冰花 当前不是最新的参数 丢弃结果 ${JSON.stringify(
|
|
100
102
|
e
|
|
101
103
|
)} => ${JSON.stringify(x.value)}`
|
|
102
|
-
),
|
|
103
|
-
},
|
|
104
|
-
var
|
|
105
|
-
if (!
|
|
106
|
-
|
|
107
|
-
const t =
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
), w.value =
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
), r;
|
|
105
|
+
}, O = (e = !1) => {
|
|
106
|
+
var r;
|
|
107
|
+
if (!i.value) return;
|
|
108
|
+
y.value ? console.warn("请求并发") : y.value = !0, e || (T.value = !0), (r = z.value) == null || r.clearSelection();
|
|
109
|
+
const t = G(x.value);
|
|
110
|
+
return a.api(t).then((E) => {
|
|
111
|
+
M(t, !1) && (b.value = Q(
|
|
112
|
+
E,
|
|
113
|
+
R.LIST_KEY
|
|
114
|
+
), w.value = Q(
|
|
115
|
+
E,
|
|
116
|
+
R.TOTAL_KEY
|
|
115
117
|
), v("pageInfoChange", {
|
|
116
|
-
pageSize:
|
|
117
|
-
currentPage:
|
|
118
|
+
pageSize: i.value,
|
|
119
|
+
currentPage: l.value,
|
|
118
120
|
total: w.value
|
|
119
121
|
}));
|
|
120
122
|
}).finally(() => {
|
|
121
|
-
|
|
123
|
+
M(t) && (y.value = !1, T.value = !1);
|
|
122
124
|
});
|
|
123
|
-
},
|
|
125
|
+
}, K = async (e = !1) => {
|
|
124
126
|
var t;
|
|
125
|
-
return (t =
|
|
127
|
+
return (t = O(e)) == null ? void 0 : t.catch(() => {
|
|
126
128
|
});
|
|
127
|
-
},
|
|
128
|
-
if (
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
refresh:
|
|
133
|
-
reload:
|
|
134
|
-
getTableInstance: () =>
|
|
135
|
-
},
|
|
136
|
-
...
|
|
137
|
-
injectInfo:
|
|
138
|
-
exposeInfo:
|
|
139
|
-
}),
|
|
140
|
-
...
|
|
141
|
-
injectInfo:
|
|
142
|
-
exposeInfo:
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
|
|
129
|
+
}, ue = async (e = !1) => {
|
|
130
|
+
if (l.value === 1)
|
|
131
|
+
return K(e);
|
|
132
|
+
l.value = 1;
|
|
133
|
+
}, fe = (e) => e, C = {
|
|
134
|
+
refresh: K,
|
|
135
|
+
reload: ue,
|
|
136
|
+
getTableInstance: () => z.value
|
|
137
|
+
}, B = (e, t = []) => ({
|
|
138
|
+
...U(e, ["render", "headerRender"].concat(t)),
|
|
139
|
+
injectInfo: a.injectInfo || {},
|
|
140
|
+
exposeInfo: C
|
|
141
|
+
}), $ = (e) => ({
|
|
142
|
+
...U(e, ["render", "headerRender"]),
|
|
143
|
+
injectInfo: a.injectInfo || {},
|
|
144
|
+
exposeInfo: C
|
|
145
|
+
}), pe = (e) => e;
|
|
146
|
+
W(C);
|
|
147
|
+
const ce = (e) => {
|
|
148
|
+
i.value = e, l.value = 1;
|
|
149
|
+
}, j = (e) => !e || e === "expand";
|
|
150
|
+
return we(() => {
|
|
151
|
+
i.value = a.pageSizeInit, xe(() => {
|
|
152
|
+
C.refresh();
|
|
151
153
|
});
|
|
152
|
-
}), m(
|
|
154
|
+
}), m(b, (e) => {
|
|
153
155
|
v("dataChange", e);
|
|
154
156
|
}), m(
|
|
155
|
-
() =>
|
|
157
|
+
() => a.query,
|
|
156
158
|
(e, t) => {
|
|
157
|
-
JSON.stringify(e) !== JSON.stringify(t) && (
|
|
159
|
+
JSON.stringify(e) !== JSON.stringify(t) && (l.value = 1);
|
|
158
160
|
}
|
|
159
161
|
), m(
|
|
160
162
|
x,
|
|
161
163
|
(e, t) => {
|
|
162
|
-
JSON.stringify(e) !== JSON.stringify(t) &&
|
|
164
|
+
JSON.stringify(e) !== JSON.stringify(t) && O();
|
|
163
165
|
},
|
|
164
166
|
{
|
|
165
167
|
immediate: !0
|
|
166
168
|
}
|
|
167
169
|
), m(T, (e) => {
|
|
168
170
|
v("loadingChange", e);
|
|
169
|
-
}), m(
|
|
171
|
+
}), m(i, (e) => {
|
|
170
172
|
v("pageSizeChange", e);
|
|
171
|
-
}), m(
|
|
173
|
+
}), m(l, (e) => {
|
|
172
174
|
v("pageChange", e);
|
|
173
175
|
}), (e, t) => {
|
|
174
|
-
const
|
|
175
|
-
return
|
|
176
|
-
|
|
176
|
+
const r = me, E = de, ge = he;
|
|
177
|
+
return s(), S("div", Oe, [
|
|
178
|
+
u.showToolbar ? (s(), d(n(Ae), {
|
|
177
179
|
key: 0,
|
|
178
|
-
onHeightChange:
|
|
180
|
+
onHeightChange: ae
|
|
179
181
|
}, {
|
|
180
182
|
default: h(() => [
|
|
181
|
-
|
|
182
|
-
"is-auto-refresh":
|
|
183
|
-
"onUpdate:isAutoRefresh": t[0] || (t[0] = (
|
|
184
|
-
tableExpose:
|
|
185
|
-
loading:
|
|
186
|
-
exportContext:
|
|
187
|
-
currentPage:
|
|
188
|
-
pageSize:
|
|
189
|
-
},
|
|
183
|
+
q(He, g({
|
|
184
|
+
"is-auto-refresh": H.value,
|
|
185
|
+
"onUpdate:isAutoRefresh": t[0] || (t[0] = (o) => H.value = o),
|
|
186
|
+
tableExpose: C,
|
|
187
|
+
loading: n(y),
|
|
188
|
+
exportContext: n(te),
|
|
189
|
+
currentPage: n(l),
|
|
190
|
+
pageSize: n(i)
|
|
191
|
+
}, u.toolbar), null, 16, ["is-auto-refresh", "loading", "exportContext", "currentPage", "pageSize"])
|
|
190
192
|
]),
|
|
191
193
|
_: 1
|
|
192
|
-
})) :
|
|
193
|
-
|
|
194
|
-
key: 2,
|
|
195
|
-
ref_key: "dataListView",
|
|
196
|
-
ref: L,
|
|
197
|
-
data: ge(r(y)),
|
|
198
|
-
columns: pe(l.columns),
|
|
199
|
-
rowKey: j(l.rowKey),
|
|
200
|
-
maxHeight: r(M),
|
|
201
|
-
selectable: r(ie),
|
|
202
|
-
onSelectionChange: se
|
|
203
|
-
}, {
|
|
204
|
-
item: h((a) => [
|
|
205
|
-
V(e.$slots, "custom-view-item", ze(Re(a)), void 0, !0)
|
|
206
|
-
]),
|
|
207
|
-
_: 3
|
|
208
|
-
}, 8, ["data", "columns", "rowKey", "maxHeight", "selectable"])) : (i(), p(P, d({
|
|
209
|
-
key: 1,
|
|
194
|
+
})) : Ee("", !0),
|
|
195
|
+
(s(), d(I(n(oe)), g({
|
|
210
196
|
ref_key: "elTable",
|
|
211
|
-
ref:
|
|
197
|
+
ref: z,
|
|
212
198
|
class: "table-main-table",
|
|
213
199
|
stripe: "",
|
|
214
200
|
border: "",
|
|
215
201
|
highlightCurrentRow: ""
|
|
216
|
-
},
|
|
217
|
-
maxHeight:
|
|
218
|
-
data:
|
|
219
|
-
rowKey:
|
|
202
|
+
}, n(se), {
|
|
203
|
+
maxHeight: n(le),
|
|
204
|
+
data: n(b),
|
|
205
|
+
rowKey: fe(u.rowKey),
|
|
206
|
+
onSelectionChange: ie
|
|
220
207
|
}), {
|
|
208
|
+
item: h((o) => [
|
|
209
|
+
_(e.$slots, "custom-view-item", Te(ze(pe(o))), void 0, !0)
|
|
210
|
+
]),
|
|
221
211
|
empty: h(() => [
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
], 64)) : (
|
|
212
|
+
n(y) ? (s(), S(P, { key: 0 }, [
|
|
213
|
+
k("加载中...")
|
|
214
|
+
], 64)) : (s(), d(E, { key: 1 }))
|
|
225
215
|
]),
|
|
226
216
|
default: h(() => [
|
|
227
|
-
(
|
|
228
|
-
key:
|
|
229
|
-
}, { ref_for: !0 },
|
|
230
|
-
|
|
217
|
+
(s(!0), S(P, null, Pe(u.columns, (o) => (s(), d(r, g({
|
|
218
|
+
key: o.columnKey || o.prop
|
|
219
|
+
}, { ref_for: !0 }, o), Re({ _: 2 }, [
|
|
220
|
+
j(o.type) ? {
|
|
231
221
|
name: "default",
|
|
232
|
-
fn: h((
|
|
233
|
-
|
|
234
|
-
|
|
222
|
+
fn: h((c) => [
|
|
223
|
+
_(e.$slots, o.prop, g({ ref_for: !0 }, B(c)), () => [
|
|
224
|
+
o.render ? (s(), d(I(o.render), g({
|
|
235
225
|
key: 0,
|
|
236
226
|
ref_for: !0
|
|
237
|
-
},
|
|
238
|
-
_index:
|
|
239
|
-
}), null, 16, ["_index"])) : (
|
|
240
|
-
|
|
227
|
+
}, B(c, ["$index"]), {
|
|
228
|
+
_index: c.$index
|
|
229
|
+
}), null, 16, ["_index"])) : (s(), S(P, { key: 1 }, [
|
|
230
|
+
k(Y(c.row[o.prop]), 1)
|
|
241
231
|
], 64))
|
|
242
232
|
], !0)
|
|
243
233
|
]),
|
|
244
234
|
key: "0"
|
|
245
235
|
} : void 0,
|
|
246
|
-
|
|
236
|
+
j(o.type) ? {
|
|
247
237
|
name: "header",
|
|
248
|
-
fn: h((
|
|
249
|
-
|
|
250
|
-
|
|
238
|
+
fn: h((c) => [
|
|
239
|
+
_(e.$slots, `header-${o.prop}`, g({ ref_for: !0 }, $(c)), () => [
|
|
240
|
+
o.headerRender ? (s(), d(I(o.headerRender), g({
|
|
251
241
|
key: 0,
|
|
252
242
|
ref_for: !0
|
|
253
|
-
},
|
|
254
|
-
|
|
243
|
+
}, $(c)), null, 16)) : (s(), S(P, { key: 1 }, [
|
|
244
|
+
k(Y(o.label), 1)
|
|
255
245
|
], 64))
|
|
256
246
|
], !0)
|
|
257
247
|
]),
|
|
@@ -261,26 +251,26 @@ const Oe = { class: "table-main" }, Be = { class: "table-main-pagination" }, nt
|
|
|
261
251
|
]),
|
|
262
252
|
_: 3
|
|
263
253
|
}, 16, ["maxHeight", "data", "rowKey"])),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
"current-page":
|
|
267
|
-
"onUpdate:currentPage": t[1] || (t[1] = (
|
|
268
|
-
"page-size":
|
|
269
|
-
"onUpdate:pageSize": t[2] || (t[2] = (
|
|
270
|
-
"page-sizes":
|
|
254
|
+
Ie(_e("div", Ke, [
|
|
255
|
+
q(ge, {
|
|
256
|
+
"current-page": n(l),
|
|
257
|
+
"onUpdate:currentPage": t[1] || (t[1] = (o) => D(l) ? l.value = o : null),
|
|
258
|
+
"page-size": n(i),
|
|
259
|
+
"onUpdate:pageSize": t[2] || (t[2] = (o) => D(i) ? i.value = o : null),
|
|
260
|
+
"page-sizes": u.pageSizeOptions,
|
|
271
261
|
size: "small",
|
|
272
262
|
background: "",
|
|
273
|
-
layout:
|
|
274
|
-
total:
|
|
275
|
-
onSizeChange:
|
|
263
|
+
layout: u.pageLayout,
|
|
264
|
+
total: n(w),
|
|
265
|
+
onSizeChange: ce
|
|
276
266
|
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])
|
|
277
267
|
], 512), [
|
|
278
|
-
[
|
|
268
|
+
[ke, u.showPager]
|
|
279
269
|
])
|
|
280
270
|
]);
|
|
281
271
|
};
|
|
282
272
|
}
|
|
283
273
|
});
|
|
284
274
|
export {
|
|
285
|
-
|
|
275
|
+
ot as default
|
|
286
276
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableToolbar.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-b028e7a1"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -21,8 +21,8 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
21
21
|
exportByFe: { type: Boolean, default: !0 },
|
|
22
22
|
exportFn: {},
|
|
23
23
|
exportColumns: {},
|
|
24
|
-
leftExtraButtons: {},
|
|
25
|
-
rightExtraButtons: {},
|
|
24
|
+
leftExtraButtons: { default: () => [] },
|
|
25
|
+
rightExtraButtons: { default: () => [] },
|
|
26
26
|
tableExpose: {},
|
|
27
27
|
loading: { type: Boolean },
|
|
28
28
|
exportContext: {},
|
|
@@ -93,9 +93,13 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
93
93
|
} catch {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
u = await M(d, i, {
|
|
96
|
+
u = await M(d, i, {
|
|
97
|
+
limit: c
|
|
98
|
+
});
|
|
97
99
|
} else
|
|
98
|
-
u = await M(d, i, {
|
|
100
|
+
u = await M(d, i, {
|
|
101
|
+
limit: c
|
|
102
|
+
});
|
|
99
103
|
} catch (a) {
|
|
100
104
|
H.error(`导出失败:${(a == null ? void 0 : a.message) || (a == null ? void 0 : a.toString())}`);
|
|
101
105
|
return;
|