@done-coding/admin-core 0.17.0 → 0.18.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 (53) hide show
  1. package/es/components/app-layout/AppBody.vue.mjs +2 -2
  2. package/es/components/app-layout/AppBody.vue2.mjs +53 -54
  3. package/es/components/app-layout/keep-alive.mjs +22 -0
  4. package/es/components/data-view/DataListView.vue.mjs +2 -2
  5. package/es/components/data-view/DataListView.vue2.mjs +55 -53
  6. package/es/components/display/ActionConfirm.vue.mjs +2 -2
  7. package/es/components/display/ActionConfirm.vue2.mjs +1 -1
  8. package/es/components/display/TabsRefineFlow.vue.mjs +34 -32
  9. package/es/components/list-page/ListPage.vue.mjs +2 -2
  10. package/es/components/list-page/ListPage.vue2.mjs +74 -75
  11. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  12. package/es/components/misc/AutoRefreshGroup.vue2.mjs +42 -35
  13. package/es/components/modal/{ConfirmModal.vue.mjs → ModalConfirm.vue.mjs} +3 -3
  14. package/es/components/modal/{ConfirmModal.vue2.mjs → ModalConfirm.vue2.mjs} +34 -34
  15. package/es/components/modal/ModalDetail.vue.mjs +63 -0
  16. package/es/components/modal/ModalDetail.vue2.mjs +4 -0
  17. package/es/components/modal/ModalForm.vue.mjs +75 -0
  18. package/es/components/modal/ModalForm.vue2.mjs +4 -0
  19. package/es/components/panel/PanelItem.vue.mjs +5 -81
  20. package/es/components/panel/PanelItem.vue2.mjs +93 -2
  21. package/es/components/panel/PanelMain.vue2.mjs +14 -14
  22. package/es/components/table/TableMain.vue.mjs +2 -2
  23. package/es/components/table/TableMain.vue2.mjs +210 -174
  24. package/es/components/table/TableSkeleton.vue.mjs +7 -0
  25. package/es/components/table/TableSkeleton.vue2.mjs +89 -0
  26. package/es/components/table/TableToolbar.vue.mjs +2 -2
  27. package/es/components/table/TableToolbar.vue2.mjs +22 -21
  28. package/es/components/table/use-fill-height.mjs +14 -0
  29. package/es/components/table/use-table-skeleton.mjs +19 -0
  30. package/es/index.mjs +230 -223
  31. package/es/router/group-redirect.mjs +20 -0
  32. package/es/style.css +1 -1
  33. package/package.json +2 -2
  34. package/types/components/app-layout/keep-alive.d.ts +14 -0
  35. package/types/components/data-view/types.d.ts +1 -0
  36. package/types/components/misc/AutoRefreshGroup.vue.d.ts +2 -1
  37. package/types/components/misc/types.d.ts +1 -0
  38. package/types/components/modal/{ConfirmModal.vue.d.ts → ModalConfirm.vue.d.ts} +1 -1
  39. package/types/components/modal/{DetailModal.vue.d.ts → ModalDetail.vue.d.ts} +2 -2
  40. package/types/components/modal/ModalForm.vue.d.ts +24 -0
  41. package/types/components/modal/index.d.ts +4 -3
  42. package/types/components/modal/types.d.ts +26 -2
  43. package/types/components/panel/PanelItem.vue.d.ts +1 -1
  44. package/types/components/panel/types.d.ts +4 -1
  45. package/types/components/table/TableSkeleton.vue.d.ts +7 -0
  46. package/types/components/table/types.d.ts +10 -0
  47. package/types/components/table/use-fill-height.d.ts +11 -0
  48. package/types/components/table/use-table-skeleton.d.ts +17 -0
  49. package/types/injectInfo.json.d.ts +1 -1
  50. package/types/router/group-redirect.d.ts +5 -0
  51. package/types/router/index.d.ts +1 -0
  52. package/es/components/modal/DetailModal.vue.mjs +0 -74
  53. package/es/components/modal/DetailModal.vue2.mjs +0 -4
@@ -1,18 +1,21 @@
1
- import { defineComponent as pe, useModel as z, useAttrs as me, ref as u, computed as f, markRaw as U, shallowRef as ve, onMounted as he, onActivated as we, watch as d, openBlock as n, createElementBlock as w, createBlock as p, unref as x, withCtx as m, createVNode as q, mergeProps as c, createCommentVNode as ye, resolveDynamicComponent as E, Fragment as I, renderList as Se, createSlots as be, renderSlot as T, createTextVNode as H, toDisplayString as D, normalizeProps as Ce, guardReactiveProps as xe, withDirectives as Ie, createElementVNode as Pe, vShow as Ve, mergeModels as F } from "vue";
2
- import Y from "lodash/cloneDeep";
3
- import G 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 He, ElEmpty as ke, 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: "dc-table-main table-main" }, Oe = { class: "dc-table-main__pagination table-main-pagination" }, Ze = /* @__PURE__ */ pe({
1
+ import { defineComponent as Ce, useCssVars as xe, unref as l, useModel as V, useAttrs as He, ref as g, computed as f, markRaw as D, shallowRef as ke, onMounted as Ie, onActivated as Re, watch as p, openBlock as n, createElementBlock as S, normalizeClass as Pe, createBlock as c, withCtx as h, createVNode as G, mergeProps as d, createCommentVNode as Ve, resolveDynamicComponent as T, Fragment as H, renderList as Te, createSlots as ze, renderSlot as z, createTextVNode as E, toDisplayString as Y, normalizeProps as Ee, guardReactiveProps as Ae, withDirectives as Me, createElementVNode as Le, vShow as Ne, mergeModels as Z } from "vue";
2
+ import Q from "lodash/cloneDeep";
3
+ import W from "lodash/omit";
4
+ import X from "lodash/set";
5
+ import ee from "lodash/get";
6
+ import Oe from "./TableToolbar.vue.mjs";
7
+ import Be from "./TableSkeleton.vue.mjs";
8
+ import { useTableSkeleton as Ke } from "./use-table-skeleton.mjs";
9
+ import { useFillHeight as je } from "./use-fill-height.mjs";
10
+ import $e from "../display/WatchSize.vue.mjs";
11
+ import Je from "../data-view/DataListView.vue.mjs";
12
+ import { ElTable as Fe, ElTableColumn as _e, ElEmpty as Ue, ElPagination as qe } from "element-plus";
13
+ import { pickExportColumns as De } from "../../utils/export.mjs";
14
+ import { useChannelViewportHeight as Ge } from "../../hooks/use-channel-viewport-height.mjs";
15
+ import { APP_API_LIST_MODEL_KEY_CONFIG as k } from "../../config/list-model.mjs";
16
+ const Ye = { class: "dc-table-main__pagination table-main-pagination" }, gt = /* @__PURE__ */ Ce({
14
17
  __name: "TableMain",
15
- props: /* @__PURE__ */ F({
18
+ props: /* @__PURE__ */ Z({
16
19
  showPager: { type: Boolean, default: !0 },
17
20
  showSwitchView: { type: Boolean },
18
21
  showToolbar: { type: Boolean, default: !0 },
@@ -31,6 +34,9 @@ const Le = { class: "dc-table-main table-main" }, Oe = { class: "dc-table-main__
31
34
  refineReduceHeight: { default: 0 },
32
35
  injectInfo: {},
33
36
  dataViewMaxHeightMinValue: { default: 500 },
37
+ skeleton: { type: Boolean, default: !0 },
38
+ skeletonRows: {},
39
+ fillHeight: { type: Boolean, default: !1 },
34
40
  viewportHeight: {},
35
41
  parentChannel: {}
36
42
  }, {
@@ -41,209 +47,239 @@ const Le = { class: "dc-table-main table-main" }, Oe = { class: "dc-table-main__
41
47
  customView: { type: Boolean, default: !1 },
42
48
  customViewModifiers: {}
43
49
  }),
44
- emits: /* @__PURE__ */ F(["pageChange", "pageSizeChange", "dataChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
45
- setup(o, { expose: W, emit: X }) {
46
- const r = o, v = X, k = z(o, "isAutoRefresh"), A = z(o, "refreshInterval"), y = z(o, "customView"), ee = me(), S = u([]), b = u(0), s = u(0), l = u(1), h = u(!1), V = u(!1), M = u([]), te = f(
50
+ emits: /* @__PURE__ */ Z(["pageChange", "pageSizeChange", "dataChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
51
+ setup(r, { expose: te, emit: ae }) {
52
+ xe((e) => ({
53
+ v0d0c522f: l(fe)
54
+ }));
55
+ const o = r, w = ae, A = V(r, "isAutoRefresh"), M = V(r, "refreshInterval"), y = V(r, "customView"), oe = He(), b = g([]), C = g(0), u = g(0), i = g(1), m = g(!1), I = g(!1), L = g([]), re = f(
47
56
  () => ({
48
- columns: Me(r.columns),
49
- selectedList: M.value,
50
- currentPageList: S.value,
51
- api: r.api,
52
- query: r.query,
53
- total: b.value,
54
- hasSelection: r.columns.some((e) => e.type === "selection")
57
+ columns: De(o.columns),
58
+ selectedList: L.value,
59
+ currentPageList: b.value,
60
+ api: o.api,
61
+ query: o.query,
62
+ total: C.value,
63
+ hasSelection: o.columns.some((e) => e.type === "selection")
55
64
  })
56
- ), N = u(0), ae = (e) => {
65
+ ), N = g(0), ne = (e) => {
57
66
  N.value = e;
58
- }, re = f(
59
- () => y.value ? U(Ee) : U(Te)
60
- ), R = ve(), oe = f(
61
- () => r.columns.some((e) => e.type === "selection")
62
- ), { viewportHeightFinal: ne } = Ne(r), L = f(() => r.showPager ? 35 : 0), O = f(
63
- () => r.showToolbar ? N.value : 0
64
- ), le = f(() => {
65
- const { maxHeight: e, refine: a, dataViewMaxHeightMinValue: t } = r;
66
- return e ? Math.max(
67
- e - L.value - O.value,
68
- t
69
- ) : a ? Math.max(
70
- ne.value - L.value - O.value - r.refineReduceHeight,
71
- t
72
- ) : void 0;
73
- }), C = f(() => {
74
- const e = Y(r.query || {});
75
- return Z(e, P.PAGE_SIZE_KEY, s.value), Z(
67
+ }, le = f(
68
+ () => y.value ? D(Je) : D(Fe)
69
+ ), R = ke(), ie = f(
70
+ () => o.columns.some((e) => e.type === "selection")
71
+ ), { viewportHeightFinal: se } = Ge(o), O = f(() => o.showPager ? 35 : 0), B = f(
72
+ () => o.showToolbar ? N.value : 0
73
+ ), K = f(() => {
74
+ const { maxHeight: e, refine: a } = o;
75
+ if (e)
76
+ return e - O.value - B.value;
77
+ if (a)
78
+ return se.value - O.value - B.value - o.refineReduceHeight;
79
+ }), P = f(() => {
80
+ const e = K.value;
81
+ if (e !== void 0)
82
+ return Math.max(e, o.dataViewMaxHeightMinValue);
83
+ }), { fillActive: ue, fillMinHeight: j, fillMinHeightCss: fe } = je({
84
+ enabled: () => o.fillHeight,
85
+ rawAvailableHeight: () => K.value
86
+ }), { showSkeleton: ge, skeletonMode: ce, skeletonColumns: de, skeletonRowsFinal: me } = Ke({
87
+ enabled: () => o.skeleton,
88
+ loading: () => m.value,
89
+ dataLength: () => {
90
+ var e;
91
+ return ((e = b.value) == null ? void 0 : e.length) ?? 0;
92
+ },
93
+ isGrid: () => y.value,
94
+ columnCount: () => o.columns.length,
95
+ skeletonRows: () => o.skeletonRows,
96
+ availableHeight: () => P.value
97
+ }), x = f(() => {
98
+ const e = Q(o.query || {});
99
+ return X(e, k.PAGE_SIZE_KEY, u.value), X(
76
100
  e,
77
- P.CURRENT_PAGE_KEY,
78
- l.value
101
+ k.CURRENT_PAGE_KEY,
102
+ i.value
79
103
  ), e;
80
- }), ie = () => ({
81
- injectInfo: r.injectInfo,
82
- exposeInfo: g
83
- }), se = f(() => ({
84
- ...r.tableProps,
85
- ...ee,
104
+ }), ve = () => ({
105
+ injectInfo: o.injectInfo,
106
+ exposeInfo: v
107
+ }), pe = f(() => ({
108
+ ...o.tableProps,
109
+ ...oe,
86
110
  // customView 下,需要手动处理 selectable
87
111
  ...y.value ? {
88
- selectable: oe.value,
89
- columns: r.columns,
90
- getRenderCtxParams: ie
112
+ selectable: ie.value,
113
+ columns: o.columns,
114
+ getRenderCtxParams: ve,
115
+ minHeight: j.value
91
116
  } : {}
92
- })), ue = (e) => {
117
+ })), he = (e) => {
93
118
  var t;
94
- const a = (t = r.tableProps) == null ? void 0 : t.onSelectionChange;
95
- M.value = e, a == null || a(e);
96
- }, K = (e, a = !0) => {
97
- const t = JSON.stringify(e) === JSON.stringify(C.value);
119
+ const a = (t = o.tableProps) == null ? void 0 : t.onSelectionChange;
120
+ L.value = e, a == null || a(e);
121
+ }, $ = (e, a = !0) => {
122
+ const t = JSON.stringify(e) === JSON.stringify(x.value);
98
123
  return !t && a && console.warn(
99
124
  `同一地方 并发请求 参数冰花 当前不是最新的参数 丢弃结果 ${JSON.stringify(
100
125
  e
101
- )} => ${JSON.stringify(C.value)}`
126
+ )} => ${JSON.stringify(x.value)}`
102
127
  ), t;
103
- }, j = (e = !1) => {
128
+ }, J = (e = !1) => {
104
129
  var t;
105
- if (!s.value) return;
106
- h.value ? console.warn("请求并发") : h.value = !0, e || (V.value = !0), (t = R.value) == null || t.clearSelection();
107
- const a = Y(C.value);
108
- return r.api(a).then((i) => {
109
- K(a, !1) && (S.value = Q(
110
- i,
111
- P.LIST_KEY
112
- ), b.value = Q(
113
- i,
114
- P.TOTAL_KEY
115
- ), v("pageInfoChange", {
116
- pageSize: s.value,
117
- currentPage: l.value,
118
- total: b.value
130
+ if (!u.value) return;
131
+ m.value ? console.warn("请求并发") : m.value = !0, e || (I.value = !0), (t = R.value) == null || t.clearSelection();
132
+ const a = Q(x.value);
133
+ return o.api(a).then((s) => {
134
+ $(a, !1) && (b.value = ee(
135
+ s,
136
+ k.LIST_KEY
137
+ ), C.value = ee(
138
+ s,
139
+ k.TOTAL_KEY
140
+ ), w("pageInfoChange", {
141
+ pageSize: u.value,
142
+ currentPage: i.value,
143
+ total: C.value
119
144
  }));
120
145
  }).finally(() => {
121
- K(a) && (h.value = !1, V.value = !1);
146
+ $(a) && (m.value = !1, I.value = !1);
122
147
  });
123
- }, B = async (e = !1) => {
148
+ }, F = async (e = !1) => {
124
149
  var a;
125
- return (a = j(e)) == null ? void 0 : a.catch(() => {
150
+ return (a = J(e)) == null ? void 0 : a.catch(() => {
126
151
  });
127
- }, fe = async (e = !1) => {
128
- if (l.value === 1)
129
- return B(e);
130
- l.value = 1;
131
- }, ce = (e) => e, g = {
132
- refresh: B,
133
- reload: fe,
152
+ }, we = async (e = !1) => {
153
+ if (i.value === 1)
154
+ return F(e);
155
+ i.value = 1;
156
+ }, ye = (e) => e, v = {
157
+ refresh: F,
158
+ reload: we,
134
159
  getTableInstance: () => R.value
135
- }, $ = (e, a = []) => ({
136
- ...G(e, ["render", "headerRender"].concat(a)),
137
- injectInfo: r.injectInfo || {},
138
- exposeInfo: g
139
- }), J = (e) => ({
140
- ...G(e, ["render", "headerRender"]),
141
- injectInfo: r.injectInfo || {},
142
- exposeInfo: g
143
- }), ge = (e) => e;
144
- W(g);
145
- const de = (e) => {
146
- s.value = e, l.value = 1;
147
- }, _ = (e) => !e || e === "expand";
148
- return he(() => {
149
- s.value = r.pageSizeInit, we(() => {
150
- g.refresh();
160
+ }, _ = (e, a = []) => ({
161
+ ...W(e, ["render", "headerRender"].concat(a)),
162
+ injectInfo: o.injectInfo || {},
163
+ exposeInfo: v
164
+ }), U = (e) => ({
165
+ ...W(e, ["render", "headerRender"]),
166
+ injectInfo: o.injectInfo || {},
167
+ exposeInfo: v
168
+ }), be = (e) => e;
169
+ te(v);
170
+ const Se = (e) => {
171
+ u.value = e, i.value = 1;
172
+ }, q = (e) => !e || e === "expand";
173
+ return Ie(() => {
174
+ u.value = o.pageSizeInit, Re(() => {
175
+ v.refresh();
151
176
  });
152
- }), d(S, (e) => {
153
- v("dataChange", e);
154
- }), d(
155
- () => r.query,
177
+ }), p(b, (e) => {
178
+ w("dataChange", e);
179
+ }), p(
180
+ () => o.query,
156
181
  (e, a) => {
157
- JSON.stringify(e) !== JSON.stringify(a) && (l.value = 1);
182
+ JSON.stringify(e) !== JSON.stringify(a) && (i.value = 1);
158
183
  }
159
- ), d(
160
- C,
184
+ ), p(
185
+ x,
161
186
  (e, a) => {
162
- JSON.stringify(e) !== JSON.stringify(a) && j();
187
+ JSON.stringify(e) !== JSON.stringify(a) && J();
163
188
  },
164
189
  {
165
190
  immediate: !0
166
191
  }
167
- ), d(V, (e) => {
168
- v("loadingChange", e);
169
- }), d(s, (e) => {
170
- v("pageSizeChange", e);
171
- }), d(l, (e) => {
172
- v("pageChange", e);
173
- }), (e, a) => (n(), w("div", Le, [
174
- o.showToolbar ? (n(), p(x(ze), {
192
+ ), p(I, (e) => {
193
+ w("loadingChange", e);
194
+ }), p(u, (e) => {
195
+ w("pageSizeChange", e);
196
+ }), p(i, (e) => {
197
+ w("pageChange", e);
198
+ }), (e, a) => (n(), S("div", {
199
+ class: Pe(["dc-table-main table-main", { "table-main_fill": l(ue) }])
200
+ }, [
201
+ r.showToolbar ? (n(), c(l($e), {
175
202
  key: 0,
176
203
  class: "dc-table-main__toolbar",
177
- onHeightChange: ae
204
+ onHeightChange: ne
178
205
  }, {
179
- default: m(() => [
180
- q(Re, c({
181
- "is-auto-refresh": k.value,
182
- "onUpdate:isAutoRefresh": a[0] || (a[0] = (t) => k.value = t),
183
- "refresh-interval": A.value,
184
- "onUpdate:refreshInterval": a[1] || (a[1] = (t) => A.value = t),
206
+ default: h(() => [
207
+ G(Oe, d({
208
+ "is-auto-refresh": A.value,
209
+ "onUpdate:isAutoRefresh": a[0] || (a[0] = (t) => A.value = t),
210
+ "refresh-interval": M.value,
211
+ "onUpdate:refreshInterval": a[1] || (a[1] = (t) => M.value = t),
185
212
  "custom-view": y.value,
186
213
  "onUpdate:customView": a[2] || (a[2] = (t) => y.value = t),
187
- tableExpose: g,
188
- loading: h.value,
189
- exportContext: te.value,
190
- showSwitchView: o.showSwitchView,
191
- currentPage: l.value,
192
- pageSize: s.value
193
- }, o.toolbar), null, 16, ["is-auto-refresh", "refresh-interval", "custom-view", "loading", "exportContext", "showSwitchView", "currentPage", "pageSize"])
214
+ tableExpose: v,
215
+ loading: m.value,
216
+ exportContext: re.value,
217
+ showSwitchView: r.showSwitchView,
218
+ currentPage: i.value,
219
+ pageSize: u.value
220
+ }, r.toolbar), null, 16, ["is-auto-refresh", "refresh-interval", "custom-view", "loading", "exportContext", "showSwitchView", "currentPage", "pageSize"])
194
221
  ]),
195
222
  _: 1
196
- })) : ye("", !0),
197
- (n(), p(E(re.value), c({
223
+ })) : Ve("", !0),
224
+ l(ge) ? (n(), c(Be, {
225
+ key: 1,
226
+ class: "table-main-table",
227
+ mode: l(ce),
228
+ rows: l(me),
229
+ columns: l(de),
230
+ maxHeight: P.value,
231
+ minHeight: l(j)
232
+ }, null, 8, ["mode", "rows", "columns", "maxHeight", "minHeight"])) : (n(), c(T(le.value), d({
233
+ key: 2,
198
234
  ref_key: "elTable",
199
235
  ref: R,
200
236
  class: "table-main-table",
201
237
  stripe: "",
202
238
  border: "",
203
239
  highlightCurrentRow: ""
204
- }, se.value, {
205
- maxHeight: le.value,
206
- data: S.value,
207
- rowKey: ce(o.rowKey),
208
- onSelectionChange: ue
240
+ }, pe.value, {
241
+ maxHeight: P.value,
242
+ data: b.value,
243
+ rowKey: ye(r.rowKey),
244
+ onSelectionChange: he
209
245
  }), {
210
- item: m((t) => [
211
- T(e.$slots, "custom-view-item", Ce(xe(ge(t))), void 0, !0)
246
+ item: h((t) => [
247
+ z(e.$slots, "custom-view-item", Ee(Ae(be(t))), void 0, !0)
212
248
  ]),
213
- empty: m(() => [
214
- h.value ? (n(), w(I, { key: 0 }, [
215
- H("加载中...")
216
- ], 64)) : (n(), p(x(ke), { key: 1 }))
249
+ empty: h(() => [
250
+ m.value ? (n(), S(H, { key: 0 }, [
251
+ E("加载中...")
252
+ ], 64)) : (n(), c(l(Ue), { key: 1 }))
217
253
  ]),
218
- default: m(() => [
219
- (n(!0), w(I, null, Se(o.columns, (t) => (n(), p(x(He), c({
254
+ default: h(() => [
255
+ (n(!0), S(H, null, Te(r.columns, (t) => (n(), c(l(_e), d({
220
256
  key: t.columnKey || t.prop
221
- }, { ref_for: !0 }, t), be({ _: 2 }, [
222
- _(t.type) ? {
257
+ }, { ref_for: !0 }, t), ze({ _: 2 }, [
258
+ q(t.type) ? {
223
259
  name: "default",
224
- fn: m((i) => [
225
- T(e.$slots, t.prop, c({ ref_for: !0 }, $(i)), () => [
226
- t.render ? (n(), p(E(t.render), c({
260
+ fn: h((s) => [
261
+ z(e.$slots, t.prop, d({ ref_for: !0 }, _(s)), () => [
262
+ t.render ? (n(), c(T(t.render), d({
227
263
  key: 0,
228
264
  ref_for: !0
229
- }, $(i, ["$index"]), {
230
- _index: i.$index
231
- }), null, 16, ["_index"])) : (n(), w(I, { key: 1 }, [
232
- H(D(i.row[t.prop]), 1)
265
+ }, _(s, ["$index"]), {
266
+ _index: s.$index
267
+ }), null, 16, ["_index"])) : (n(), S(H, { key: 1 }, [
268
+ E(Y(s.row[t.prop]), 1)
233
269
  ], 64))
234
270
  ], !0)
235
271
  ]),
236
272
  key: "0"
237
273
  } : void 0,
238
- _(t.type) ? {
274
+ q(t.type) ? {
239
275
  name: "header",
240
- fn: m((i) => [
241
- T(e.$slots, `header-${t.prop}`, c({ ref_for: !0 }, J(i)), () => [
242
- t.headerRender ? (n(), p(E(t.headerRender), c({
276
+ fn: h((s) => [
277
+ z(e.$slots, `header-${t.prop}`, d({ ref_for: !0 }, U(s)), () => [
278
+ t.headerRender ? (n(), c(T(t.headerRender), d({
243
279
  key: 0,
244
280
  ref_for: !0
245
- }, J(i)), null, 16)) : (n(), w(I, { key: 1 }, [
246
- H(D(t.label), 1)
281
+ }, U(s)), null, 16)) : (n(), S(H, { key: 1 }, [
282
+ E(Y(t.label), 1)
247
283
  ], 64))
248
284
  ], !0)
249
285
  ]),
@@ -253,25 +289,25 @@ const Le = { class: "dc-table-main table-main" }, Oe = { class: "dc-table-main__
253
289
  ]),
254
290
  _: 3
255
291
  }, 16, ["maxHeight", "data", "rowKey"])),
256
- Ie(Pe("div", Oe, [
257
- q(x(Ae), {
258
- "current-page": l.value,
259
- "onUpdate:currentPage": a[3] || (a[3] = (t) => l.value = t),
260
- "page-size": s.value,
261
- "onUpdate:pageSize": a[4] || (a[4] = (t) => s.value = t),
262
- "page-sizes": o.pageSizeOptions,
292
+ Me(Le("div", Ye, [
293
+ G(l(qe), {
294
+ "current-page": i.value,
295
+ "onUpdate:currentPage": a[3] || (a[3] = (t) => i.value = t),
296
+ "page-size": u.value,
297
+ "onUpdate:pageSize": a[4] || (a[4] = (t) => u.value = t),
298
+ "page-sizes": r.pageSizeOptions,
263
299
  size: "small",
264
300
  background: "",
265
- layout: o.pageLayout,
266
- total: b.value,
267
- onSizeChange: de
301
+ layout: r.pageLayout,
302
+ total: C.value,
303
+ onSizeChange: Se
268
304
  }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])
269
305
  ], 512), [
270
- [Ve, o.showPager]
306
+ [Ne, r.showPager]
271
307
  ])
272
- ]));
308
+ ], 2));
273
309
  }
274
310
  });
275
311
  export {
276
- Ze as default
312
+ gt as default
277
313
  };
@@ -0,0 +1,7 @@
1
+ import o from "./TableSkeleton.vue2.mjs";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c813d7d1"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,89 @@
1
+ import { defineComponent as h, computed as m, openBlock as e, createElementBlock as t, normalizeStyle as b, createVNode as l, unref as a, withCtx as v, Fragment as i, createElementVNode as x, renderList as d } from "vue";
2
+ import { ElSkeleton as y, ElSkeletonItem as o } from "element-plus";
3
+ const g = { class: "table-skeleton__row table-skeleton__row_head" }, f = {
4
+ key: 1,
5
+ class: "table-skeleton__grid"
6
+ }, $ = /* @__PURE__ */ h({
7
+ __name: "TableSkeleton",
8
+ props: {
9
+ mode: { default: "table" },
10
+ rows: { default: 5 },
11
+ columns: { default: 4 },
12
+ maxHeight: {},
13
+ minHeight: {}
14
+ },
15
+ setup(c) {
16
+ const r = c, u = m(() => Math.max(r.columns, 1)), _ = m(() => {
17
+ const n = {};
18
+ return r.maxHeight && (n.maxHeight = `${r.maxHeight}px`, n.overflow = "hidden"), r.minHeight && (n.minHeight = `${r.minHeight}px`), Object.keys(n).length ? n : void 0;
19
+ });
20
+ return (n, w) => (e(), t("div", {
21
+ class: "dc-table-skeleton table-skeleton",
22
+ style: b(_.value),
23
+ role: "status",
24
+ "aria-busy": "true"
25
+ }, [
26
+ l(a(y), {
27
+ loading: "",
28
+ animated: "",
29
+ throttle: 0
30
+ }, {
31
+ template: v(() => [
32
+ c.mode === "table" ? (e(), t(i, { key: 0 }, [
33
+ x("div", g, [
34
+ (e(!0), t(i, null, d(u.value, (s) => (e(), t("div", {
35
+ key: `h-${s}`,
36
+ class: "table-skeleton__cell"
37
+ }, [
38
+ l(a(o), {
39
+ variant: "text",
40
+ class: "table-skeleton__bar"
41
+ })
42
+ ]))), 128))
43
+ ]),
44
+ (e(!0), t(i, null, d(c.rows, (s) => (e(), t("div", {
45
+ key: `r-${s}`,
46
+ class: "table-skeleton__row"
47
+ }, [
48
+ (e(!0), t(i, null, d(u.value, (k) => (e(), t("div", {
49
+ key: `c-${s}-${k}`,
50
+ class: "table-skeleton__cell"
51
+ }, [
52
+ l(a(o), {
53
+ variant: "text",
54
+ class: "table-skeleton__bar"
55
+ })
56
+ ]))), 128))
57
+ ]))), 128))
58
+ ], 64)) : (e(), t("div", f, [
59
+ (e(!0), t(i, null, d(c.rows, (s) => (e(), t("div", {
60
+ key: `card-${s}`,
61
+ class: "table-skeleton__card"
62
+ }, [
63
+ l(a(o), {
64
+ variant: "image",
65
+ class: "table-skeleton__card-media"
66
+ }),
67
+ l(a(o), {
68
+ variant: "text",
69
+ style: { width: "60%" }
70
+ }),
71
+ l(a(o), {
72
+ variant: "text",
73
+ style: { width: "90%" }
74
+ }),
75
+ l(a(o), {
76
+ variant: "text",
77
+ style: { width: "40%" }
78
+ })
79
+ ]))), 128))
80
+ ]))
81
+ ]),
82
+ _: 1
83
+ })
84
+ ], 4));
85
+ }
86
+ });
87
+ export {
88
+ $ as default
89
+ };
@@ -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 m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0175f1a9"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0220e327"]]);
5
5
  export {
6
6
  m as default
7
7
  };