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