@done-coding/admin-core 0.16.1-alpha.0 → 0.17.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/components/app-layout/AppBody.vue.mjs +2 -2
- package/es/components/app-layout/AppBody.vue2.mjs +53 -54
- package/es/components/app-layout/keep-alive.mjs +22 -0
- package/es/components/data-view/DataListView.vue.mjs +2 -2
- package/es/components/data-view/DataListView.vue2.mjs +55 -53
- package/es/components/display/ActionConfirm.vue.mjs +2 -2
- package/es/components/display/ActionConfirm.vue2.mjs +1 -1
- package/es/components/display/TabsRefineFlow.vue.mjs +34 -32
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +74 -75
- package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
- package/es/components/misc/AutoRefreshGroup.vue2.mjs +42 -35
- package/es/components/modal/{ConfirmModal.vue.mjs → ModalConfirm.vue.mjs} +3 -3
- package/es/components/modal/{ConfirmModal.vue2.mjs → ModalConfirm.vue2.mjs} +34 -34
- package/es/components/modal/ModalDetail.vue.mjs +63 -0
- package/es/components/modal/ModalDetail.vue2.mjs +4 -0
- package/es/components/modal/ModalForm.vue.mjs +75 -0
- package/es/components/modal/ModalForm.vue2.mjs +4 -0
- package/es/components/panel/PanelItem.vue.mjs +5 -81
- package/es/components/panel/PanelItem.vue2.mjs +93 -2
- package/es/components/panel/PanelMain.vue2.mjs +14 -14
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +210 -174
- package/es/components/table/TableSkeleton.vue.mjs +7 -0
- package/es/components/table/TableSkeleton.vue2.mjs +89 -0
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +22 -21
- package/es/components/table/use-fill-height.mjs +14 -0
- package/es/components/table/use-table-skeleton.mjs +19 -0
- package/es/index.mjs +230 -223
- package/es/router/group-redirect.mjs +20 -0
- package/es/style.css +1 -1
- package/package.json +2 -2
- package/types/components/app-layout/keep-alive.d.ts +14 -0
- package/types/components/data-view/types.d.ts +1 -0
- package/types/components/misc/AutoRefreshGroup.vue.d.ts +2 -1
- package/types/components/misc/types.d.ts +1 -0
- package/types/components/modal/{ConfirmModal.vue.d.ts → ModalConfirm.vue.d.ts} +1 -1
- package/types/components/modal/{DetailModal.vue.d.ts → ModalDetail.vue.d.ts} +2 -2
- package/types/components/modal/ModalForm.vue.d.ts +24 -0
- package/types/components/modal/index.d.ts +4 -3
- package/types/components/modal/types.d.ts +26 -2
- package/types/components/panel/PanelItem.vue.d.ts +1 -1
- package/types/components/panel/types.d.ts +4 -1
- package/types/components/table/TableSkeleton.vue.d.ts +7 -0
- package/types/components/table/types.d.ts +10 -0
- package/types/components/table/use-fill-height.d.ts +11 -0
- package/types/components/table/use-table-skeleton.d.ts +17 -0
- package/types/injectInfo.json.d.ts +1 -1
- package/types/router/group-redirect.d.ts +5 -0
- package/types/router/index.d.ts +1 -0
- package/es/components/modal/DetailModal.vue.mjs +0 -74
- package/es/components/modal/DetailModal.vue2.mjs +0 -4
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
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__ */
|
|
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__ */
|
|
45
|
-
setup(
|
|
46
|
-
|
|
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:
|
|
49
|
-
selectedList:
|
|
50
|
-
currentPageList:
|
|
51
|
-
api:
|
|
52
|
-
query:
|
|
53
|
-
total:
|
|
54
|
-
hasSelection:
|
|
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 =
|
|
65
|
+
), N = g(0), ne = (e) => {
|
|
57
66
|
N.value = e;
|
|
58
|
-
},
|
|
59
|
-
() => y.value ?
|
|
60
|
-
), R =
|
|
61
|
-
() =>
|
|
62
|
-
), { viewportHeightFinal:
|
|
63
|
-
() =>
|
|
64
|
-
),
|
|
65
|
-
const { maxHeight: e, refine: a
|
|
66
|
-
|
|
67
|
-
e -
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
78
|
-
|
|
101
|
+
k.CURRENT_PAGE_KEY,
|
|
102
|
+
i.value
|
|
79
103
|
), e;
|
|
80
|
-
}),
|
|
81
|
-
injectInfo:
|
|
82
|
-
exposeInfo:
|
|
83
|
-
}),
|
|
84
|
-
...
|
|
85
|
-
...
|
|
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:
|
|
89
|
-
columns:
|
|
90
|
-
getRenderCtxParams:
|
|
112
|
+
selectable: ie.value,
|
|
113
|
+
columns: o.columns,
|
|
114
|
+
getRenderCtxParams: ve,
|
|
115
|
+
minHeight: j.value
|
|
91
116
|
} : {}
|
|
92
|
-
})),
|
|
117
|
+
})), he = (e) => {
|
|
93
118
|
var t;
|
|
94
|
-
const a = (t =
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
const t = JSON.stringify(e) === JSON.stringify(
|
|
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(
|
|
126
|
+
)} => ${JSON.stringify(x.value)}`
|
|
102
127
|
), t;
|
|
103
|
-
},
|
|
128
|
+
}, J = (e = !1) => {
|
|
104
129
|
var t;
|
|
105
|
-
if (!
|
|
106
|
-
|
|
107
|
-
const a =
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
),
|
|
116
|
-
pageSize:
|
|
117
|
-
currentPage:
|
|
118
|
-
total:
|
|
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
|
-
|
|
146
|
+
$(a) && (m.value = !1, I.value = !1);
|
|
122
147
|
});
|
|
123
|
-
},
|
|
148
|
+
}, F = async (e = !1) => {
|
|
124
149
|
var a;
|
|
125
|
-
return (a =
|
|
150
|
+
return (a = J(e)) == null ? void 0 : a.catch(() => {
|
|
126
151
|
});
|
|
127
|
-
},
|
|
128
|
-
if (
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
refresh:
|
|
133
|
-
reload:
|
|
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
|
-
},
|
|
136
|
-
...
|
|
137
|
-
injectInfo:
|
|
138
|
-
exposeInfo:
|
|
139
|
-
}),
|
|
140
|
-
...
|
|
141
|
-
injectInfo:
|
|
142
|
-
exposeInfo:
|
|
143
|
-
}),
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
}),
|
|
153
|
-
|
|
154
|
-
}),
|
|
155
|
-
() =>
|
|
177
|
+
}), p(b, (e) => {
|
|
178
|
+
w("dataChange", e);
|
|
179
|
+
}), p(
|
|
180
|
+
() => o.query,
|
|
156
181
|
(e, a) => {
|
|
157
|
-
JSON.stringify(e) !== JSON.stringify(a) && (
|
|
182
|
+
JSON.stringify(e) !== JSON.stringify(a) && (i.value = 1);
|
|
158
183
|
}
|
|
159
|
-
),
|
|
160
|
-
|
|
184
|
+
), p(
|
|
185
|
+
x,
|
|
161
186
|
(e, a) => {
|
|
162
|
-
JSON.stringify(e) !== JSON.stringify(a) &&
|
|
187
|
+
JSON.stringify(e) !== JSON.stringify(a) && J();
|
|
163
188
|
},
|
|
164
189
|
{
|
|
165
190
|
immediate: !0
|
|
166
191
|
}
|
|
167
|
-
),
|
|
168
|
-
|
|
169
|
-
}),
|
|
170
|
-
|
|
171
|
-
}),
|
|
172
|
-
|
|
173
|
-
}), (e, a) => (n(),
|
|
174
|
-
|
|
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:
|
|
204
|
+
onHeightChange: ne
|
|
178
205
|
}, {
|
|
179
|
-
default:
|
|
180
|
-
|
|
181
|
-
"is-auto-refresh":
|
|
182
|
-
"onUpdate:isAutoRefresh": a[0] || (a[0] = (t) =>
|
|
183
|
-
"refresh-interval":
|
|
184
|
-
"onUpdate:refreshInterval": a[1] || (a[1] = (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:
|
|
188
|
-
loading:
|
|
189
|
-
exportContext:
|
|
190
|
-
showSwitchView:
|
|
191
|
-
currentPage:
|
|
192
|
-
pageSize:
|
|
193
|
-
},
|
|
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
|
-
})) :
|
|
197
|
-
(
|
|
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
|
-
},
|
|
205
|
-
maxHeight:
|
|
206
|
-
data:
|
|
207
|
-
rowKey:
|
|
208
|
-
onSelectionChange:
|
|
240
|
+
}, pe.value, {
|
|
241
|
+
maxHeight: P.value,
|
|
242
|
+
data: b.value,
|
|
243
|
+
rowKey: ye(r.rowKey),
|
|
244
|
+
onSelectionChange: he
|
|
209
245
|
}), {
|
|
210
|
-
item:
|
|
211
|
-
|
|
246
|
+
item: h((t) => [
|
|
247
|
+
z(e.$slots, "custom-view-item", Ee(Ae(be(t))), void 0, !0)
|
|
212
248
|
]),
|
|
213
|
-
empty:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
], 64)) : (n(),
|
|
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:
|
|
219
|
-
(n(!0),
|
|
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),
|
|
222
|
-
|
|
257
|
+
}, { ref_for: !0 }, t), ze({ _: 2 }, [
|
|
258
|
+
q(t.type) ? {
|
|
223
259
|
name: "default",
|
|
224
|
-
fn:
|
|
225
|
-
|
|
226
|
-
t.render ? (n(),
|
|
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
|
-
},
|
|
230
|
-
_index:
|
|
231
|
-
}), null, 16, ["_index"])) : (n(),
|
|
232
|
-
|
|
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
|
-
|
|
274
|
+
q(t.type) ? {
|
|
239
275
|
name: "header",
|
|
240
|
-
fn:
|
|
241
|
-
|
|
242
|
-
t.headerRender ? (n(),
|
|
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
|
-
},
|
|
246
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
"current-page":
|
|
259
|
-
"onUpdate:currentPage": a[3] || (a[3] = (t) =>
|
|
260
|
-
"page-size":
|
|
261
|
-
"onUpdate:pageSize": a[4] || (a[4] = (t) =>
|
|
262
|
-
"page-sizes":
|
|
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:
|
|
266
|
-
total:
|
|
267
|
-
onSizeChange:
|
|
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
|
-
[
|
|
306
|
+
[Ne, r.showPager]
|
|
271
307
|
])
|
|
272
|
-
]));
|
|
308
|
+
], 2));
|
|
273
309
|
}
|
|
274
310
|
});
|
|
275
311
|
export {
|
|
276
|
-
|
|
312
|
+
gt as default
|
|
277
313
|
};
|
|
@@ -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
|
|
4
|
-
const m = /* @__PURE__ */
|
|
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
|
};
|