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