zxt-table 0.6.2 → 0.6.5
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/dist/zxt-table.css +1 -1
- package/dist/zxt-table.es.js +437 -450
- package/dist/zxt-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/zxt-table.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createElementBlock as m, openBlock as i, normalizeClass as ue, renderSlot as T, defineComponent as
|
|
2
|
-
import { ElPagination as Qe, ElLink as Xe, ElCheckbox as Ye, ElSelect as et, ElOption as tt, ElInput as at, ElTableColumn as nt, ElTable as ot } from "element-plus";
|
|
3
|
-
const
|
|
1
|
+
import { createElementBlock as m, openBlock as i, normalizeClass as ue, renderSlot as T, defineComponent as b, createVNode as F, ref as k, watch as X, resolveComponent as S, createBlock as V, h as K, inject as je, computed as w, mergeProps as O, withCtx as _, Fragment as L, renderList as M, createSlots as Y, resolveDynamicComponent as be, createTextVNode as E, toDisplayString as ee, useSlots as Be, provide as Ie, onMounted as Le, nextTick as Ne, resolveDirective as Ue, normalizeStyle as qe, withDirectives as We, createCommentVNode as W, createElementVNode as y, reactive as Ge, toHandlers as Je, withModifiers as Te, useAttrs as Ke, normalizeProps as Me, guardReactiveProps as Oe } from "vue";
|
|
2
|
+
import { ElPagination as Qe, ElLink as Xe, ElCheckbox as Ye, ElSelect as et, ElOption as tt, ElInput as at, ElTableColumn as nt, ElTable as ot, ElIcon as lt, ElDropdownMenu as rt, ElDropdownItem as st, ElDropdown as it, ElButton as ut } from "element-plus";
|
|
3
|
+
const G = (e, t) => {
|
|
4
4
|
const a = e.__vccOpts || e;
|
|
5
|
-
for (const [
|
|
6
|
-
a[
|
|
5
|
+
for (const [r, u] of t)
|
|
6
|
+
a[r] = u;
|
|
7
7
|
return a;
|
|
8
|
-
},
|
|
8
|
+
}, dt = {
|
|
9
9
|
name: "MyButton",
|
|
10
10
|
props: {
|
|
11
11
|
type: {
|
|
@@ -21,26 +21,26 @@ const W = (e, t) => {
|
|
|
21
21
|
emits: ["click"],
|
|
22
22
|
setup(e, { emit: t }) {
|
|
23
23
|
return {
|
|
24
|
-
handleClick: (
|
|
25
|
-
t("click",
|
|
24
|
+
handleClick: (r) => {
|
|
25
|
+
t("click", r);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
},
|
|
30
|
-
function
|
|
29
|
+
}, ct = ["disabled"];
|
|
30
|
+
function pt(e, t, a, r, u, d) {
|
|
31
31
|
return i(), m("button", {
|
|
32
32
|
class: ue(["my-button", [`my-button--${a.type}`, { "is-disabled": a.disabled }]]),
|
|
33
33
|
disabled: a.disabled,
|
|
34
|
-
onClick: t[0] || (t[0] = (...l) =>
|
|
34
|
+
onClick: t[0] || (t[0] = (...l) => r.handleClick && r.handleClick(...l))
|
|
35
35
|
}, [
|
|
36
36
|
T(e.$slots, "default", {}, void 0, !0)
|
|
37
|
-
], 10,
|
|
37
|
+
], 10, ct);
|
|
38
38
|
}
|
|
39
|
-
const te = /* @__PURE__ */
|
|
39
|
+
const te = /* @__PURE__ */ G(dt, [["render", pt], ["__scopeId", "data-v-4480e77d"]]);
|
|
40
40
|
te.install = function(e) {
|
|
41
41
|
e.component(te.name, te);
|
|
42
42
|
};
|
|
43
|
-
const ae = /* @__PURE__ */
|
|
43
|
+
const ae = /* @__PURE__ */ b({
|
|
44
44
|
name: "JsxButton",
|
|
45
45
|
props: {
|
|
46
46
|
type: {
|
|
@@ -58,22 +58,22 @@ const ae = /* @__PURE__ */ y({
|
|
|
58
58
|
emit: t,
|
|
59
59
|
slots: a
|
|
60
60
|
}) {
|
|
61
|
-
const
|
|
61
|
+
const r = (u) => {
|
|
62
62
|
e.disabled || t("click", u);
|
|
63
63
|
};
|
|
64
|
-
return () =>
|
|
64
|
+
return () => F("button", {
|
|
65
65
|
class: ["jsx-button", `jsx-button--${e.type}`, {
|
|
66
66
|
"is-disabled": e.disabled
|
|
67
67
|
}],
|
|
68
68
|
disabled: e.disabled,
|
|
69
|
-
onClick:
|
|
69
|
+
onClick: r
|
|
70
70
|
}, [a.default?.()]);
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
ae.install = function(e) {
|
|
74
74
|
e.component(ae.name, ae);
|
|
75
75
|
};
|
|
76
|
-
const
|
|
76
|
+
const ft = b({
|
|
77
77
|
name: "ZxtPagination",
|
|
78
78
|
components: { ElPagination: Qe },
|
|
79
79
|
props: {
|
|
@@ -93,7 +93,7 @@ const it = y({
|
|
|
93
93
|
},
|
|
94
94
|
emits: ["update:modelValue", "update:pageSize", "page-change", "size-change"],
|
|
95
95
|
setup(e, { emit: t }) {
|
|
96
|
-
const a = k(e.modelValue),
|
|
96
|
+
const a = k(e.modelValue), r = k(e.pageSize);
|
|
97
97
|
return X(
|
|
98
98
|
() => e.modelValue,
|
|
99
99
|
(l) => {
|
|
@@ -102,21 +102,21 @@ const it = y({
|
|
|
102
102
|
), X(
|
|
103
103
|
() => e.pageSize,
|
|
104
104
|
(l) => {
|
|
105
|
-
|
|
105
|
+
r.value = l;
|
|
106
106
|
}
|
|
107
107
|
), {
|
|
108
108
|
currentPage: a,
|
|
109
|
-
pageSize:
|
|
109
|
+
pageSize: r,
|
|
110
110
|
handleSizeChange: (l) => {
|
|
111
|
-
|
|
111
|
+
r.value = l, a.value = 1, t("update:pageSize", l), t("size-change", { page: a.value, size: l });
|
|
112
112
|
},
|
|
113
113
|
handleCurrentChange: (l) => {
|
|
114
|
-
a.value = l, t("update:modelValue", l), t("page-change", { page: l, size:
|
|
114
|
+
a.value = l, t("update:modelValue", l), t("page-change", { page: l, size: r.value });
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
function
|
|
119
|
+
function mt(e, t, a, r, u, d) {
|
|
120
120
|
const l = S("el-pagination");
|
|
121
121
|
return i(), V(l, {
|
|
122
122
|
"current-page": e.currentPage,
|
|
@@ -131,31 +131,31 @@ function ut(e, t, a, s, u, d) {
|
|
|
131
131
|
onCurrentChange: e.handleCurrentChange
|
|
132
132
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout", "onSizeChange", "onCurrentChange"]);
|
|
133
133
|
}
|
|
134
|
-
const Q = /* @__PURE__ */
|
|
134
|
+
const Q = /* @__PURE__ */ G(ft, [["render", mt], ["__scopeId", "data-v-497aa44d"]]), ne = {
|
|
135
135
|
default: ({ cellValue: e }) => e ?? "",
|
|
136
|
-
input: ({ cellValue: e, row: t, column: a, updateRow:
|
|
136
|
+
input: ({ cellValue: e, row: t, column: a, updateRow: r }) => K(at, {
|
|
137
137
|
modelValue: e,
|
|
138
138
|
size: "small",
|
|
139
|
-
onInput: (u) =>
|
|
139
|
+
onInput: (u) => r({ ...t, [a.property]: u })
|
|
140
140
|
}),
|
|
141
|
-
select: ({ cellValue: e, row: t, column: a, updateRow:
|
|
141
|
+
select: ({ cellValue: e, row: t, column: a, updateRow: r, options: u = [] }) => K(
|
|
142
142
|
et,
|
|
143
143
|
{
|
|
144
144
|
modelValue: e,
|
|
145
145
|
size: "small",
|
|
146
|
-
onChange: (d) =>
|
|
146
|
+
onChange: (d) => r({ ...t, [a.property]: d })
|
|
147
147
|
},
|
|
148
148
|
() => u.map(
|
|
149
149
|
(d) => K(tt, { label: d.label, value: d.value, key: d.value })
|
|
150
150
|
)
|
|
151
151
|
),
|
|
152
|
-
checkbox: ({ cellValue: e, row: t, column: a, updateRow:
|
|
152
|
+
checkbox: ({ cellValue: e, row: t, column: a, updateRow: r }) => K(Ye, {
|
|
153
153
|
modelValue: !!e,
|
|
154
|
-
onChange: (u) =>
|
|
154
|
+
onChange: (u) => r({ ...t, [a.property]: u })
|
|
155
155
|
}),
|
|
156
156
|
link: ({ cellValue: e, href: t, target: a = "_blank" }) => K(Xe, { href: t, target: a }, () => e)
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function gt(e, t) {
|
|
159
159
|
if (!e) return null;
|
|
160
160
|
if (typeof e == "string") {
|
|
161
161
|
const a = ne[e];
|
|
@@ -164,20 +164,20 @@ function dt(e, t) {
|
|
|
164
164
|
if (typeof e == "function")
|
|
165
165
|
return e(t);
|
|
166
166
|
if (typeof e == "object" && !Array.isArray(e)) {
|
|
167
|
-
const { name: a, props:
|
|
167
|
+
const { name: a, props: r = {}, attrs: u = {}, events: d = {}, content: l } = e;
|
|
168
168
|
return typeof a == "string" && ne[a] ? ne[a]({
|
|
169
169
|
...t,
|
|
170
|
-
...
|
|
170
|
+
...r,
|
|
171
171
|
...u,
|
|
172
172
|
...d
|
|
173
|
-
}) : typeof a == "object" || typeof a == "function" ? K(a, { ...
|
|
173
|
+
}) : typeof a == "object" || typeof a == "function" ? K(a, { ...r, ...u, ...d }, l) : (console.warn("[ZxtTable] cellRender 对象缺少有效的 name 字段"), t.cellValue ?? "");
|
|
174
174
|
}
|
|
175
175
|
return t.cellValue ?? "";
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function ht(e, t) {
|
|
178
178
|
ne[e] && console.warn(`[ZxtTable] 内置渲染器 ${e} 已被覆盖`), ne[e] = t;
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const vt = b({
|
|
181
181
|
name: "ZxtTableColumn",
|
|
182
182
|
components: { ElTableColumn: nt },
|
|
183
183
|
props: {
|
|
@@ -195,11 +195,11 @@ const pt = y({
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
setup(e) {
|
|
198
|
-
const t =
|
|
198
|
+
const t = je("updateRow", () => {
|
|
199
199
|
}), a = (l) => {
|
|
200
200
|
const { currentPage: c, pageSize: g } = e;
|
|
201
201
|
return (c - 1) * g + l + 1;
|
|
202
|
-
},
|
|
202
|
+
}, r = w(() => {
|
|
203
203
|
const l = e.column;
|
|
204
204
|
return {
|
|
205
205
|
...l,
|
|
@@ -208,86 +208,86 @@ const pt = y({
|
|
|
208
208
|
label: l.label ?? l.title
|
|
209
209
|
// 优先使用 label,兼容 title
|
|
210
210
|
};
|
|
211
|
-
}), u =
|
|
212
|
-
const { children: l, ...c } =
|
|
211
|
+
}), u = w(() => {
|
|
212
|
+
const { children: l, ...c } = r.value;
|
|
213
213
|
return c;
|
|
214
214
|
});
|
|
215
215
|
return {
|
|
216
|
-
normalizedColumn:
|
|
216
|
+
normalizedColumn: r,
|
|
217
217
|
columnProps: u,
|
|
218
218
|
renderCell: (l) => {
|
|
219
|
-
const c =
|
|
220
|
-
return
|
|
219
|
+
const c = r.value, g = l.row[c.prop], z = g ?? c.defaultValue ?? "";
|
|
220
|
+
return gt(c.cellRender, {
|
|
221
221
|
row: l.row,
|
|
222
222
|
column: c,
|
|
223
223
|
rowIndex: l.$index,
|
|
224
224
|
cellValue: z,
|
|
225
|
-
updateRow: (
|
|
225
|
+
updateRow: (p) => t(p, l.$index)
|
|
226
226
|
});
|
|
227
227
|
},
|
|
228
228
|
defaultIndexMethod: a
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
|
-
function
|
|
232
|
+
function Ct(e, t, a, r, u, d) {
|
|
233
233
|
const l = S("ZxtTableColumn", !0), c = S("el-table-column");
|
|
234
|
-
return e.normalizedColumn.children && e.normalizedColumn.children.length ? (i(), V(c,
|
|
234
|
+
return e.normalizedColumn.children && e.normalizedColumn.children.length ? (i(), V(c, O({ key: 0 }, e.columnProps, {
|
|
235
235
|
key: e.normalizedColumn.prop + "-group"
|
|
236
236
|
}), {
|
|
237
|
-
default:
|
|
238
|
-
(i(!0), m(
|
|
237
|
+
default: _(() => [
|
|
238
|
+
(i(!0), m(L, null, M(e.normalizedColumn.children, (g, z) => (i(), V(l, {
|
|
239
239
|
key: z,
|
|
240
240
|
column: g,
|
|
241
241
|
"current-page": e.currentPage,
|
|
242
242
|
"page-size": e.pageSize
|
|
243
243
|
}, Y({ _: 2 }, [
|
|
244
|
-
|
|
244
|
+
M(e.$slots, (p, n) => ({
|
|
245
245
|
name: n,
|
|
246
|
-
fn:
|
|
247
|
-
T(e.$slots, n,
|
|
246
|
+
fn: _((v) => [
|
|
247
|
+
T(e.$slots, n, O({ ref_for: !0 }, v))
|
|
248
248
|
])
|
|
249
249
|
}))
|
|
250
250
|
]), 1032, ["column", "current-page", "page-size"]))), 128))
|
|
251
251
|
]),
|
|
252
252
|
_: 3
|
|
253
|
-
}, 16)) : (i(), V(c,
|
|
253
|
+
}, 16)) : (i(), V(c, O({ key: 1 }, e.columnProps, {
|
|
254
254
|
key: e.normalizedColumn.prop,
|
|
255
255
|
index: e.normalizedColumn.indexMethod || e.defaultIndexMethod
|
|
256
256
|
}), Y({ _: 2 }, [
|
|
257
257
|
e.normalizedColumn.headerSlot ? {
|
|
258
258
|
name: "header",
|
|
259
|
-
fn:
|
|
260
|
-
T(e.$slots, e.normalizedColumn.headerSlot,
|
|
259
|
+
fn: _((g) => [
|
|
260
|
+
T(e.$slots, e.normalizedColumn.headerSlot, O({ column: e.normalizedColumn }, g))
|
|
261
261
|
]),
|
|
262
262
|
key: "0"
|
|
263
263
|
} : void 0,
|
|
264
264
|
!["selection", "index"].includes(e.normalizedColumn.type) && (e.normalizedColumn.type !== "expand" || e.normalizedColumn.slot) ? {
|
|
265
265
|
name: "default",
|
|
266
|
-
fn:
|
|
266
|
+
fn: _((g) => [
|
|
267
267
|
e.normalizedColumn.slot ? T(e.$slots, e.normalizedColumn.slot, {
|
|
268
268
|
key: 0,
|
|
269
269
|
row: g.row,
|
|
270
270
|
index: g.$index,
|
|
271
271
|
column: e.normalizedColumn
|
|
272
|
-
}) : e.normalizedColumn.cellRender ? (i(), V(
|
|
273
|
-
|
|
272
|
+
}) : e.normalizedColumn.cellRender ? (i(), V(be(e.renderCell(g)), { key: 1 })) : e.normalizedColumn.formatter ? (i(), m(L, { key: 2 }, [
|
|
273
|
+
E(ee(e.normalizedColumn.formatter(
|
|
274
274
|
g.row,
|
|
275
275
|
e.normalizedColumn,
|
|
276
276
|
g.row[e.normalizedColumn.prop],
|
|
277
277
|
g.$index
|
|
278
278
|
)), 1)
|
|
279
|
-
], 64)) : (i(), m(
|
|
280
|
-
|
|
279
|
+
], 64)) : (i(), m(L, { key: 3 }, [
|
|
280
|
+
E(ee(g.row[e.normalizedColumn.prop]), 1)
|
|
281
281
|
], 64))
|
|
282
282
|
]),
|
|
283
283
|
key: "1"
|
|
284
284
|
} : void 0
|
|
285
285
|
]), 1040, ["index"]));
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const wt = /* @__PURE__ */ G(vt, [["render", Ct]]), _t = /* @__PURE__ */ new Set(["append", "empty"]), yt = b({
|
|
288
288
|
name: "ZxtTable",
|
|
289
289
|
inheritAttrs: !1,
|
|
290
|
-
components: { ZxtPagination: Q, ZxtTableColumn:
|
|
290
|
+
components: { ZxtPagination: Q, ZxtTableColumn: wt, ElTable: ot },
|
|
291
291
|
props: {
|
|
292
292
|
// 表格唯一标识
|
|
293
293
|
id: { type: String, default: "" },
|
|
@@ -333,95 +333,92 @@ const mt = /* @__PURE__ */ W(pt, [["render", ft]]), gt = /* @__PURE__ */ new Set
|
|
|
333
333
|
"update:row"
|
|
334
334
|
],
|
|
335
335
|
setup(e, { emit: t }) {
|
|
336
|
-
const a =
|
|
337
|
-
X(() => e.currentPage, (
|
|
338
|
-
d.value =
|
|
339
|
-
}), X(() => e.pageSize, (
|
|
340
|
-
u.value =
|
|
336
|
+
const a = Be(), r = k(null), u = k(e.pageSize), d = k(e.currentPage), l = k(!1), c = k([]), g = k(0), z = k({ prop: "", order: "" }), p = k({}), n = k({});
|
|
337
|
+
X(() => e.currentPage, (f) => {
|
|
338
|
+
d.value = f;
|
|
339
|
+
}), X(() => e.pageSize, (f) => {
|
|
340
|
+
u.value = f;
|
|
341
341
|
});
|
|
342
|
-
const
|
|
342
|
+
const v = w(() => e.height === "full" ? { height: "100%" } : {}), s = w(() => {
|
|
343
343
|
if (e.height !== "full")
|
|
344
344
|
return e.height;
|
|
345
|
-
}),
|
|
346
|
-
() =>
|
|
347
|
-
),
|
|
345
|
+
}), C = w(() => !!e.proxyConfig), x = w(() => C.value ? g.value : e.total > 0 ? e.total : e.data.length), J = w(
|
|
346
|
+
() => C.value ? c.value : e.data
|
|
347
|
+
), R = () => {
|
|
348
348
|
Ne(() => {
|
|
349
|
-
const
|
|
349
|
+
const f = r.value?.$el?.querySelector(
|
|
350
350
|
".el-table__body-wrapper .el-scrollbar__wrap"
|
|
351
351
|
);
|
|
352
|
-
|
|
352
|
+
f && (typeof f.scrollTo == "function" ? f.scrollTo({ top: 0, left: 0 }) : (f.scrollTop = 0, f.scrollLeft = 0));
|
|
353
353
|
});
|
|
354
|
-
},
|
|
355
|
-
|
|
356
|
-
}, de = (
|
|
357
|
-
|
|
358
|
-
}, ce = ({ column:
|
|
359
|
-
z.value = { prop: $, order: I },
|
|
360
|
-
}, pe = (
|
|
361
|
-
|
|
362
|
-
},
|
|
363
|
-
if (!
|
|
354
|
+
}, j = (f) => {
|
|
355
|
+
C.value && (d.value = f.page, u.value = f.size, H()), R(), t("size-change", f);
|
|
356
|
+
}, de = (f) => {
|
|
357
|
+
C.value && (d.value = f.page, u.value = f.size, H()), R(), t("page-change", f);
|
|
358
|
+
}, ce = ({ column: f, prop: $, order: I }) => {
|
|
359
|
+
z.value = { prop: $, order: I }, C.value && H(), t("sort-change", { column: f, prop: $, order: I });
|
|
360
|
+
}, pe = (f) => {
|
|
361
|
+
p.value = f || {}, C.value && H(), t("filter-change", p.value);
|
|
362
|
+
}, H = async (f) => {
|
|
363
|
+
if (!C.value) return;
|
|
364
364
|
const $ = e.proxyConfig || {}, I = $.ajax?.query;
|
|
365
365
|
if (typeof I != "function") return;
|
|
366
|
-
const N = $.props || {},
|
|
366
|
+
const N = $.props || {}, he = N.pageField || "page";
|
|
367
367
|
N.sizeField;
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
const
|
|
371
|
-
[
|
|
372
|
-
currentPage:
|
|
373
|
-
pageSize:
|
|
368
|
+
const ve = N.sortField || "sort", Ce = N.orderField || "order", we = N.filtersField || "filters";
|
|
369
|
+
f?.formData !== void 0 ? n.value = f.formData : $._formData && (n.value = $._formData);
|
|
370
|
+
const _e = $.params || {}, U = {
|
|
371
|
+
[he]: {
|
|
372
|
+
currentPage: f?.page ?? d.value,
|
|
373
|
+
pageSize: f?.pageSize ?? u.value
|
|
374
374
|
},
|
|
375
375
|
form: n.value,
|
|
376
|
-
...
|
|
376
|
+
..._e
|
|
377
377
|
};
|
|
378
|
-
z.value?.prop && (U[
|
|
378
|
+
z.value?.prop && (U[ve] = z.value.prop, U[Ce] = z.value.order), p.value && Object.keys(p.value).length && (U[we] = p.value), l.value = !0;
|
|
379
379
|
try {
|
|
380
|
-
const
|
|
381
|
-
let
|
|
380
|
+
const A = await I(U), P = $.response || {}, o = P.listField || "list", h = P.totalField || "total", D = P.transform;
|
|
381
|
+
let Z = [], re = 0;
|
|
382
382
|
if (typeof D == "function") {
|
|
383
|
-
const ye = D(
|
|
384
|
-
|
|
385
|
-
} else
|
|
386
|
-
c.value = Array.isArray(
|
|
383
|
+
const ye = D(A);
|
|
384
|
+
Z = ye?.list ?? [], re = ye?.total ?? 0;
|
|
385
|
+
} else A && typeof A == "object" && (Z = A?.[o] ?? A?.data ?? [], re = A?.[h] ?? A?.total ?? 0);
|
|
386
|
+
c.value = Array.isArray(Z) ? Z : [], g.value = Number(re) || 0, t("loaded", {
|
|
387
387
|
data: c.value,
|
|
388
388
|
total: g.value,
|
|
389
389
|
payload: U
|
|
390
390
|
});
|
|
391
|
-
} catch (
|
|
392
|
-
t("load-error",
|
|
391
|
+
} catch (A) {
|
|
392
|
+
t("load-error", A);
|
|
393
393
|
} finally {
|
|
394
394
|
l.value = !1;
|
|
395
395
|
}
|
|
396
|
-
}, oe = (
|
|
397
|
-
|
|
396
|
+
}, oe = (f, $) => {
|
|
397
|
+
C.value ? c.value.splice($, 1, f) : t("update:row", { index: $, row: f });
|
|
398
398
|
};
|
|
399
|
-
Ie("updateRow", oe),
|
|
400
|
-
|
|
401
|
-
});
|
|
402
|
-
const fe = () => s.value, me = () => s.value?.getSelectionRows?.() || [], ge = (p) => Z(p), le = () => F(), he = _(() => {
|
|
403
|
-
const p = {};
|
|
404
|
-
for (const $ in a)
|
|
405
|
-
gt.has($) || (p[$] = a[$]);
|
|
406
|
-
return p;
|
|
399
|
+
Ie("updateRow", oe), Le(() => {
|
|
400
|
+
C.value && e.autoLoad && H();
|
|
407
401
|
});
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
402
|
+
const fe = () => r.value, me = () => r.value?.getSelectionRows?.() || [], ge = (f) => H(f), le = () => R();
|
|
403
|
+
return {
|
|
404
|
+
columnSlots: w(() => {
|
|
405
|
+
const f = {};
|
|
406
|
+
for (const $ in a)
|
|
407
|
+
_t.has($) || (f[$] = a[$]);
|
|
408
|
+
return f;
|
|
409
|
+
}),
|
|
410
|
+
tableRef: r,
|
|
411
|
+
containerStyle: v,
|
|
412
|
+
tableHeight: s,
|
|
416
413
|
getTableRef: fe,
|
|
417
414
|
pageSize: u,
|
|
418
415
|
currentPage: d,
|
|
419
416
|
loading: l,
|
|
420
417
|
renderData: J,
|
|
421
|
-
total:
|
|
422
|
-
pageSizes:
|
|
423
|
-
paginationLayout:
|
|
424
|
-
handleSizeChange:
|
|
418
|
+
total: x,
|
|
419
|
+
pageSizes: w(() => e.pageSizes),
|
|
420
|
+
paginationLayout: w(() => e.paginationLayout),
|
|
421
|
+
handleSizeChange: j,
|
|
425
422
|
handlePageChange: de,
|
|
426
423
|
handleSortChange: ce,
|
|
427
424
|
handleFilterChange: pe,
|
|
@@ -431,17 +428,17 @@ const mt = /* @__PURE__ */ W(pt, [["render", ft]]), gt = /* @__PURE__ */ new Set
|
|
|
431
428
|
resetScrollTop: le
|
|
432
429
|
};
|
|
433
430
|
}
|
|
434
|
-
}),
|
|
431
|
+
}), bt = {
|
|
435
432
|
key: 0,
|
|
436
433
|
class: "zxt-table-footer"
|
|
437
434
|
};
|
|
438
|
-
function
|
|
435
|
+
function zt(e, t, a, r, u, d) {
|
|
439
436
|
const l = S("ZxtTableColumn"), c = S("el-table"), g = S("ZxtPagination"), z = Ue("loading");
|
|
440
437
|
return i(), m("div", {
|
|
441
438
|
class: ue(["zxt-table-container", { "zxt-table-container--full": e.height === "full" }]),
|
|
442
439
|
style: qe(e.containerStyle)
|
|
443
440
|
}, [
|
|
444
|
-
|
|
441
|
+
We((i(), V(c, O({
|
|
445
442
|
ref: "tableRef",
|
|
446
443
|
data: e.renderData,
|
|
447
444
|
height: e.tableHeight
|
|
@@ -450,17 +447,17 @@ function Ct(e, t, a, s, u, d) {
|
|
|
450
447
|
onSortChange: e.handleSortChange,
|
|
451
448
|
onFilterChange: e.handleFilterChange
|
|
452
449
|
}), Y({
|
|
453
|
-
default:
|
|
454
|
-
(i(!0), m(
|
|
450
|
+
default: _(() => [
|
|
451
|
+
(i(!0), m(L, null, M(e.columns, (p, n) => (i(), V(l, {
|
|
455
452
|
key: n,
|
|
456
|
-
column:
|
|
453
|
+
column: p,
|
|
457
454
|
"current-page": e.currentPage,
|
|
458
455
|
"page-size": e.pageSize
|
|
459
456
|
}, Y({ _: 2 }, [
|
|
460
|
-
|
|
461
|
-
name:
|
|
462
|
-
fn:
|
|
463
|
-
T(e.$slots,
|
|
457
|
+
M(e.columnSlots, (v, s) => ({
|
|
458
|
+
name: s,
|
|
459
|
+
fn: _((C) => [
|
|
460
|
+
T(e.$slots, s, O({ ref_for: !0 }, C), void 0, !0)
|
|
464
461
|
])
|
|
465
462
|
}))
|
|
466
463
|
]), 1032, ["column", "current-page", "page-size"]))), 128))
|
|
@@ -469,7 +466,7 @@ function Ct(e, t, a, s, u, d) {
|
|
|
469
466
|
}, [
|
|
470
467
|
e.$slots.empty ? {
|
|
471
468
|
name: "empty",
|
|
472
|
-
fn:
|
|
469
|
+
fn: _(() => [
|
|
473
470
|
T(e.$slots, "empty", {}, void 0, !0)
|
|
474
471
|
]),
|
|
475
472
|
key: "0"
|
|
@@ -477,24 +474,24 @@ function Ct(e, t, a, s, u, d) {
|
|
|
477
474
|
]), 1040, ["data", "height", "id", "onSortChange", "onFilterChange"])), [
|
|
478
475
|
[z, e.loading]
|
|
479
476
|
]),
|
|
480
|
-
e.$slots.append ? (i(), m("div",
|
|
477
|
+
e.$slots.append ? (i(), m("div", bt, [
|
|
481
478
|
T(e.$slots, "append", {}, void 0, !0)
|
|
482
|
-
])) :
|
|
479
|
+
])) : W("", !0),
|
|
483
480
|
e.pageable ? (i(), V(g, {
|
|
484
481
|
key: 1,
|
|
485
482
|
"model-value": e.currentPage,
|
|
486
483
|
"page-size": e.pageSize,
|
|
487
|
-
"onUpdate:pageSize": t[0] || (t[0] = (
|
|
484
|
+
"onUpdate:pageSize": t[0] || (t[0] = (p) => e.pageSize = p),
|
|
488
485
|
"page-sizes": e.pageSizes,
|
|
489
486
|
total: e.total,
|
|
490
487
|
layout: e.paginationLayout,
|
|
491
488
|
onPageChange: e.handlePageChange,
|
|
492
489
|
onSizeChange: e.handleSizeChange
|
|
493
|
-
}, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) :
|
|
490
|
+
}, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) : W("", !0)
|
|
494
491
|
], 6);
|
|
495
492
|
}
|
|
496
|
-
const
|
|
497
|
-
class
|
|
493
|
+
const B = /* @__PURE__ */ G(yt, [["render", zt], ["__scopeId", "data-v-cfbfc1e6"]]), q = /* @__PURE__ */ new Map();
|
|
494
|
+
class St {
|
|
498
495
|
/**
|
|
499
496
|
* 注册自定义渲染器
|
|
500
497
|
* @param {String} name - 渲染器名称
|
|
@@ -547,13 +544,13 @@ class _t {
|
|
|
547
544
|
q.clear();
|
|
548
545
|
}
|
|
549
546
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
547
|
+
const ze = new St();
|
|
548
|
+
function kt(e, t, a = {}) {
|
|
552
549
|
if (!e || !e.itemRender)
|
|
553
550
|
return null;
|
|
554
|
-
const { name:
|
|
555
|
-
if (
|
|
556
|
-
const u =
|
|
551
|
+
const { name: r } = e.itemRender;
|
|
552
|
+
if (r && ze.has(r)) {
|
|
553
|
+
const u = ze.get(r);
|
|
557
554
|
if (typeof u.renderItemContent == "function") {
|
|
558
555
|
const d = {
|
|
559
556
|
data: t,
|
|
@@ -564,18 +561,18 @@ function wt(e, t, a = {}) {
|
|
|
564
561
|
try {
|
|
565
562
|
return u.renderItemContent(a, d);
|
|
566
563
|
} catch (l) {
|
|
567
|
-
return console.error(`[ZxtTable] 渲染器 "${
|
|
564
|
+
return console.error(`[ZxtTable] 渲染器 "${r}" 执行出错:`, l), null;
|
|
568
565
|
}
|
|
569
566
|
}
|
|
570
567
|
}
|
|
571
568
|
return null;
|
|
572
569
|
}
|
|
573
|
-
|
|
574
|
-
e.component(
|
|
570
|
+
B.install = function(e) {
|
|
571
|
+
e.component(B.name, B);
|
|
575
572
|
};
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
var
|
|
573
|
+
B.registerRenderer = ht;
|
|
574
|
+
B.renderer = ze;
|
|
575
|
+
var $t = /* @__PURE__ */ b({
|
|
579
576
|
name: "ArrowDown",
|
|
580
577
|
__name: "arrow-down",
|
|
581
578
|
setup(e) {
|
|
@@ -583,13 +580,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
583
580
|
xmlns: "http://www.w3.org/2000/svg",
|
|
584
581
|
viewBox: "0 0 1024 1024"
|
|
585
582
|
}, [
|
|
586
|
-
|
|
583
|
+
y("path", {
|
|
587
584
|
fill: "currentColor",
|
|
588
585
|
d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
|
|
589
586
|
})
|
|
590
587
|
]));
|
|
591
588
|
}
|
|
592
|
-
}),
|
|
589
|
+
}), xe = $t, Vt = /* @__PURE__ */ b({
|
|
593
590
|
name: "Check",
|
|
594
591
|
__name: "check",
|
|
595
592
|
setup(e) {
|
|
@@ -597,13 +594,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
597
594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
598
595
|
viewBox: "0 0 1024 1024"
|
|
599
596
|
}, [
|
|
600
|
-
|
|
597
|
+
y("path", {
|
|
601
598
|
fill: "currentColor",
|
|
602
599
|
d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
|
|
603
600
|
})
|
|
604
601
|
]));
|
|
605
602
|
}
|
|
606
|
-
}),
|
|
603
|
+
}), Pt = Vt, Dt = /* @__PURE__ */ b({
|
|
607
604
|
name: "Close",
|
|
608
605
|
__name: "close",
|
|
609
606
|
setup(e) {
|
|
@@ -611,13 +608,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
611
608
|
xmlns: "http://www.w3.org/2000/svg",
|
|
612
609
|
viewBox: "0 0 1024 1024"
|
|
613
610
|
}, [
|
|
614
|
-
|
|
611
|
+
y("path", {
|
|
615
612
|
fill: "currentColor",
|
|
616
613
|
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
617
614
|
})
|
|
618
615
|
]));
|
|
619
616
|
}
|
|
620
|
-
}),
|
|
617
|
+
}), Ft = Dt, Rt = /* @__PURE__ */ b({
|
|
621
618
|
name: "CopyDocument",
|
|
622
619
|
__name: "copy-document",
|
|
623
620
|
setup(e) {
|
|
@@ -625,17 +622,17 @@ var bt = /* @__PURE__ */ y({
|
|
|
625
622
|
xmlns: "http://www.w3.org/2000/svg",
|
|
626
623
|
viewBox: "0 0 1024 1024"
|
|
627
624
|
}, [
|
|
628
|
-
|
|
625
|
+
y("path", {
|
|
629
626
|
fill: "currentColor",
|
|
630
627
|
d: "M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"
|
|
631
628
|
}),
|
|
632
|
-
|
|
629
|
+
y("path", {
|
|
633
630
|
fill: "currentColor",
|
|
634
631
|
d: "M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"
|
|
635
632
|
})
|
|
636
633
|
]));
|
|
637
634
|
}
|
|
638
|
-
}),
|
|
635
|
+
}), At = Rt, Tt = /* @__PURE__ */ b({
|
|
639
636
|
name: "Delete",
|
|
640
637
|
__name: "delete",
|
|
641
638
|
setup(e) {
|
|
@@ -643,13 +640,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
643
640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
644
641
|
viewBox: "0 0 1024 1024"
|
|
645
642
|
}, [
|
|
646
|
-
|
|
643
|
+
y("path", {
|
|
647
644
|
fill: "currentColor",
|
|
648
645
|
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
649
646
|
})
|
|
650
647
|
]));
|
|
651
648
|
}
|
|
652
|
-
}),
|
|
649
|
+
}), Se = Tt, Mt = /* @__PURE__ */ b({
|
|
653
650
|
name: "Document",
|
|
654
651
|
__name: "document",
|
|
655
652
|
setup(e) {
|
|
@@ -657,13 +654,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
657
654
|
xmlns: "http://www.w3.org/2000/svg",
|
|
658
655
|
viewBox: "0 0 1024 1024"
|
|
659
656
|
}, [
|
|
660
|
-
|
|
657
|
+
y("path", {
|
|
661
658
|
fill: "currentColor",
|
|
662
659
|
d: "M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"
|
|
663
660
|
})
|
|
664
661
|
]));
|
|
665
662
|
}
|
|
666
|
-
}),
|
|
663
|
+
}), Ot = Mt, Bt = /* @__PURE__ */ b({
|
|
667
664
|
name: "Download",
|
|
668
665
|
__name: "download",
|
|
669
666
|
setup(e) {
|
|
@@ -671,13 +668,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
671
668
|
xmlns: "http://www.w3.org/2000/svg",
|
|
672
669
|
viewBox: "0 0 1024 1024"
|
|
673
670
|
}, [
|
|
674
|
-
|
|
671
|
+
y("path", {
|
|
675
672
|
fill: "currentColor",
|
|
676
673
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"
|
|
677
674
|
})
|
|
678
675
|
]));
|
|
679
676
|
}
|
|
680
|
-
}),
|
|
677
|
+
}), ke = Bt, Lt = /* @__PURE__ */ b({
|
|
681
678
|
name: "Edit",
|
|
682
679
|
__name: "edit",
|
|
683
680
|
setup(e) {
|
|
@@ -685,17 +682,17 @@ var bt = /* @__PURE__ */ y({
|
|
|
685
682
|
xmlns: "http://www.w3.org/2000/svg",
|
|
686
683
|
viewBox: "0 0 1024 1024"
|
|
687
684
|
}, [
|
|
688
|
-
|
|
685
|
+
y("path", {
|
|
689
686
|
fill: "currentColor",
|
|
690
687
|
d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
|
|
691
688
|
}),
|
|
692
|
-
|
|
689
|
+
y("path", {
|
|
693
690
|
fill: "currentColor",
|
|
694
691
|
d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
|
|
695
692
|
})
|
|
696
693
|
]));
|
|
697
694
|
}
|
|
698
|
-
}),
|
|
695
|
+
}), $e = Lt, xt = /* @__PURE__ */ b({
|
|
699
696
|
name: "Lock",
|
|
700
697
|
__name: "lock",
|
|
701
698
|
setup(e) {
|
|
@@ -703,17 +700,17 @@ var bt = /* @__PURE__ */ y({
|
|
|
703
700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
704
701
|
viewBox: "0 0 1024 1024"
|
|
705
702
|
}, [
|
|
706
|
-
|
|
703
|
+
y("path", {
|
|
707
704
|
fill: "currentColor",
|
|
708
705
|
d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
|
|
709
706
|
}),
|
|
710
|
-
|
|
707
|
+
y("path", {
|
|
711
708
|
fill: "currentColor",
|
|
712
709
|
d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"
|
|
713
710
|
})
|
|
714
711
|
]));
|
|
715
712
|
}
|
|
716
|
-
}),
|
|
713
|
+
}), Ht = xt, Zt = /* @__PURE__ */ b({
|
|
717
714
|
name: "Plus",
|
|
718
715
|
__name: "plus",
|
|
719
716
|
setup(e) {
|
|
@@ -721,13 +718,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
721
718
|
xmlns: "http://www.w3.org/2000/svg",
|
|
722
719
|
viewBox: "0 0 1024 1024"
|
|
723
720
|
}, [
|
|
724
|
-
|
|
721
|
+
y("path", {
|
|
725
722
|
fill: "currentColor",
|
|
726
723
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
727
724
|
})
|
|
728
725
|
]));
|
|
729
726
|
}
|
|
730
|
-
}),
|
|
727
|
+
}), Ve = Zt, Et = /* @__PURE__ */ b({
|
|
731
728
|
name: "Refresh",
|
|
732
729
|
__name: "refresh",
|
|
733
730
|
setup(e) {
|
|
@@ -735,13 +732,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
735
732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
736
733
|
viewBox: "0 0 1024 1024"
|
|
737
734
|
}, [
|
|
738
|
-
|
|
735
|
+
y("path", {
|
|
739
736
|
fill: "currentColor",
|
|
740
737
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
741
738
|
})
|
|
742
739
|
]));
|
|
743
740
|
}
|
|
744
|
-
}), se =
|
|
741
|
+
}), se = Et, jt = /* @__PURE__ */ b({
|
|
745
742
|
name: "Search",
|
|
746
743
|
__name: "search",
|
|
747
744
|
setup(e) {
|
|
@@ -749,13 +746,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
749
746
|
xmlns: "http://www.w3.org/2000/svg",
|
|
750
747
|
viewBox: "0 0 1024 1024"
|
|
751
748
|
}, [
|
|
752
|
-
|
|
749
|
+
y("path", {
|
|
753
750
|
fill: "currentColor",
|
|
754
751
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
755
752
|
})
|
|
756
753
|
]));
|
|
757
754
|
}
|
|
758
|
-
}), ie =
|
|
755
|
+
}), ie = jt, It = /* @__PURE__ */ b({
|
|
759
756
|
name: "Setting",
|
|
760
757
|
__name: "setting",
|
|
761
758
|
setup(e) {
|
|
@@ -763,13 +760,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
763
760
|
xmlns: "http://www.w3.org/2000/svg",
|
|
764
761
|
viewBox: "0 0 1024 1024"
|
|
765
762
|
}, [
|
|
766
|
-
|
|
763
|
+
y("path", {
|
|
767
764
|
fill: "currentColor",
|
|
768
765
|
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
769
766
|
})
|
|
770
767
|
]));
|
|
771
768
|
}
|
|
772
|
-
}),
|
|
769
|
+
}), Pe = It, Nt = /* @__PURE__ */ b({
|
|
773
770
|
name: "Share",
|
|
774
771
|
__name: "share",
|
|
775
772
|
setup(e) {
|
|
@@ -777,13 +774,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
777
774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
778
775
|
viewBox: "0 0 1024 1024"
|
|
779
776
|
}, [
|
|
780
|
-
|
|
777
|
+
y("path", {
|
|
781
778
|
fill: "currentColor",
|
|
782
779
|
d: "m679.872 348.8-301.76 188.608a127.8 127.8 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"
|
|
783
780
|
})
|
|
784
781
|
]));
|
|
785
782
|
}
|
|
786
|
-
}),
|
|
783
|
+
}), Ut = Nt, qt = /* @__PURE__ */ b({
|
|
787
784
|
name: "Unlock",
|
|
788
785
|
__name: "unlock",
|
|
789
786
|
setup(e) {
|
|
@@ -791,17 +788,17 @@ var bt = /* @__PURE__ */ y({
|
|
|
791
788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
792
789
|
viewBox: "0 0 1024 1024"
|
|
793
790
|
}, [
|
|
794
|
-
|
|
791
|
+
y("path", {
|
|
795
792
|
fill: "currentColor",
|
|
796
793
|
d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
|
|
797
794
|
}),
|
|
798
|
-
|
|
795
|
+
y("path", {
|
|
799
796
|
fill: "currentColor",
|
|
800
797
|
d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"
|
|
801
798
|
})
|
|
802
799
|
]));
|
|
803
800
|
}
|
|
804
|
-
}),
|
|
801
|
+
}), Wt = qt, Gt = /* @__PURE__ */ b({
|
|
805
802
|
name: "Upload",
|
|
806
803
|
__name: "upload",
|
|
807
804
|
setup(e) {
|
|
@@ -809,13 +806,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
809
806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
810
807
|
viewBox: "0 0 1024 1024"
|
|
811
808
|
}, [
|
|
812
|
-
|
|
809
|
+
y("path", {
|
|
813
810
|
fill: "currentColor",
|
|
814
811
|
d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"
|
|
815
812
|
})
|
|
816
813
|
]));
|
|
817
814
|
}
|
|
818
|
-
}),
|
|
815
|
+
}), De = Gt, Jt = /* @__PURE__ */ b({
|
|
819
816
|
name: "View",
|
|
820
817
|
__name: "view",
|
|
821
818
|
setup(e) {
|
|
@@ -823,13 +820,13 @@ var bt = /* @__PURE__ */ y({
|
|
|
823
820
|
xmlns: "http://www.w3.org/2000/svg",
|
|
824
821
|
viewBox: "0 0 1024 1024"
|
|
825
822
|
}, [
|
|
826
|
-
|
|
823
|
+
y("path", {
|
|
827
824
|
fill: "currentColor",
|
|
828
825
|
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
|
|
829
826
|
})
|
|
830
827
|
]));
|
|
831
828
|
}
|
|
832
|
-
}), Fe =
|
|
829
|
+
}), Fe = Jt, Kt = /* @__PURE__ */ b({
|
|
833
830
|
name: "Warning",
|
|
834
831
|
__name: "warning",
|
|
835
832
|
setup(e) {
|
|
@@ -837,14 +834,14 @@ var bt = /* @__PURE__ */ y({
|
|
|
837
834
|
xmlns: "http://www.w3.org/2000/svg",
|
|
838
835
|
viewBox: "0 0 1024 1024"
|
|
839
836
|
}, [
|
|
840
|
-
|
|
837
|
+
y("path", {
|
|
841
838
|
fill: "currentColor",
|
|
842
839
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
|
|
843
840
|
})
|
|
844
841
|
]));
|
|
845
842
|
}
|
|
846
|
-
}),
|
|
847
|
-
const
|
|
843
|
+
}), Qt = Kt;
|
|
844
|
+
const Xt = b({
|
|
848
845
|
name: "ZxtForm",
|
|
849
846
|
inheritAttrs: !1,
|
|
850
847
|
props: {
|
|
@@ -855,7 +852,7 @@ const Gt = y({
|
|
|
855
852
|
},
|
|
856
853
|
emits: ["submit", "reset"],
|
|
857
854
|
setup(e, { emit: t, expose: a }) {
|
|
858
|
-
const
|
|
855
|
+
const r = k(null), u = Ge({}), d = {
|
|
859
856
|
input: "el-input",
|
|
860
857
|
select: "el-select",
|
|
861
858
|
date: "el-date-picker",
|
|
@@ -863,159 +860,159 @@ const Gt = y({
|
|
|
863
860
|
datetime: "el-date-picker",
|
|
864
861
|
datetimerange: "el-date-picker",
|
|
865
862
|
cascader: "el-cascader"
|
|
866
|
-
}, l = (
|
|
867
|
-
const
|
|
863
|
+
}, l = (s) => d[s] || "el-input", c = (s) => {
|
|
864
|
+
const C = s.type || "input", x = [
|
|
868
865
|
"select",
|
|
869
866
|
"date",
|
|
870
867
|
"daterange",
|
|
871
868
|
"datetime",
|
|
872
869
|
"datetimerange",
|
|
873
870
|
"cascader"
|
|
874
|
-
].includes(
|
|
875
|
-
placeholder:
|
|
876
|
-
disabled:
|
|
871
|
+
].includes(C), J = {
|
|
872
|
+
placeholder: s.placeholder || `请${x ? "选择" : "输入"}${s.label}`,
|
|
873
|
+
disabled: s.disabled,
|
|
877
874
|
style: "width: 100%",
|
|
878
875
|
"popper-class": "zxt-form-popper"
|
|
879
876
|
};
|
|
880
|
-
let
|
|
881
|
-
switch (
|
|
877
|
+
let R = {};
|
|
878
|
+
switch (C) {
|
|
882
879
|
case "date":
|
|
883
880
|
case "daterange":
|
|
884
881
|
case "datetime":
|
|
885
882
|
case "datetimerange":
|
|
886
|
-
|
|
887
|
-
type:
|
|
888
|
-
startPlaceholder:
|
|
889
|
-
endPlaceholder:
|
|
890
|
-
format:
|
|
891
|
-
valueFormat:
|
|
883
|
+
R = {
|
|
884
|
+
type: s.dateType || C,
|
|
885
|
+
startPlaceholder: s.startPlaceholder || "开始日期",
|
|
886
|
+
endPlaceholder: s.endPlaceholder || "结束日期",
|
|
887
|
+
format: s.format,
|
|
888
|
+
valueFormat: s.valueFormat
|
|
892
889
|
};
|
|
893
890
|
break;
|
|
894
891
|
case "cascader":
|
|
895
|
-
|
|
896
|
-
options:
|
|
897
|
-
props:
|
|
898
|
-
clearable:
|
|
892
|
+
R = {
|
|
893
|
+
options: s.options,
|
|
894
|
+
props: s.cascaderProps,
|
|
895
|
+
clearable: s.clearable !== !1
|
|
899
896
|
};
|
|
900
897
|
break;
|
|
901
898
|
default:
|
|
902
|
-
|
|
899
|
+
R = {};
|
|
903
900
|
}
|
|
904
|
-
const
|
|
901
|
+
const j = {
|
|
905
902
|
...J,
|
|
906
|
-
...
|
|
903
|
+
...R
|
|
907
904
|
};
|
|
908
|
-
return "clearable" in
|
|
909
|
-
}, g =
|
|
910
|
-
...
|
|
905
|
+
return "clearable" in s && (j.clearable = s.clearable), s.props && typeof s.props == "object" && Object.assign(j, s.props), j;
|
|
906
|
+
}, g = w(() => e.formColumns.map((s) => ({
|
|
907
|
+
...s,
|
|
911
908
|
colSpan: {
|
|
912
|
-
xs:
|
|
913
|
-
sm:
|
|
914
|
-
md:
|
|
915
|
-
lg:
|
|
916
|
-
xl:
|
|
909
|
+
xs: s.xs ?? s.span ?? 24,
|
|
910
|
+
sm: s.sm ?? s.span ?? 12,
|
|
911
|
+
md: s.md ?? s.span ?? 12,
|
|
912
|
+
lg: s.lg ?? s.span ?? 12,
|
|
913
|
+
xl: s.xl ?? s.span ?? 12
|
|
917
914
|
}
|
|
918
915
|
})));
|
|
919
916
|
X(
|
|
920
917
|
() => e.initialFormData,
|
|
921
|
-
(
|
|
922
|
-
Object.keys(u).forEach((
|
|
923
|
-
delete u[
|
|
924
|
-
}), Object.assign(u,
|
|
918
|
+
(s) => {
|
|
919
|
+
Object.keys(u).forEach((C) => {
|
|
920
|
+
delete u[C];
|
|
921
|
+
}), Object.assign(u, s);
|
|
925
922
|
},
|
|
926
923
|
{ immediate: !0, deep: !0 }
|
|
927
924
|
);
|
|
928
|
-
const z =
|
|
929
|
-
const
|
|
930
|
-
return Object.keys(
|
|
931
|
-
if (
|
|
932
|
-
const
|
|
925
|
+
const z = w(() => {
|
|
926
|
+
const s = { ...e.rules };
|
|
927
|
+
return Object.keys(s).length === 0 && e.formColumns.length > 0 && e.formColumns.forEach((C) => {
|
|
928
|
+
if (C.required) {
|
|
929
|
+
const x = [
|
|
933
930
|
"select",
|
|
934
931
|
"date",
|
|
935
932
|
"daterange",
|
|
936
933
|
"datetime",
|
|
937
934
|
"datetimerange",
|
|
938
935
|
"cascader"
|
|
939
|
-
].includes(
|
|
940
|
-
|
|
936
|
+
].includes(C.type);
|
|
937
|
+
s[C.prop] = [
|
|
941
938
|
{
|
|
942
939
|
required: !0,
|
|
943
|
-
message: `请${
|
|
944
|
-
trigger:
|
|
940
|
+
message: `请${x ? "选择" : "输入"}${C.label}`,
|
|
941
|
+
trigger: x ? "change" : "blur"
|
|
945
942
|
}
|
|
946
943
|
];
|
|
947
944
|
}
|
|
948
|
-
}),
|
|
949
|
-
}),
|
|
950
|
-
|
|
951
|
-
|
|
945
|
+
}), s;
|
|
946
|
+
}), p = () => {
|
|
947
|
+
r.value && r.value.validate((s) => {
|
|
948
|
+
s && t("submit", { ...u });
|
|
952
949
|
});
|
|
953
950
|
}, n = () => {
|
|
954
|
-
|
|
955
|
-
},
|
|
951
|
+
r.value && r.value.resetFields(), t("reset");
|
|
952
|
+
}, v = (s) => () => kt(s, u, {}) || null;
|
|
956
953
|
return a({
|
|
957
|
-
validate: () =>
|
|
958
|
-
resetFields: () =>
|
|
954
|
+
validate: () => r.value ? r.value.validate() : Promise.resolve(!1),
|
|
955
|
+
resetFields: () => r.value && r.value.resetFields(),
|
|
959
956
|
getFormData: () => ({ ...u }),
|
|
960
|
-
submitForm:
|
|
957
|
+
submitForm: p,
|
|
961
958
|
resetForm: n
|
|
962
959
|
}), {
|
|
963
|
-
formRef:
|
|
960
|
+
formRef: r,
|
|
964
961
|
formData: u,
|
|
965
962
|
formRules: z,
|
|
966
|
-
submitForm:
|
|
963
|
+
submitForm: p,
|
|
967
964
|
resetForm: n,
|
|
968
965
|
processedColumns: g,
|
|
969
966
|
getComponentType: l,
|
|
970
967
|
getComponentProps: c,
|
|
971
|
-
renderCustomItem:
|
|
968
|
+
renderCustomItem: v
|
|
972
969
|
};
|
|
973
970
|
}
|
|
974
|
-
}),
|
|
971
|
+
}), Yt = { class: "zxt-form-container" }, ea = {
|
|
975
972
|
key: 0,
|
|
976
973
|
class: "form-label"
|
|
977
|
-
},
|
|
978
|
-
function
|
|
979
|
-
const l = S("el-option"), c = S("el-form-item"), g = S("el-col"), z = S("el-row"),
|
|
980
|
-
return i(), m("div",
|
|
981
|
-
|
|
974
|
+
}, ta = { class: "form-control" };
|
|
975
|
+
function aa(e, t, a, r, u, d) {
|
|
976
|
+
const l = S("el-option"), c = S("el-form-item"), g = S("el-col"), z = S("el-row"), p = S("el-form");
|
|
977
|
+
return i(), m("div", Yt, [
|
|
978
|
+
F(p, O({ ref: "formRef" }, e.$attrs, {
|
|
982
979
|
model: e.formData,
|
|
983
980
|
rules: e.formRules,
|
|
984
981
|
"label-width": e.labelWidth,
|
|
985
982
|
class: "zxt-form"
|
|
986
983
|
}), {
|
|
987
|
-
default:
|
|
988
|
-
|
|
989
|
-
default:
|
|
990
|
-
(i(!0), m(
|
|
991
|
-
default:
|
|
992
|
-
|
|
984
|
+
default: _(() => [
|
|
985
|
+
F(z, { gutter: 20 }, {
|
|
986
|
+
default: _(() => [
|
|
987
|
+
(i(!0), m(L, null, M(e.processedColumns, (n, v) => (i(), V(g, O({ key: v }, { ref_for: !0 }, n.colSpan), {
|
|
988
|
+
default: _(() => [
|
|
989
|
+
F(c, {
|
|
993
990
|
prop: n.prop,
|
|
994
991
|
required: n.required,
|
|
995
992
|
"label-width": "0",
|
|
996
993
|
class: "custom-form-item"
|
|
997
994
|
}, {
|
|
998
|
-
default:
|
|
999
|
-
|
|
995
|
+
default: _(() => [
|
|
996
|
+
y("div", {
|
|
1000
997
|
class: ue(["form-item-wrapper", { "is-action": n.isAction }])
|
|
1001
998
|
}, [
|
|
1002
|
-
n.label ? (i(), m("span",
|
|
1003
|
-
|
|
999
|
+
n.label ? (i(), m("span", ea, ee(n.label), 1)) : W("", !0),
|
|
1000
|
+
y("div", ta, [
|
|
1004
1001
|
n.type === "slot" ? T(e.$slots, n.slotName || n.prop, {
|
|
1005
1002
|
key: 0,
|
|
1006
1003
|
formData: e.formData,
|
|
1007
1004
|
column: n
|
|
1008
|
-
}, void 0, !0) : n.itemRender ? (i(), V(
|
|
1005
|
+
}, void 0, !0) : n.itemRender ? (i(), V(be(e.renderCustomItem(n)), { key: 1 })) : (i(), V(be(e.getComponentType(n.type)), O({
|
|
1009
1006
|
key: 2,
|
|
1010
1007
|
modelValue: e.formData[n.prop],
|
|
1011
|
-
"onUpdate:modelValue": (
|
|
1008
|
+
"onUpdate:modelValue": (s) => e.formData[n.prop] = s
|
|
1012
1009
|
}, { ref_for: !0 }, e.getComponentProps(n), Je(n.events || {})), {
|
|
1013
|
-
default:
|
|
1014
|
-
n.type === "select" ? (i(!0), m(
|
|
1015
|
-
key:
|
|
1016
|
-
label:
|
|
1017
|
-
value:
|
|
1018
|
-
}, null, 8, ["label", "value"]))), 128)) :
|
|
1010
|
+
default: _(() => [
|
|
1011
|
+
n.type === "select" ? (i(!0), m(L, { key: 0 }, M(n.options, (s, C) => (i(), V(l, {
|
|
1012
|
+
key: C,
|
|
1013
|
+
label: s.label,
|
|
1014
|
+
value: s.value
|
|
1015
|
+
}, null, 8, ["label", "value"]))), 128)) : W("", !0)
|
|
1019
1016
|
]),
|
|
1020
1017
|
_: 2
|
|
1021
1018
|
}, 1040, ["modelValue", "onUpdate:modelValue"]))
|
|
@@ -1035,28 +1032,35 @@ function Qt(e, t, a, s, u, d) {
|
|
|
1035
1032
|
}, 16, ["model", "rules", "label-width"])
|
|
1036
1033
|
]);
|
|
1037
1034
|
}
|
|
1038
|
-
const Re = /* @__PURE__ */
|
|
1039
|
-
Plus:
|
|
1040
|
-
Delete:
|
|
1035
|
+
const Re = /* @__PURE__ */ G(Xt, [["render", aa], ["__scopeId", "data-v-6b22a57b"]]), na = {
|
|
1036
|
+
Plus: Ve,
|
|
1037
|
+
Delete: Se,
|
|
1041
1038
|
Refresh: se,
|
|
1042
|
-
Download:
|
|
1039
|
+
Download: ke,
|
|
1043
1040
|
Search: ie,
|
|
1044
|
-
Edit:
|
|
1041
|
+
Edit: $e,
|
|
1045
1042
|
View: Fe,
|
|
1046
|
-
Upload:
|
|
1047
|
-
Setting:
|
|
1048
|
-
Warning:
|
|
1049
|
-
Check:
|
|
1050
|
-
Close:
|
|
1051
|
-
Document:
|
|
1052
|
-
CopyDocument:
|
|
1053
|
-
Share:
|
|
1054
|
-
Lock:
|
|
1055
|
-
Unlock:
|
|
1056
|
-
ArrowDown:
|
|
1057
|
-
},
|
|
1043
|
+
Upload: De,
|
|
1044
|
+
Setting: Pe,
|
|
1045
|
+
Warning: Qt,
|
|
1046
|
+
Check: Pt,
|
|
1047
|
+
Close: Ft,
|
|
1048
|
+
Document: Ot,
|
|
1049
|
+
CopyDocument: At,
|
|
1050
|
+
Share: Ut,
|
|
1051
|
+
Lock: Ht,
|
|
1052
|
+
Unlock: Wt,
|
|
1053
|
+
ArrowDown: xe
|
|
1054
|
+
}, oa = b({
|
|
1058
1055
|
name: "ActionColumn",
|
|
1059
|
-
components: {
|
|
1056
|
+
components: {
|
|
1057
|
+
ElButton: ut,
|
|
1058
|
+
ElDropdown: it,
|
|
1059
|
+
ElDropdownItem: st,
|
|
1060
|
+
ElDropdownMenu: rt,
|
|
1061
|
+
ElIcon: lt,
|
|
1062
|
+
ArrowDown: xe
|
|
1063
|
+
},
|
|
1060
1064
|
props: {
|
|
1061
1065
|
buttons: {
|
|
1062
1066
|
type: Array,
|
|
@@ -1073,17 +1077,15 @@ const Re = /* @__PURE__ */ W(Gt, [["render", Qt], ["__scopeId", "data-v-6b22a57b
|
|
|
1073
1077
|
},
|
|
1074
1078
|
emits: ["action-click"],
|
|
1075
1079
|
setup(e, { emit: t }) {
|
|
1076
|
-
const a =
|
|
1080
|
+
const a = w(() => e.buttons.filter((n) => typeof n.visible == "function" ? n.visible(e.row) : typeof n.visible == "boolean" ? n.visible : !0)), r = w(
|
|
1077
1081
|
() => a.value.length > e.maxVisible
|
|
1078
|
-
), u =
|
|
1079
|
-
() =>
|
|
1080
|
-
), d =
|
|
1081
|
-
() =>
|
|
1082
|
-
)
|
|
1083
|
-
console.log("[ActionColumn][5] props.buttons =", e.buttons), console.log("[ActionColumn][5] row =", e.row), console.log("[ActionColumn][5] resolvedButtons =", a.value), console.log("[ActionColumn][5] visibleButtons =", u.value), console.log("[ActionColumn][5] overflowButtons =", d.value);
|
|
1084
|
-
const l = (n) => {
|
|
1082
|
+
), u = w(
|
|
1083
|
+
() => r.value ? a.value.slice(0, e.maxVisible) : a.value
|
|
1084
|
+
), d = w(
|
|
1085
|
+
() => r.value ? a.value.slice(e.maxVisible) : []
|
|
1086
|
+
), l = (n) => {
|
|
1085
1087
|
if (n)
|
|
1086
|
-
return typeof n == "object" || typeof n == "function" ? n :
|
|
1088
|
+
return typeof n == "object" || typeof n == "function" ? n : na[n];
|
|
1087
1089
|
}, c = (n) => {
|
|
1088
1090
|
n?.currentTarget?.blur?.();
|
|
1089
1091
|
};
|
|
@@ -1091,8 +1093,8 @@ const Re = /* @__PURE__ */ W(Gt, [["render", Qt], ["__scopeId", "data-v-6b22a57b
|
|
|
1091
1093
|
visibleButtons: u,
|
|
1092
1094
|
overflowButtons: d,
|
|
1093
1095
|
getIconComponent: l,
|
|
1094
|
-
handleClick: (n,
|
|
1095
|
-
c(
|
|
1096
|
+
handleClick: (n, v) => {
|
|
1097
|
+
c(v), t("action-click", { code: n.code, button: n, row: e.row });
|
|
1096
1098
|
},
|
|
1097
1099
|
handleCommand: (n) => {
|
|
1098
1100
|
t("action-click", { code: n.code, button: n, row: e.row });
|
|
@@ -1102,23 +1104,23 @@ const Re = /* @__PURE__ */ W(Gt, [["render", Qt], ["__scopeId", "data-v-6b22a57b
|
|
|
1102
1104
|
}
|
|
1103
1105
|
};
|
|
1104
1106
|
}
|
|
1105
|
-
}),
|
|
1106
|
-
function
|
|
1107
|
-
const l = S("el-button"), c = S("ArrowDown"), g = S("el-icon"), z = S("el-dropdown-item"),
|
|
1108
|
-
return i(), m("div",
|
|
1109
|
-
(i(!0), m(
|
|
1110
|
-
key:
|
|
1107
|
+
}), la = { class: "action-column" };
|
|
1108
|
+
function ra(e, t, a, r, u, d) {
|
|
1109
|
+
const l = S("el-button"), c = S("ArrowDown"), g = S("el-icon"), z = S("el-dropdown-item"), p = S("el-dropdown-menu"), n = S("el-dropdown");
|
|
1110
|
+
return i(), m("div", la, [
|
|
1111
|
+
(i(!0), m(L, null, M(e.visibleButtons, (v) => (i(), V(l, {
|
|
1112
|
+
key: v.code,
|
|
1111
1113
|
class: "action-btn",
|
|
1112
|
-
type:
|
|
1113
|
-
icon: e.getIconComponent(
|
|
1114
|
+
type: v.type || "",
|
|
1115
|
+
icon: e.getIconComponent(v.icon),
|
|
1114
1116
|
size: "small",
|
|
1115
1117
|
link: "",
|
|
1116
1118
|
onMousedown: t[0] || (t[0] = Te(() => {
|
|
1117
1119
|
}, ["prevent"])),
|
|
1118
|
-
onClick: (
|
|
1120
|
+
onClick: (s) => e.handleClick(v, s)
|
|
1119
1121
|
}, {
|
|
1120
|
-
default:
|
|
1121
|
-
|
|
1122
|
+
default: _(() => [
|
|
1123
|
+
E(ee(v.label), 1)
|
|
1122
1124
|
]),
|
|
1123
1125
|
_: 2
|
|
1124
1126
|
}, 1032, ["type", "icon", "onClick"]))), 128)),
|
|
@@ -1127,16 +1129,16 @@ function ta(e, t, a, s, u, d) {
|
|
|
1127
1129
|
trigger: "hover",
|
|
1128
1130
|
onCommand: e.handleCommand
|
|
1129
1131
|
}, {
|
|
1130
|
-
dropdown:
|
|
1131
|
-
|
|
1132
|
-
default:
|
|
1133
|
-
(i(!0), m(
|
|
1134
|
-
key:
|
|
1135
|
-
command:
|
|
1136
|
-
icon: e.getIconComponent(
|
|
1132
|
+
dropdown: _(() => [
|
|
1133
|
+
F(p, null, {
|
|
1134
|
+
default: _(() => [
|
|
1135
|
+
(i(!0), m(L, null, M(e.overflowButtons, (v) => (i(), V(z, {
|
|
1136
|
+
key: v.code,
|
|
1137
|
+
command: v,
|
|
1138
|
+
icon: e.getIconComponent(v.icon)
|
|
1137
1139
|
}, {
|
|
1138
|
-
default:
|
|
1139
|
-
|
|
1140
|
+
default: _(() => [
|
|
1141
|
+
E(ee(v.label), 1)
|
|
1140
1142
|
]),
|
|
1141
1143
|
_: 2
|
|
1142
1144
|
}, 1032, ["command", "icon"]))), 128))
|
|
@@ -1144,8 +1146,8 @@ function ta(e, t, a, s, u, d) {
|
|
|
1144
1146
|
_: 1
|
|
1145
1147
|
})
|
|
1146
1148
|
]),
|
|
1147
|
-
default:
|
|
1148
|
-
|
|
1149
|
+
default: _(() => [
|
|
1150
|
+
F(l, {
|
|
1149
1151
|
class: "action-btn",
|
|
1150
1152
|
type: "",
|
|
1151
1153
|
size: "small",
|
|
@@ -1154,11 +1156,11 @@ function ta(e, t, a, s, u, d) {
|
|
|
1154
1156
|
}, ["prevent"])),
|
|
1155
1157
|
onClick: e.handleTriggerClick
|
|
1156
1158
|
}, {
|
|
1157
|
-
default:
|
|
1158
|
-
t[2] || (t[2] =
|
|
1159
|
-
|
|
1160
|
-
default:
|
|
1161
|
-
|
|
1159
|
+
default: _(() => [
|
|
1160
|
+
t[2] || (t[2] = E(" 更多 ", -1)),
|
|
1161
|
+
F(g, { class: "el-icon--right" }, {
|
|
1162
|
+
default: _(() => [
|
|
1163
|
+
F(c)
|
|
1162
1164
|
]),
|
|
1163
1165
|
_: 1
|
|
1164
1166
|
})
|
|
@@ -1167,25 +1169,25 @@ function ta(e, t, a, s, u, d) {
|
|
|
1167
1169
|
}, 8, ["onClick"])
|
|
1168
1170
|
]),
|
|
1169
1171
|
_: 1
|
|
1170
|
-
}, 8, ["onCommand"])) :
|
|
1172
|
+
}, 8, ["onCommand"])) : W("", !0)
|
|
1171
1173
|
]);
|
|
1172
1174
|
}
|
|
1173
|
-
const
|
|
1175
|
+
const sa = /* @__PURE__ */ G(oa, [["render", ra], ["__scopeId", "data-v-bb5b85d9"]]), ia = b({
|
|
1174
1176
|
name: "ZxtGrid",
|
|
1175
1177
|
inheritAttrs: !1,
|
|
1176
1178
|
components: {
|
|
1177
|
-
ZxtTable:
|
|
1179
|
+
ZxtTable: B,
|
|
1178
1180
|
ZxtForm: Re,
|
|
1179
|
-
ActionColumn:
|
|
1180
|
-
Plus:
|
|
1181
|
-
Delete:
|
|
1181
|
+
ActionColumn: sa,
|
|
1182
|
+
Plus: Ve,
|
|
1183
|
+
Delete: Se,
|
|
1182
1184
|
Refresh: se,
|
|
1183
|
-
Download:
|
|
1185
|
+
Download: ke,
|
|
1184
1186
|
Search: ie,
|
|
1185
|
-
Edit:
|
|
1187
|
+
Edit: $e,
|
|
1186
1188
|
View: Fe,
|
|
1187
|
-
Upload:
|
|
1188
|
-
Setting:
|
|
1189
|
+
Upload: De,
|
|
1190
|
+
Setting: Pe
|
|
1189
1191
|
},
|
|
1190
1192
|
props: {
|
|
1191
1193
|
// 网格配置选项
|
|
@@ -1213,48 +1215,33 @@ const aa = /* @__PURE__ */ W(Yt, [["render", ta], ["__scopeId", "data-v-e1262cc7
|
|
|
1213
1215
|
},
|
|
1214
1216
|
emits: ["toolbar-click", "action-click", "submit", "reset", "page-change", "size-change"],
|
|
1215
1217
|
setup(e, { emit: t, expose: a }) {
|
|
1216
|
-
const
|
|
1218
|
+
const r = Ke(), u = Be(), d = k(null), l = k(null), c = k(1), g = k(10), z = k(null), p = k(e.gridOptions.formMode !== !1), n = k({
|
|
1217
1219
|
...e.gridOptions.formConfig?.data || {}
|
|
1218
|
-
}),
|
|
1219
|
-
Plus:
|
|
1220
|
-
Delete:
|
|
1220
|
+
}), v = {
|
|
1221
|
+
Plus: Ve,
|
|
1222
|
+
Delete: Se,
|
|
1221
1223
|
Refresh: se,
|
|
1222
|
-
Download:
|
|
1224
|
+
Download: ke,
|
|
1223
1225
|
Search: ie,
|
|
1224
|
-
Edit:
|
|
1226
|
+
Edit: $e,
|
|
1225
1227
|
View: Fe,
|
|
1226
|
-
Upload:
|
|
1227
|
-
Setting:
|
|
1228
|
-
},
|
|
1229
|
-
const
|
|
1230
|
-
console.log("cols", e.gridOptions.columns);
|
|
1231
|
-
const h = o.find((D) => D.actionColumn);
|
|
1228
|
+
Upload: De,
|
|
1229
|
+
Setting: Pe
|
|
1230
|
+
}, s = w(() => {
|
|
1231
|
+
const h = (e.gridOptions.columns || []).find((D) => D.actionColumn);
|
|
1232
1232
|
return h ? h.actionColumn : null;
|
|
1233
|
-
}),
|
|
1233
|
+
}), C = w(() => (e.gridOptions.columns || []).map((h) => h.actionColumn ? {
|
|
1234
1234
|
...h,
|
|
1235
|
-
slot: "
|
|
1235
|
+
slot: "zxtActionInternal",
|
|
1236
1236
|
actionColumn: void 0
|
|
1237
|
-
} : h))
|
|
1238
|
-
console.log("[ZxtGrid][1] source columns =", e.gridOptions.columns), console.log(
|
|
1239
|
-
"[ZxtGrid][1] source action col =",
|
|
1240
|
-
(e.gridOptions.columns || []).find((o) => o?.actionColumn)
|
|
1241
|
-
), console.log("[ZxtGrid][2] mergedColumns =", v.value), console.log(
|
|
1242
|
-
"[ZxtGrid][2] merged action slot col =",
|
|
1243
|
-
v.value.find((o) => o?.slot === "__action__")
|
|
1244
|
-
), console.log("[ZxtGrid][3] actionColumnConfig =", r.value), console.log(
|
|
1245
|
-
"[ZxtGrid][3] buttons =",
|
|
1246
|
-
r.value?.buttons,
|
|
1247
|
-
"len=",
|
|
1248
|
-
r.value?.buttons?.length
|
|
1249
|
-
);
|
|
1250
|
-
const L = (o) => {
|
|
1237
|
+
} : h)), x = (o) => {
|
|
1251
1238
|
t("action-click", o);
|
|
1252
|
-
}, J =
|
|
1239
|
+
}, J = w(() => {
|
|
1253
1240
|
const o = e.gridOptions.formConfig;
|
|
1254
1241
|
if (!o || !o.items) return [];
|
|
1255
1242
|
const h = [...o.items];
|
|
1256
1243
|
return h.some(
|
|
1257
|
-
(
|
|
1244
|
+
(Z) => Z.type === "slot" && Z.slotName === "search-actions"
|
|
1258
1245
|
) || h.push({
|
|
1259
1246
|
type: "slot",
|
|
1260
1247
|
slotName: "search-actions",
|
|
@@ -1263,67 +1250,67 @@ const aa = /* @__PURE__ */ W(Yt, [["render", ta], ["__scopeId", "data-v-e1262cc7
|
|
|
1263
1250
|
isAction: !0,
|
|
1264
1251
|
...o.actionConfig
|
|
1265
1252
|
}), h;
|
|
1266
|
-
}),
|
|
1253
|
+
}), R = w(() => {
|
|
1267
1254
|
const o = /* @__PURE__ */ new Set(["search-actions"]);
|
|
1268
1255
|
return (J.value || []).forEach((h) => {
|
|
1269
1256
|
h.type === "slot" && o.add(h.slotName || h.prop);
|
|
1270
1257
|
}), o;
|
|
1271
|
-
}),
|
|
1258
|
+
}), j = w(() => {
|
|
1272
1259
|
const o = {};
|
|
1273
1260
|
for (const h in u)
|
|
1274
|
-
h === "search-actions" || h === "toolbar" || (
|
|
1261
|
+
h === "search-actions" || h === "toolbar" || (R.value.has(h) || h.startsWith("form-")) && (o[h] = u[h]);
|
|
1275
1262
|
return o;
|
|
1276
|
-
}), de =
|
|
1263
|
+
}), de = w(() => {
|
|
1277
1264
|
const o = {};
|
|
1278
1265
|
for (const h in u)
|
|
1279
|
-
h !== "toolbar" && !
|
|
1266
|
+
h !== "toolbar" && !R.value.has(h) && !h.startsWith("form-") && (o[h] = u[h]);
|
|
1280
1267
|
return o;
|
|
1281
1268
|
}), ce = () => {
|
|
1282
1269
|
l.value?.submitForm();
|
|
1283
1270
|
}, pe = (o) => {
|
|
1284
1271
|
t("submit", o), e.gridOptions.proxyConfig && (n.value = { ...o }, c.value = 1, d.value?.reload?.({ formData: n.value, page: 1 }));
|
|
1285
|
-
},
|
|
1272
|
+
}, H = () => {
|
|
1286
1273
|
l.value?.resetForm();
|
|
1287
1274
|
}, oe = () => {
|
|
1288
1275
|
t("reset"), e.gridOptions.proxyConfig && (n.value = {}, c.value = 1, d.value?.reload?.({ formData: {}, page: 1 }));
|
|
1289
1276
|
}, fe = (o) => {
|
|
1290
1277
|
if (o)
|
|
1291
|
-
return typeof o == "object" || typeof o == "function" ? o :
|
|
1292
|
-
}, me =
|
|
1278
|
+
return typeof o == "object" || typeof o == "function" ? o : v[o];
|
|
1279
|
+
}, me = w(() => {
|
|
1293
1280
|
const o = e.gridOptions.proxyConfig;
|
|
1294
1281
|
return o ? {
|
|
1295
1282
|
...o,
|
|
1296
1283
|
_formData: n.value
|
|
1297
1284
|
} : null;
|
|
1298
|
-
}), ge =
|
|
1285
|
+
}), ge = w(() => {
|
|
1299
1286
|
const {
|
|
1300
1287
|
formConfig: o,
|
|
1301
1288
|
toolbar: h,
|
|
1302
1289
|
formMode: D,
|
|
1303
|
-
formColumns:
|
|
1290
|
+
formColumns: Z,
|
|
1304
1291
|
rules: re,
|
|
1305
1292
|
data: ye,
|
|
1306
|
-
proxyConfig:
|
|
1307
|
-
...
|
|
1293
|
+
proxyConfig: Ze,
|
|
1294
|
+
...Ee
|
|
1308
1295
|
} = e.gridOptions;
|
|
1309
1296
|
return {
|
|
1310
|
-
...
|
|
1311
|
-
proxyConfig: me.value ||
|
|
1297
|
+
...Ee,
|
|
1298
|
+
proxyConfig: me.value || Ze || null
|
|
1312
1299
|
};
|
|
1313
|
-
}), le =
|
|
1300
|
+
}), le = w(() => z.value !== null ? z.value : e.externalData.length > 0 ? e.externalData : e.gridOptions.data || []), Ae = w(() => !!e.gridOptions.proxyConfig), f = w(() => Ae.value ? 0 : le.value.length), $ = (o, h) => {
|
|
1314
1301
|
t("toolbar-click", { code: o, button: h, grid: d.value });
|
|
1315
1302
|
}, I = (o) => {
|
|
1316
1303
|
c.value = o.page, t("page-change", o);
|
|
1317
1304
|
}, N = (o) => {
|
|
1318
1305
|
g.value = o.size, t("size-change", o);
|
|
1319
|
-
},
|
|
1306
|
+
}, he = () => d.value, ve = () => l.value, Ce = () => d.value?.getTableRef()?.getSelectionRows?.() || [], we = (o) => {
|
|
1320
1307
|
z.value = o ?? null;
|
|
1321
|
-
},
|
|
1322
|
-
|
|
1308
|
+
}, _e = (o) => {
|
|
1309
|
+
p.value = o;
|
|
1323
1310
|
}, U = (o, h = !0) => {
|
|
1324
1311
|
const D = e.gridOptions.formConfig;
|
|
1325
1312
|
D?.data && Object.assign(D.data, o), n.value = { ...D?.data || {}, ...o }, h && e.gridOptions.proxyConfig && (c.value = 1, d.value?.reload?.({ formData: n.value, page: 1 }));
|
|
1326
|
-
},
|
|
1313
|
+
}, A = (o, ...h) => {
|
|
1327
1314
|
const D = n.value;
|
|
1328
1315
|
switch (o) {
|
|
1329
1316
|
case "query":
|
|
@@ -1339,21 +1326,21 @@ const aa = /* @__PURE__ */ W(Yt, [["render", ta], ["__scopeId", "data-v-e1262cc7
|
|
|
1339
1326
|
X(
|
|
1340
1327
|
() => e.gridOptions.formMode,
|
|
1341
1328
|
(o) => {
|
|
1342
|
-
o !== void 0 && (
|
|
1329
|
+
o !== void 0 && (p.value = o);
|
|
1343
1330
|
}
|
|
1344
|
-
),
|
|
1331
|
+
), Le(() => {
|
|
1345
1332
|
e.gridOptions.proxyConfig && e.gridOptions.autoLoad !== !1 && d.value?.reload?.({ formData: n.value, page: 1 });
|
|
1346
1333
|
});
|
|
1347
1334
|
const P = () => d.value?.getTableRef?.();
|
|
1348
1335
|
return a({
|
|
1349
|
-
getGridRef:
|
|
1350
|
-
getFormRef:
|
|
1336
|
+
getGridRef: he,
|
|
1337
|
+
getFormRef: ve,
|
|
1351
1338
|
getElTableRef: P,
|
|
1352
|
-
getSelectedRows:
|
|
1339
|
+
getSelectedRows: Ce,
|
|
1353
1340
|
reloadData: we,
|
|
1354
|
-
setFormVisible:
|
|
1341
|
+
setFormVisible: _e,
|
|
1355
1342
|
setFormData: U,
|
|
1356
|
-
commitProxy:
|
|
1343
|
+
commitProxy: A,
|
|
1357
1344
|
clearSelection: () => P()?.clearSelection(),
|
|
1358
1345
|
toggleRowSelection: (...o) => P()?.toggleRowSelection(...o),
|
|
1359
1346
|
toggleAllSelection: () => P()?.toggleAllSelection(),
|
|
@@ -1364,47 +1351,47 @@ const aa = /* @__PURE__ */ W(Yt, [["render", ta], ["__scopeId", "data-v-e1262cc7
|
|
|
1364
1351
|
doLayout: () => P()?.doLayout(),
|
|
1365
1352
|
sort: (...o) => P()?.sort(...o)
|
|
1366
1353
|
}), {
|
|
1367
|
-
attrs:
|
|
1354
|
+
attrs: r,
|
|
1368
1355
|
gridRef: d,
|
|
1369
1356
|
searchFormRef: l,
|
|
1370
1357
|
currentPage: c,
|
|
1371
1358
|
pageSize: g,
|
|
1372
1359
|
tableData: le,
|
|
1373
1360
|
tableProps: ge,
|
|
1374
|
-
mergedColumns:
|
|
1375
|
-
actionColumnConfig:
|
|
1376
|
-
total:
|
|
1377
|
-
isFormVisible:
|
|
1361
|
+
mergedColumns: C,
|
|
1362
|
+
actionColumnConfig: s,
|
|
1363
|
+
total: f,
|
|
1364
|
+
isFormVisible: p,
|
|
1378
1365
|
searchFormColumns: J,
|
|
1379
|
-
formFilteredSlots:
|
|
1366
|
+
formFilteredSlots: j,
|
|
1380
1367
|
tableFilteredSlots: de,
|
|
1381
1368
|
getIconComponent: fe,
|
|
1382
1369
|
handleToolbarClick: $,
|
|
1383
|
-
handleActionClick:
|
|
1370
|
+
handleActionClick: x,
|
|
1384
1371
|
handlePageChange: I,
|
|
1385
1372
|
handleSizeChange: N,
|
|
1386
1373
|
handleSearch: ce,
|
|
1387
1374
|
handleSearchSubmit: pe,
|
|
1388
|
-
handleReset:
|
|
1375
|
+
handleReset: H,
|
|
1389
1376
|
handleSearchReset: oe,
|
|
1390
1377
|
Search: ie,
|
|
1391
1378
|
Refresh: se
|
|
1392
1379
|
};
|
|
1393
1380
|
}
|
|
1394
|
-
}),
|
|
1381
|
+
}), ua = {
|
|
1395
1382
|
key: 0,
|
|
1396
1383
|
class: "grid-search-form"
|
|
1397
|
-
},
|
|
1384
|
+
}, da = { class: "search-btn-group" }, ca = { class: "grid-table-wrapper" }, pa = {
|
|
1398
1385
|
key: 0,
|
|
1399
1386
|
class: "grid-toolbar"
|
|
1400
1387
|
};
|
|
1401
|
-
function
|
|
1388
|
+
function fa(e, t, a, r, u, d) {
|
|
1402
1389
|
const l = S("el-button"), c = S("ZxtForm"), g = S("ActionColumn"), z = S("ZxtTable");
|
|
1403
1390
|
return i(), m("div", {
|
|
1404
1391
|
class: ue(["zxt-grid-container", { "zxt-grid-container--full": e.gridOptions.height === "full" }])
|
|
1405
1392
|
}, [
|
|
1406
|
-
e.gridOptions.formConfig && e.isFormVisible ? (i(), m("div",
|
|
1407
|
-
|
|
1393
|
+
e.gridOptions.formConfig && e.isFormVisible ? (i(), m("div", ua, [
|
|
1394
|
+
F(c, {
|
|
1408
1395
|
ref: "searchFormRef",
|
|
1409
1396
|
"form-columns": e.searchFormColumns,
|
|
1410
1397
|
"initial-form-data": e.gridOptions.formConfig.data,
|
|
@@ -1412,25 +1399,25 @@ function ia(e, t, a, s, u, d) {
|
|
|
1412
1399
|
onSubmit: e.handleSearchSubmit,
|
|
1413
1400
|
onReset: e.handleSearchReset
|
|
1414
1401
|
}, Y({
|
|
1415
|
-
"search-actions":
|
|
1416
|
-
|
|
1417
|
-
|
|
1402
|
+
"search-actions": _(() => [
|
|
1403
|
+
y("div", da, [
|
|
1404
|
+
F(l, {
|
|
1418
1405
|
class: "btn-search",
|
|
1419
1406
|
icon: e.Search,
|
|
1420
1407
|
onClick: e.handleSearch
|
|
1421
1408
|
}, {
|
|
1422
|
-
default:
|
|
1423
|
-
|
|
1409
|
+
default: _(() => [...t[0] || (t[0] = [
|
|
1410
|
+
E(" 查询 ", -1)
|
|
1424
1411
|
])]),
|
|
1425
1412
|
_: 1
|
|
1426
1413
|
}, 8, ["icon", "onClick"]),
|
|
1427
|
-
|
|
1414
|
+
F(l, {
|
|
1428
1415
|
class: "btn-reset",
|
|
1429
1416
|
icon: e.Refresh,
|
|
1430
1417
|
onClick: e.handleReset
|
|
1431
1418
|
}, {
|
|
1432
|
-
default:
|
|
1433
|
-
|
|
1419
|
+
default: _(() => [...t[1] || (t[1] = [
|
|
1420
|
+
E(" 重置 ", -1)
|
|
1434
1421
|
])]),
|
|
1435
1422
|
_: 1
|
|
1436
1423
|
}, 8, ["icon", "onClick"])
|
|
@@ -1438,34 +1425,34 @@ function ia(e, t, a, s, u, d) {
|
|
|
1438
1425
|
]),
|
|
1439
1426
|
_: 2
|
|
1440
1427
|
}, [
|
|
1441
|
-
|
|
1428
|
+
M(e.formFilteredSlots, (p, n) => ({
|
|
1442
1429
|
name: n,
|
|
1443
|
-
fn:
|
|
1444
|
-
T(e.$slots, n, Oe(
|
|
1430
|
+
fn: _((v) => [
|
|
1431
|
+
T(e.$slots, n, Me(Oe(v)), void 0, !0)
|
|
1445
1432
|
])
|
|
1446
1433
|
}))
|
|
1447
1434
|
]), 1032, ["form-columns", "initial-form-data", "rules", "onSubmit", "onReset"])
|
|
1448
|
-
])) :
|
|
1449
|
-
|
|
1450
|
-
e.gridOptions.toolbar ? (i(), m("div",
|
|
1451
|
-
(i(!0), m(
|
|
1435
|
+
])) : W("", !0),
|
|
1436
|
+
y("div", ca, [
|
|
1437
|
+
e.gridOptions.toolbar ? (i(), m("div", pa, [
|
|
1438
|
+
(i(!0), m(L, null, M(e.gridOptions.toolbar.buttons, (p, n) => (i(), V(l, {
|
|
1452
1439
|
key: n,
|
|
1453
|
-
type:
|
|
1454
|
-
size:
|
|
1455
|
-
icon: e.getIconComponent(
|
|
1456
|
-
disabled:
|
|
1457
|
-
onClick: (
|
|
1440
|
+
type: p.type || "default",
|
|
1441
|
+
size: p.size || "small",
|
|
1442
|
+
icon: e.getIconComponent(p.icon),
|
|
1443
|
+
disabled: p.disabled,
|
|
1444
|
+
onClick: (v) => e.handleToolbarClick(p.code, p)
|
|
1458
1445
|
}, {
|
|
1459
|
-
default:
|
|
1460
|
-
|
|
1446
|
+
default: _(() => [
|
|
1447
|
+
E(ee(p.name), 1)
|
|
1461
1448
|
]),
|
|
1462
1449
|
_: 2
|
|
1463
1450
|
}, 1032, ["type", "size", "icon", "disabled", "onClick"]))), 128)),
|
|
1464
1451
|
T(e.$slots, "toolbar", {
|
|
1465
1452
|
grid: e.$refs.gridRef
|
|
1466
1453
|
}, void 0, !0)
|
|
1467
|
-
])) :
|
|
1468
|
-
|
|
1454
|
+
])) : W("", !0),
|
|
1455
|
+
F(z, O({ ref: "gridRef" }, { ...e.tableProps, ...e.attrs }, {
|
|
1469
1456
|
id: e.gridOptions.id,
|
|
1470
1457
|
columns: e.mergedColumns,
|
|
1471
1458
|
data: e.tableData,
|
|
@@ -1481,60 +1468,60 @@ function ia(e, t, a, s, u, d) {
|
|
|
1481
1468
|
onSizeChange: e.handleSizeChange
|
|
1482
1469
|
}), Y({ _: 2 }, [
|
|
1483
1470
|
e.actionColumnConfig ? {
|
|
1484
|
-
name: "
|
|
1485
|
-
fn:
|
|
1486
|
-
|
|
1471
|
+
name: "zxtActionInternal",
|
|
1472
|
+
fn: _(({ row: p }) => [
|
|
1473
|
+
F(g, {
|
|
1487
1474
|
buttons: e.actionColumnConfig.buttons,
|
|
1488
|
-
row:
|
|
1475
|
+
row: p,
|
|
1489
1476
|
"max-visible": e.actionColumnConfig.maxVisible || 2,
|
|
1490
1477
|
onActionClick: e.handleActionClick
|
|
1491
1478
|
}, null, 8, ["buttons", "row", "max-visible", "onActionClick"])
|
|
1492
1479
|
]),
|
|
1493
1480
|
key: "0"
|
|
1494
1481
|
} : void 0,
|
|
1495
|
-
|
|
1482
|
+
M(e.tableFilteredSlots, (p, n) => ({
|
|
1496
1483
|
name: n,
|
|
1497
|
-
fn:
|
|
1498
|
-
T(e.$slots, n, Oe(
|
|
1484
|
+
fn: _((v) => [
|
|
1485
|
+
T(e.$slots, n, Me(Oe(v)), void 0, !0)
|
|
1499
1486
|
])
|
|
1500
1487
|
}))
|
|
1501
1488
|
]), 1040, ["id", "columns", "data", "height", "pageable", "current-page", "page-size", "page-sizes", "total", "pagination-layout", "onPageChange", "onSizeChange"])
|
|
1502
1489
|
])
|
|
1503
1490
|
], 2);
|
|
1504
1491
|
}
|
|
1505
|
-
const
|
|
1492
|
+
const He = /* @__PURE__ */ G(ia, [["render", fa], ["__scopeId", "data-v-0948a778"]]);
|
|
1506
1493
|
Q.install = function(e) {
|
|
1507
1494
|
e.component(Q.name, Q);
|
|
1508
1495
|
};
|
|
1509
|
-
const
|
|
1496
|
+
const ma = [
|
|
1510
1497
|
te,
|
|
1511
1498
|
ae,
|
|
1512
|
-
|
|
1513
|
-
|
|
1499
|
+
B,
|
|
1500
|
+
He,
|
|
1514
1501
|
Re,
|
|
1515
1502
|
Q
|
|
1516
|
-
],
|
|
1517
|
-
|
|
1503
|
+
], ga = (e) => {
|
|
1504
|
+
ma.forEach((t) => {
|
|
1518
1505
|
e.component(t.name, t);
|
|
1519
1506
|
});
|
|
1520
|
-
},
|
|
1521
|
-
install:
|
|
1507
|
+
}, Ca = {
|
|
1508
|
+
install: ga,
|
|
1522
1509
|
MyButton: te,
|
|
1523
1510
|
JsxButton: ae,
|
|
1524
|
-
ZxtTable:
|
|
1525
|
-
ZxtGrid:
|
|
1511
|
+
ZxtTable: B,
|
|
1512
|
+
ZxtGrid: He,
|
|
1526
1513
|
ZxtForm: Re,
|
|
1527
1514
|
ZxtPagination: Q,
|
|
1528
1515
|
// 暴露渲染器 API
|
|
1529
|
-
renderer:
|
|
1530
|
-
registerRenderer:
|
|
1516
|
+
renderer: B.renderer,
|
|
1517
|
+
registerRenderer: B.registerRenderer
|
|
1531
1518
|
};
|
|
1532
1519
|
export {
|
|
1533
1520
|
ae as JsxButton,
|
|
1534
1521
|
te as MyButton,
|
|
1535
1522
|
Re as ZxtForm,
|
|
1536
|
-
|
|
1523
|
+
He as ZxtGrid,
|
|
1537
1524
|
Q as ZxtPagination,
|
|
1538
|
-
|
|
1539
|
-
|
|
1525
|
+
B as ZxtTable,
|
|
1526
|
+
Ca as default
|
|
1540
1527
|
};
|