zxt-table 0.4.5 → 0.5.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/dist/zxt-table.css +1 -1
- package/dist/zxt-table.es.js +833 -500
- package/dist/zxt-table.umd.js +1 -1
- package/package.json +3 -2
package/dist/zxt-table.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import { ElPagination as
|
|
1
|
+
import { createElementBlock as f, openBlock as s, normalizeClass as ce, renderSlot as H, defineComponent as b, createVNode as V, ref as k, watch as J, resolveComponent as z, createBlock as $, h as W, inject as Ne, computed as C, mergeProps as O, withCtx as y, Fragment as B, renderList as R, createSlots as ne, resolveDynamicComponent as ze, createTextVNode as Z, toDisplayString as K, provide as Ue, onMounted as qe, resolveDirective as We, normalizeStyle as Ge, withDirectives as Je, createCommentVNode as Q, createElementVNode as w, reactive as Ke, toHandlers as Qe, useAttrs as Xe, useSlots as Ye, normalizeProps as xe, guardReactiveProps as Me } from "vue";
|
|
2
|
+
import { ElPagination as et, ElLink as tt, ElCheckbox as at, ElSelect as nt, ElOption as ot, ElInput as rt, ElTableColumn as lt, ElTable as st, ElMessage as ie } from "element-plus";
|
|
3
3
|
const N = (e, t) => {
|
|
4
4
|
const a = e.__vccOpts || e;
|
|
5
|
-
for (const [r,
|
|
6
|
-
a[r] =
|
|
5
|
+
for (const [r, i] of t)
|
|
6
|
+
a[r] = i;
|
|
7
7
|
return a;
|
|
8
|
-
},
|
|
8
|
+
}, it = {
|
|
9
9
|
name: "MyButton",
|
|
10
10
|
props: {
|
|
11
11
|
type: {
|
|
@@ -26,21 +26,21 @@ const N = (e, t) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
},
|
|
30
|
-
function
|
|
31
|
-
return
|
|
32
|
-
class:
|
|
29
|
+
}, ut = ["disabled"];
|
|
30
|
+
function dt(e, t, a, r, i, c) {
|
|
31
|
+
return s(), f("button", {
|
|
32
|
+
class: ce(["my-button", [`my-button--${a.type}`, { "is-disabled": a.disabled }]]),
|
|
33
33
|
disabled: a.disabled,
|
|
34
|
-
onClick: t[0] || (t[0] = (...
|
|
34
|
+
onClick: t[0] || (t[0] = (...o) => r.handleClick && r.handleClick(...o))
|
|
35
35
|
}, [
|
|
36
|
-
|
|
37
|
-
], 10,
|
|
36
|
+
H(e.$slots, "default", {}, void 0, !0)
|
|
37
|
+
], 10, ut);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
e.component(
|
|
39
|
+
const ee = /* @__PURE__ */ N(it, [["render", dt], ["__scopeId", "data-v-4480e77d"]]);
|
|
40
|
+
ee.install = function(e) {
|
|
41
|
+
e.component(ee.name, ee);
|
|
42
42
|
};
|
|
43
|
-
const
|
|
43
|
+
const te = /* @__PURE__ */ b({
|
|
44
44
|
name: "JsxButton",
|
|
45
45
|
props: {
|
|
46
46
|
type: {
|
|
@@ -58,10 +58,10 @@ const W = /* @__PURE__ */ w({
|
|
|
58
58
|
emit: t,
|
|
59
59
|
slots: a
|
|
60
60
|
}) {
|
|
61
|
-
const r = (
|
|
62
|
-
e.disabled || t("click",
|
|
61
|
+
const r = (i) => {
|
|
62
|
+
e.disabled || t("click", i);
|
|
63
63
|
};
|
|
64
|
-
return () =>
|
|
64
|
+
return () => V("button", {
|
|
65
65
|
class: ["jsx-button", `jsx-button--${e.type}`, {
|
|
66
66
|
"is-disabled": e.disabled
|
|
67
67
|
}],
|
|
@@ -70,12 +70,12 @@ const W = /* @__PURE__ */ w({
|
|
|
70
70
|
}, [a.default?.()]);
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
|
|
74
|
-
e.component(
|
|
73
|
+
te.install = function(e) {
|
|
74
|
+
e.component(te.name, te);
|
|
75
75
|
};
|
|
76
|
-
const
|
|
76
|
+
const ct = b({
|
|
77
77
|
name: "ZxtPagination",
|
|
78
|
-
components: { ElPagination:
|
|
78
|
+
components: { ElPagination: et },
|
|
79
79
|
props: {
|
|
80
80
|
// 当前页码
|
|
81
81
|
modelValue: { type: Number, default: 1 },
|
|
@@ -93,36 +93,36 @@ const Xe = w({
|
|
|
93
93
|
},
|
|
94
94
|
emits: ["update:modelValue", "update:pageSize", "page-change", "size-change"],
|
|
95
95
|
setup(e, { emit: t }) {
|
|
96
|
-
const a =
|
|
97
|
-
return
|
|
96
|
+
const a = k(e.modelValue), r = k(e.pageSize);
|
|
97
|
+
return J(
|
|
98
98
|
() => e.modelValue,
|
|
99
|
-
(
|
|
100
|
-
a.value =
|
|
99
|
+
(o) => {
|
|
100
|
+
a.value = o;
|
|
101
101
|
}
|
|
102
|
-
),
|
|
102
|
+
), J(
|
|
103
103
|
() => e.pageSize,
|
|
104
|
-
(
|
|
105
|
-
r.value =
|
|
104
|
+
(o) => {
|
|
105
|
+
r.value = o;
|
|
106
106
|
}
|
|
107
107
|
), {
|
|
108
108
|
currentPage: a,
|
|
109
109
|
pageSize: r,
|
|
110
|
-
handleSizeChange: (
|
|
111
|
-
r.value =
|
|
110
|
+
handleSizeChange: (o) => {
|
|
111
|
+
r.value = o, a.value = 1, t("update:pageSize", o), t("size-change", { page: a.value, size: o });
|
|
112
112
|
},
|
|
113
|
-
handleCurrentChange: (
|
|
114
|
-
a.value =
|
|
113
|
+
handleCurrentChange: (o) => {
|
|
114
|
+
a.value = o, t("update:modelValue", o), t("page-change", { page: o, size: r.value });
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
function
|
|
120
|
-
const
|
|
121
|
-
return
|
|
119
|
+
function pt(e, t, a, r, i, c) {
|
|
120
|
+
const o = z("el-pagination");
|
|
121
|
+
return s(), $(o, {
|
|
122
122
|
"current-page": e.currentPage,
|
|
123
|
-
"onUpdate:currentPage": t[0] || (t[0] = (
|
|
123
|
+
"onUpdate:currentPage": t[0] || (t[0] = (p) => e.currentPage = p),
|
|
124
124
|
"page-size": e.pageSize,
|
|
125
|
-
"onUpdate:pageSize": t[1] || (t[1] = (
|
|
125
|
+
"onUpdate:pageSize": t[1] || (t[1] = (p) => e.pageSize = p),
|
|
126
126
|
"page-sizes": e.pageSizes,
|
|
127
127
|
total: e.total,
|
|
128
128
|
layout: e.layout,
|
|
@@ -131,55 +131,55 @@ function Ye(e, t, a, r, o, p) {
|
|
|
131
131
|
onCurrentChange: e.handleCurrentChange
|
|
132
132
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout", "onSizeChange", "onCurrentChange"]);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const G = /* @__PURE__ */ N(ct, [["render", pt], ["__scopeId", "data-v-497aa44d"]]), ae = {
|
|
135
135
|
default: ({ cellValue: e }) => e ?? "",
|
|
136
|
-
input: ({ cellValue: e, row: t, column: a, updateRow: r }) =>
|
|
136
|
+
input: ({ cellValue: e, row: t, column: a, updateRow: r }) => W(rt, {
|
|
137
137
|
modelValue: e,
|
|
138
138
|
size: "small",
|
|
139
|
-
onInput: (
|
|
139
|
+
onInput: (i) => r({ ...t, [a.property]: i })
|
|
140
140
|
}),
|
|
141
|
-
select: ({ cellValue: e, row: t, column: a, updateRow: r, options:
|
|
142
|
-
|
|
141
|
+
select: ({ cellValue: e, row: t, column: a, updateRow: r, options: i = [] }) => W(
|
|
142
|
+
nt,
|
|
143
143
|
{
|
|
144
144
|
modelValue: e,
|
|
145
145
|
size: "small",
|
|
146
|
-
onChange: (
|
|
146
|
+
onChange: (c) => r({ ...t, [a.property]: c })
|
|
147
147
|
},
|
|
148
|
-
() =>
|
|
149
|
-
(
|
|
148
|
+
() => i.map(
|
|
149
|
+
(c) => W(ot, { label: c.label, value: c.value, key: c.value })
|
|
150
150
|
)
|
|
151
151
|
),
|
|
152
|
-
checkbox: ({ cellValue: e, row: t, column: a, updateRow: r }) =>
|
|
152
|
+
checkbox: ({ cellValue: e, row: t, column: a, updateRow: r }) => W(at, {
|
|
153
153
|
modelValue: !!e,
|
|
154
|
-
onChange: (
|
|
154
|
+
onChange: (i) => r({ ...t, [a.property]: i })
|
|
155
155
|
}),
|
|
156
|
-
link: ({ cellValue: e, href: t, target: a = "_blank" }) =>
|
|
156
|
+
link: ({ cellValue: e, href: t, target: a = "_blank" }) => W(tt, { href: t, target: a }, () => e)
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function ft(e, t) {
|
|
159
159
|
if (!e) return null;
|
|
160
160
|
if (typeof e == "string") {
|
|
161
|
-
const a =
|
|
161
|
+
const a = ae[e];
|
|
162
162
|
return a ? a(t) : (console.warn(`[ZxtTable] 未找到内置渲染器: ${e}`), t.cellValue ?? "");
|
|
163
163
|
}
|
|
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: r = {}, attrs:
|
|
168
|
-
return typeof a == "string" &&
|
|
167
|
+
const { name: a, props: r = {}, attrs: i = {}, events: c = {}, content: o } = e;
|
|
168
|
+
return typeof a == "string" && ae[a] ? ae[a]({
|
|
169
169
|
...t,
|
|
170
170
|
...r,
|
|
171
|
-
...
|
|
172
|
-
...
|
|
173
|
-
}) : typeof a == "object" || typeof a == "function" ?
|
|
171
|
+
...i,
|
|
172
|
+
...c
|
|
173
|
+
}) : typeof a == "object" || typeof a == "function" ? W(a, { ...r, ...i, ...c }, o) : (console.warn("[ZxtTable] cellRender 对象缺少有效的 name 字段"), t.cellValue ?? "");
|
|
174
174
|
}
|
|
175
175
|
return t.cellValue ?? "";
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
|
|
177
|
+
function mt(e, t) {
|
|
178
|
+
ae[e] && console.warn(`[ZxtTable] 内置渲染器 ${e} 已被覆盖`), ae[e] = t;
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const gt = b({
|
|
181
181
|
name: "ZxtTableColumn",
|
|
182
|
-
components: { ElTableColumn:
|
|
182
|
+
components: { ElTableColumn: lt },
|
|
183
183
|
props: {
|
|
184
184
|
column: {
|
|
185
185
|
type: Object,
|
|
@@ -195,92 +195,92 @@ const at = w({
|
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
setup(e) {
|
|
198
|
-
const t =
|
|
199
|
-
}), a = (
|
|
200
|
-
const { currentPage:
|
|
201
|
-
return (
|
|
202
|
-
}, r =
|
|
203
|
-
const
|
|
198
|
+
const t = Ne("updateRow", () => {
|
|
199
|
+
}), a = (o) => {
|
|
200
|
+
const { currentPage: p, pageSize: m } = e;
|
|
201
|
+
return (p - 1) * m + o + 1;
|
|
202
|
+
}, r = C(() => {
|
|
203
|
+
const o = e.column;
|
|
204
204
|
return {
|
|
205
|
-
...
|
|
206
|
-
prop:
|
|
205
|
+
...o,
|
|
206
|
+
prop: o.prop ?? o.field,
|
|
207
207
|
// 优先使用 prop,兼容 field
|
|
208
|
-
label:
|
|
208
|
+
label: o.label ?? o.title
|
|
209
209
|
// 优先使用 label,兼容 title
|
|
210
210
|
};
|
|
211
|
-
}),
|
|
212
|
-
const { children:
|
|
213
|
-
return
|
|
211
|
+
}), i = C(() => {
|
|
212
|
+
const { children: o, ...p } = r.value;
|
|
213
|
+
return p;
|
|
214
214
|
});
|
|
215
215
|
return {
|
|
216
216
|
normalizedColumn: r,
|
|
217
|
-
columnProps:
|
|
218
|
-
renderCell: (
|
|
219
|
-
const
|
|
220
|
-
return
|
|
221
|
-
row:
|
|
222
|
-
column:
|
|
223
|
-
rowIndex:
|
|
224
|
-
cellValue:
|
|
225
|
-
updateRow: (
|
|
217
|
+
columnProps: i,
|
|
218
|
+
renderCell: (o) => {
|
|
219
|
+
const p = r.value, m = o.row[p.prop], d = m ?? p.defaultValue ?? "";
|
|
220
|
+
return ft(p.cellRender, {
|
|
221
|
+
row: o.row,
|
|
222
|
+
column: p,
|
|
223
|
+
rowIndex: o.$index,
|
|
224
|
+
cellValue: d,
|
|
225
|
+
updateRow: (h) => t(h, o.$index)
|
|
226
226
|
});
|
|
227
227
|
},
|
|
228
228
|
defaultIndexMethod: a
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return e.normalizedColumn.children && e.normalizedColumn.children.length ? (
|
|
232
|
+
function ht(e, t, a, r, i, c) {
|
|
233
|
+
const o = z("ZxtTableColumn", !0), p = z("el-table-column");
|
|
234
|
+
return e.normalizedColumn.children && e.normalizedColumn.children.length ? (s(), $(p, O({ key: 0 }, e.columnProps, {
|
|
235
235
|
key: e.normalizedColumn.prop + "-group"
|
|
236
236
|
}), {
|
|
237
|
-
default:
|
|
238
|
-
(
|
|
239
|
-
key:
|
|
240
|
-
column:
|
|
237
|
+
default: y(() => [
|
|
238
|
+
(s(!0), f(B, null, R(e.normalizedColumn.children, (m, d) => (s(), $(o, {
|
|
239
|
+
key: d,
|
|
240
|
+
column: m,
|
|
241
241
|
"current-page": e.currentPage,
|
|
242
242
|
"page-size": e.pageSize
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
name:
|
|
246
|
-
fn:
|
|
247
|
-
|
|
243
|
+
}, ne({ _: 2 }, [
|
|
244
|
+
R(e.$slots, (h, u) => ({
|
|
245
|
+
name: u,
|
|
246
|
+
fn: y((g) => [
|
|
247
|
+
H(e.$slots, u, O({ ref_for: !0 }, g))
|
|
248
248
|
])
|
|
249
249
|
}))
|
|
250
250
|
]), 1032, ["column", "current-page", "page-size"]))), 128))
|
|
251
251
|
]),
|
|
252
252
|
_: 3
|
|
253
|
-
}, 16)) : (
|
|
253
|
+
}, 16)) : (s(), $(p, O({ key: 1 }, e.columnProps, {
|
|
254
254
|
key: e.normalizedColumn.prop,
|
|
255
255
|
index: e.normalizedColumn.indexMethod || e.defaultIndexMethod
|
|
256
|
-
}),
|
|
256
|
+
}), ne({ _: 2 }, [
|
|
257
257
|
!["selection", "index"].includes(e.normalizedColumn.type) && (e.normalizedColumn.type !== "expand" || e.normalizedColumn.slot) ? {
|
|
258
258
|
name: "default",
|
|
259
|
-
fn:
|
|
260
|
-
e.normalizedColumn.slot ?
|
|
259
|
+
fn: y((m) => [
|
|
260
|
+
e.normalizedColumn.slot ? H(e.$slots, e.normalizedColumn.slot, {
|
|
261
261
|
key: 0,
|
|
262
|
-
row:
|
|
263
|
-
index:
|
|
262
|
+
row: m.row,
|
|
263
|
+
index: m.$index,
|
|
264
264
|
column: e.normalizedColumn
|
|
265
|
-
}) : e.normalizedColumn.cellRender ? (
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
}) : e.normalizedColumn.cellRender ? (s(), $(ze(e.renderCell(m)), { key: 1 })) : e.normalizedColumn.formatter ? (s(), f(B, { key: 2 }, [
|
|
266
|
+
Z(K(e.normalizedColumn.formatter(
|
|
267
|
+
m.row,
|
|
268
268
|
e.normalizedColumn,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
m.row[e.normalizedColumn.prop],
|
|
270
|
+
m.$index
|
|
271
271
|
)), 1)
|
|
272
|
-
], 64)) : (
|
|
273
|
-
|
|
272
|
+
], 64)) : (s(), f(B, { key: 3 }, [
|
|
273
|
+
Z(K(m.row[e.normalizedColumn.prop]), 1)
|
|
274
274
|
], 64))
|
|
275
275
|
]),
|
|
276
276
|
key: "0"
|
|
277
277
|
} : void 0
|
|
278
278
|
]), 1040, ["index"]));
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const vt = /* @__PURE__ */ N(gt, [["render", ht]]), _t = b({
|
|
281
281
|
name: "ZxtTable",
|
|
282
282
|
inheritAttrs: !1,
|
|
283
|
-
components: { ZxtPagination:
|
|
283
|
+
components: { ZxtPagination: G, ZxtTableColumn: vt, ElTable: st },
|
|
284
284
|
props: {
|
|
285
285
|
// 表格唯一标识
|
|
286
286
|
id: { type: String, default: "" },
|
|
@@ -321,90 +321,96 @@ const rt = /* @__PURE__ */ N(at, [["render", nt]]), ot = w({
|
|
|
321
321
|
"update:row"
|
|
322
322
|
],
|
|
323
323
|
setup(e, { emit: t }) {
|
|
324
|
-
const a =
|
|
324
|
+
const a = k(null), r = k(e.pageSize), i = k(e.currentPage), c = k(!1), o = k([]), p = k(0), m = k({ prop: "", order: "" }), d = k({});
|
|
325
|
+
J(() => e.currentPage, (_) => {
|
|
326
|
+
i.value = _;
|
|
327
|
+
}), J(() => e.pageSize, (_) => {
|
|
328
|
+
r.value = _;
|
|
329
|
+
});
|
|
330
|
+
const h = C(() => e.height === "full" ? { height: "100%" } : {}), u = C(() => {
|
|
325
331
|
if (e.height !== "full")
|
|
326
332
|
return e.height;
|
|
327
|
-
}),
|
|
328
|
-
() =>
|
|
329
|
-
),
|
|
330
|
-
|
|
331
|
-
},
|
|
332
|
-
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
},
|
|
338
|
-
if (!
|
|
339
|
-
const
|
|
340
|
-
if (typeof
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
const
|
|
333
|
+
}), g = C(() => !!e.proxyConfig), l = C(() => g.value ? p.value : e.total > 0 ? e.total : e.data.length), S = C(
|
|
334
|
+
() => g.value ? o.value : e.data
|
|
335
|
+
), T = (_) => {
|
|
336
|
+
g.value && (i.value = _.page, r.value = _.size, L()), t("size-change", _);
|
|
337
|
+
}, U = (_) => {
|
|
338
|
+
g.value && (i.value = _.page, r.value = _.size, L()), t("page-change", _);
|
|
339
|
+
}, M = ({ column: _, prop: F, order: A }) => {
|
|
340
|
+
m.value = { prop: F, order: A }, g.value && L(), t("sort-change", { column: _, prop: F, order: A });
|
|
341
|
+
}, j = (_) => {
|
|
342
|
+
d.value = _ || {}, g.value && L(), t("filter-change", d.value);
|
|
343
|
+
}, L = async () => {
|
|
344
|
+
if (!g.value) return;
|
|
345
|
+
const _ = e.proxyConfig || {}, F = _.ajax?.query;
|
|
346
|
+
if (typeof F != "function") return;
|
|
347
|
+
const A = _.props || {}, re = A.pageField || "page";
|
|
348
|
+
A.sizeField;
|
|
349
|
+
const ge = A.sortField || "sort", he = A.orderField || "order", ve = A.filtersField || "filters", _e = _.params || {}, E = {
|
|
344
350
|
// page 作为对象(类似 vxe-grid)
|
|
345
|
-
[
|
|
346
|
-
currentPage:
|
|
351
|
+
[re]: {
|
|
352
|
+
currentPage: i.value,
|
|
347
353
|
pageSize: r.value
|
|
348
354
|
},
|
|
349
355
|
// form 数据(从 _formData 中获取)
|
|
350
|
-
form:
|
|
356
|
+
form: _._formData || {},
|
|
351
357
|
// 其他自定义参数(排除 _formData)
|
|
352
|
-
...
|
|
358
|
+
..._e
|
|
353
359
|
};
|
|
354
|
-
|
|
360
|
+
m.value?.prop && (E[ge] = m.value.prop, E[he] = m.value.order), d.value && Object.keys(d.value).length && (E[ve] = d.value), c.value = !0;
|
|
355
361
|
try {
|
|
356
|
-
const P = await
|
|
357
|
-
let
|
|
358
|
-
if (typeof
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
} else P && typeof P == "object" && (
|
|
362
|
-
|
|
363
|
-
data:
|
|
364
|
-
total:
|
|
365
|
-
payload:
|
|
362
|
+
const P = await F(E), X = _.response || {}, Ce = X.listField || "list", we = X.totalField || "total", le = X.transform;
|
|
363
|
+
let q = [], Y = 0;
|
|
364
|
+
if (typeof le == "function") {
|
|
365
|
+
const se = le(P);
|
|
366
|
+
q = se?.list ?? [], Y = se?.total ?? 0;
|
|
367
|
+
} else P && typeof P == "object" && (q = P?.[Ce] ?? P?.data ?? [], Y = P?.[we] ?? P?.total ?? 0);
|
|
368
|
+
o.value = Array.isArray(q) ? q : [], p.value = Number(Y) || 0, t("loaded", {
|
|
369
|
+
data: o.value,
|
|
370
|
+
total: p.value,
|
|
371
|
+
payload: E
|
|
366
372
|
});
|
|
367
373
|
} catch (P) {
|
|
368
374
|
t("load-error", P);
|
|
369
375
|
} finally {
|
|
370
|
-
|
|
376
|
+
c.value = !1;
|
|
371
377
|
}
|
|
372
|
-
},
|
|
373
|
-
|
|
378
|
+
}, oe = (_, F) => {
|
|
379
|
+
g.value ? o.value.splice(F, 1, _) : t("update:row", { index: F, row: _ });
|
|
374
380
|
};
|
|
375
|
-
|
|
376
|
-
|
|
381
|
+
Ue("updateRow", oe), qe(() => {
|
|
382
|
+
g.value && L();
|
|
377
383
|
});
|
|
378
|
-
const
|
|
384
|
+
const pe = () => a.value, fe = () => a.value?.getSelectionRows?.() || [], me = () => L();
|
|
379
385
|
return {
|
|
380
386
|
tableRef: a,
|
|
381
|
-
containerStyle:
|
|
382
|
-
tableHeight:
|
|
383
|
-
getTableRef:
|
|
387
|
+
containerStyle: h,
|
|
388
|
+
tableHeight: u,
|
|
389
|
+
getTableRef: pe,
|
|
384
390
|
pageSize: r,
|
|
385
|
-
currentPage:
|
|
386
|
-
loading:
|
|
387
|
-
renderData:
|
|
391
|
+
currentPage: i,
|
|
392
|
+
loading: c,
|
|
393
|
+
renderData: S,
|
|
388
394
|
total: l,
|
|
389
|
-
pageSizes:
|
|
390
|
-
paginationLayout:
|
|
391
|
-
handleSizeChange:
|
|
392
|
-
handlePageChange:
|
|
393
|
-
handleSortChange:
|
|
394
|
-
handleFilterChange:
|
|
395
|
-
reload:
|
|
396
|
-
getSelectedRows:
|
|
397
|
-
updateRow:
|
|
395
|
+
pageSizes: C(() => e.pageSizes),
|
|
396
|
+
paginationLayout: C(() => e.paginationLayout),
|
|
397
|
+
handleSizeChange: T,
|
|
398
|
+
handlePageChange: U,
|
|
399
|
+
handleSortChange: M,
|
|
400
|
+
handleFilterChange: j,
|
|
401
|
+
reload: me,
|
|
402
|
+
getSelectedRows: fe,
|
|
403
|
+
updateRow: oe
|
|
398
404
|
};
|
|
399
405
|
}
|
|
400
406
|
});
|
|
401
|
-
function
|
|
402
|
-
const
|
|
403
|
-
return
|
|
404
|
-
class:
|
|
405
|
-
style:
|
|
407
|
+
function Ct(e, t, a, r, i, c) {
|
|
408
|
+
const o = z("ZxtTableColumn"), p = z("el-table"), m = z("ZxtPagination"), d = We("loading");
|
|
409
|
+
return s(), f("div", {
|
|
410
|
+
class: ce(["zxt-table-container", { "zxt-table-container--full": e.height === "full" }]),
|
|
411
|
+
style: Ge(e.containerStyle)
|
|
406
412
|
}, [
|
|
407
|
-
|
|
413
|
+
Je((s(), $(p, O({
|
|
408
414
|
ref: "tableRef",
|
|
409
415
|
data: e.renderData,
|
|
410
416
|
height: e.tableHeight
|
|
@@ -413,40 +419,40 @@ function lt(e, t, a, r, o, p) {
|
|
|
413
419
|
onSortChange: e.handleSortChange,
|
|
414
420
|
onFilterChange: e.handleFilterChange
|
|
415
421
|
}), {
|
|
416
|
-
default:
|
|
417
|
-
(
|
|
418
|
-
key:
|
|
419
|
-
column:
|
|
422
|
+
default: y(() => [
|
|
423
|
+
(s(!0), f(B, null, R(e.columns, (h, u) => (s(), $(o, {
|
|
424
|
+
key: u,
|
|
425
|
+
column: h,
|
|
420
426
|
"current-page": e.currentPage,
|
|
421
427
|
"page-size": e.pageSize
|
|
422
|
-
},
|
|
423
|
-
|
|
428
|
+
}, ne({ _: 2 }, [
|
|
429
|
+
R(e.$slots, (g, l) => ({
|
|
424
430
|
name: l,
|
|
425
|
-
fn:
|
|
426
|
-
|
|
431
|
+
fn: y((S) => [
|
|
432
|
+
H(e.$slots, l, O({ ref_for: !0 }, S), void 0, !0)
|
|
427
433
|
])
|
|
428
434
|
}))
|
|
429
435
|
]), 1032, ["column", "current-page", "page-size"]))), 128))
|
|
430
436
|
]),
|
|
431
437
|
_: 3
|
|
432
438
|
}, 16, ["data", "height", "id", "onSortChange", "onFilterChange"])), [
|
|
433
|
-
[
|
|
439
|
+
[d, e.loading]
|
|
434
440
|
]),
|
|
435
|
-
e.pageable ? (
|
|
441
|
+
e.pageable ? (s(), $(m, {
|
|
436
442
|
key: 0,
|
|
437
443
|
"model-value": e.currentPage,
|
|
438
444
|
"page-size": e.pageSize,
|
|
439
|
-
"onUpdate:pageSize": t[0] || (t[0] = (
|
|
445
|
+
"onUpdate:pageSize": t[0] || (t[0] = (h) => e.pageSize = h),
|
|
440
446
|
"page-sizes": e.pageSizes,
|
|
441
447
|
total: e.total,
|
|
442
448
|
layout: e.paginationLayout,
|
|
443
449
|
onPageChange: e.handlePageChange,
|
|
444
450
|
onSizeChange: e.handleSizeChange
|
|
445
|
-
}, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) :
|
|
451
|
+
}, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) : Q("", !0)
|
|
446
452
|
], 6);
|
|
447
453
|
}
|
|
448
|
-
const
|
|
449
|
-
class
|
|
454
|
+
const x = /* @__PURE__ */ N(_t, [["render", Ct], ["__scopeId", "data-v-f7d3d1ec"]]), I = /* @__PURE__ */ new Map();
|
|
455
|
+
class wt {
|
|
450
456
|
/**
|
|
451
457
|
* 注册自定义渲染器
|
|
452
458
|
* @param {String} name - 渲染器名称
|
|
@@ -460,7 +466,7 @@ class st {
|
|
|
460
466
|
* })
|
|
461
467
|
*/
|
|
462
468
|
add(t, a) {
|
|
463
|
-
return !t || typeof t != "string" ? (console.warn("[ZxtTable] 渲染器名称必须是字符串"), this) : !a || typeof a != "object" ? (console.warn("[ZxtTable] 渲染器配置必须是对象"), this) : (
|
|
469
|
+
return !t || typeof t != "string" ? (console.warn("[ZxtTable] 渲染器名称必须是字符串"), this) : !a || typeof a != "object" ? (console.warn("[ZxtTable] 渲染器配置必须是对象"), this) : (I.has(t) && console.warn(`[ZxtTable] 渲染器 "${t}" 已存在,将被覆盖`), I.set(t, a), this);
|
|
464
470
|
}
|
|
465
471
|
/**
|
|
466
472
|
* 获取渲染器
|
|
@@ -468,14 +474,14 @@ class st {
|
|
|
468
474
|
* @returns {Object|undefined}
|
|
469
475
|
*/
|
|
470
476
|
get(t) {
|
|
471
|
-
return
|
|
477
|
+
return I.get(t);
|
|
472
478
|
}
|
|
473
479
|
/**
|
|
474
480
|
* 删除渲染器
|
|
475
481
|
* @param {String} name - 渲染器名称
|
|
476
482
|
*/
|
|
477
483
|
delete(t) {
|
|
478
|
-
return
|
|
484
|
+
return I.delete(t);
|
|
479
485
|
}
|
|
480
486
|
/**
|
|
481
487
|
* 检查渲染器是否存在
|
|
@@ -483,191 +489,332 @@ class st {
|
|
|
483
489
|
* @returns {Boolean}
|
|
484
490
|
*/
|
|
485
491
|
has(t) {
|
|
486
|
-
return
|
|
492
|
+
return I.has(t);
|
|
487
493
|
}
|
|
488
494
|
/**
|
|
489
495
|
* 获取所有渲染器名称
|
|
490
496
|
* @returns {Array<String>}
|
|
491
497
|
*/
|
|
492
498
|
getAll() {
|
|
493
|
-
return Array.from(
|
|
499
|
+
return Array.from(I.keys());
|
|
494
500
|
}
|
|
495
501
|
/**
|
|
496
502
|
* 清空所有自定义渲染器
|
|
497
503
|
*/
|
|
498
504
|
clear() {
|
|
499
|
-
|
|
505
|
+
I.clear();
|
|
500
506
|
}
|
|
501
507
|
}
|
|
502
|
-
const
|
|
503
|
-
function
|
|
508
|
+
const Se = new wt();
|
|
509
|
+
function bt(e, t, a = {}) {
|
|
504
510
|
if (!e || !e.itemRender)
|
|
505
511
|
return null;
|
|
506
512
|
const { name: r } = e.itemRender;
|
|
507
|
-
if (r &&
|
|
508
|
-
const
|
|
509
|
-
if (typeof
|
|
510
|
-
const
|
|
513
|
+
if (r && Se.has(r)) {
|
|
514
|
+
const i = Se.get(r);
|
|
515
|
+
if (typeof i.renderItemContent == "function") {
|
|
516
|
+
const c = {
|
|
511
517
|
data: t,
|
|
512
518
|
field: e.field || e.prop,
|
|
513
519
|
item: e,
|
|
514
520
|
formData: t
|
|
515
521
|
};
|
|
516
522
|
try {
|
|
517
|
-
return
|
|
518
|
-
} catch (
|
|
519
|
-
return console.error(`[ZxtTable] 渲染器 "${r}" 执行出错:`,
|
|
523
|
+
return i.renderItemContent(a, c);
|
|
524
|
+
} catch (o) {
|
|
525
|
+
return console.error(`[ZxtTable] 渲染器 "${r}" 执行出错:`, o), null;
|
|
520
526
|
}
|
|
521
527
|
}
|
|
522
528
|
}
|
|
523
529
|
return null;
|
|
524
530
|
}
|
|
525
|
-
|
|
526
|
-
e.component(
|
|
531
|
+
x.install = function(e) {
|
|
532
|
+
e.component(x.name, x);
|
|
527
533
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
534
|
+
x.registerRenderer = mt;
|
|
535
|
+
x.renderer = Se;
|
|
536
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
537
|
+
var yt = /* @__PURE__ */ b({
|
|
538
|
+
name: "ArrowDown",
|
|
539
|
+
__name: "arrow-down",
|
|
540
|
+
setup(e) {
|
|
541
|
+
return (t, a) => (s(), f("svg", {
|
|
542
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
543
|
+
viewBox: "0 0 1024 1024"
|
|
544
|
+
}, [
|
|
545
|
+
w("path", {
|
|
546
|
+
fill: "currentColor",
|
|
547
|
+
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"
|
|
548
|
+
})
|
|
549
|
+
]));
|
|
550
|
+
}
|
|
551
|
+
}), Oe = yt, zt = /* @__PURE__ */ b({
|
|
552
|
+
name: "Check",
|
|
553
|
+
__name: "check",
|
|
554
|
+
setup(e) {
|
|
555
|
+
return (t, a) => (s(), f("svg", {
|
|
556
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
557
|
+
viewBox: "0 0 1024 1024"
|
|
558
|
+
}, [
|
|
559
|
+
w("path", {
|
|
560
|
+
fill: "currentColor",
|
|
561
|
+
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"
|
|
562
|
+
})
|
|
563
|
+
]));
|
|
564
|
+
}
|
|
565
|
+
}), St = zt, kt = /* @__PURE__ */ b({
|
|
566
|
+
name: "Close",
|
|
567
|
+
__name: "close",
|
|
568
|
+
setup(e) {
|
|
569
|
+
return (t, a) => (s(), f("svg", {
|
|
570
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
571
|
+
viewBox: "0 0 1024 1024"
|
|
572
|
+
}, [
|
|
573
|
+
w("path", {
|
|
574
|
+
fill: "currentColor",
|
|
575
|
+
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"
|
|
576
|
+
})
|
|
577
|
+
]));
|
|
578
|
+
}
|
|
579
|
+
}), $t = kt, Vt = /* @__PURE__ */ b({
|
|
580
|
+
name: "CopyDocument",
|
|
581
|
+
__name: "copy-document",
|
|
582
|
+
setup(e) {
|
|
583
|
+
return (t, a) => (s(), f("svg", {
|
|
584
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
585
|
+
viewBox: "0 0 1024 1024"
|
|
586
|
+
}, [
|
|
587
|
+
w("path", {
|
|
588
|
+
fill: "currentColor",
|
|
589
|
+
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"
|
|
590
|
+
}),
|
|
591
|
+
w("path", {
|
|
592
|
+
fill: "currentColor",
|
|
593
|
+
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"
|
|
594
|
+
})
|
|
595
|
+
]));
|
|
596
|
+
}
|
|
597
|
+
}), Pt = Vt, Rt = /* @__PURE__ */ b({
|
|
531
598
|
name: "Delete",
|
|
532
599
|
__name: "delete",
|
|
533
600
|
setup(e) {
|
|
534
|
-
return (t, a) => (
|
|
601
|
+
return (t, a) => (s(), f("svg", {
|
|
535
602
|
xmlns: "http://www.w3.org/2000/svg",
|
|
536
603
|
viewBox: "0 0 1024 1024"
|
|
537
604
|
}, [
|
|
538
|
-
|
|
605
|
+
w("path", {
|
|
539
606
|
fill: "currentColor",
|
|
540
607
|
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"
|
|
541
608
|
})
|
|
542
609
|
]));
|
|
543
610
|
}
|
|
544
|
-
}),
|
|
611
|
+
}), ke = Rt, Ft = /* @__PURE__ */ b({
|
|
612
|
+
name: "Document",
|
|
613
|
+
__name: "document",
|
|
614
|
+
setup(e) {
|
|
615
|
+
return (t, a) => (s(), f("svg", {
|
|
616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
617
|
+
viewBox: "0 0 1024 1024"
|
|
618
|
+
}, [
|
|
619
|
+
w("path", {
|
|
620
|
+
fill: "currentColor",
|
|
621
|
+
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"
|
|
622
|
+
})
|
|
623
|
+
]));
|
|
624
|
+
}
|
|
625
|
+
}), At = Ft, Dt = /* @__PURE__ */ b({
|
|
545
626
|
name: "Download",
|
|
546
627
|
__name: "download",
|
|
547
628
|
setup(e) {
|
|
548
|
-
return (t, a) => (
|
|
629
|
+
return (t, a) => (s(), f("svg", {
|
|
549
630
|
xmlns: "http://www.w3.org/2000/svg",
|
|
550
631
|
viewBox: "0 0 1024 1024"
|
|
551
632
|
}, [
|
|
552
|
-
|
|
633
|
+
w("path", {
|
|
553
634
|
fill: "currentColor",
|
|
554
635
|
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"
|
|
555
636
|
})
|
|
556
637
|
]));
|
|
557
638
|
}
|
|
558
|
-
}),
|
|
639
|
+
}), $e = Dt, xt = /* @__PURE__ */ b({
|
|
559
640
|
name: "Edit",
|
|
560
641
|
__name: "edit",
|
|
561
642
|
setup(e) {
|
|
562
|
-
return (t, a) => (
|
|
643
|
+
return (t, a) => (s(), f("svg", {
|
|
563
644
|
xmlns: "http://www.w3.org/2000/svg",
|
|
564
645
|
viewBox: "0 0 1024 1024"
|
|
565
646
|
}, [
|
|
566
|
-
|
|
647
|
+
w("path", {
|
|
567
648
|
fill: "currentColor",
|
|
568
649
|
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"
|
|
569
650
|
}),
|
|
570
|
-
|
|
651
|
+
w("path", {
|
|
571
652
|
fill: "currentColor",
|
|
572
653
|
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"
|
|
573
654
|
})
|
|
574
655
|
]));
|
|
575
656
|
}
|
|
576
|
-
}),
|
|
657
|
+
}), Ve = xt, Mt = /* @__PURE__ */ b({
|
|
658
|
+
name: "Lock",
|
|
659
|
+
__name: "lock",
|
|
660
|
+
setup(e) {
|
|
661
|
+
return (t, a) => (s(), f("svg", {
|
|
662
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
663
|
+
viewBox: "0 0 1024 1024"
|
|
664
|
+
}, [
|
|
665
|
+
w("path", {
|
|
666
|
+
fill: "currentColor",
|
|
667
|
+
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"
|
|
668
|
+
}),
|
|
669
|
+
w("path", {
|
|
670
|
+
fill: "currentColor",
|
|
671
|
+
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"
|
|
672
|
+
})
|
|
673
|
+
]));
|
|
674
|
+
}
|
|
675
|
+
}), Ot = Mt, Bt = /* @__PURE__ */ b({
|
|
577
676
|
name: "Plus",
|
|
578
677
|
__name: "plus",
|
|
579
678
|
setup(e) {
|
|
580
|
-
return (t, a) => (
|
|
679
|
+
return (t, a) => (s(), f("svg", {
|
|
581
680
|
xmlns: "http://www.w3.org/2000/svg",
|
|
582
681
|
viewBox: "0 0 1024 1024"
|
|
583
682
|
}, [
|
|
584
|
-
|
|
683
|
+
w("path", {
|
|
585
684
|
fill: "currentColor",
|
|
586
685
|
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"
|
|
587
686
|
})
|
|
588
687
|
]));
|
|
589
688
|
}
|
|
590
|
-
}),
|
|
689
|
+
}), Pe = Bt, Tt = /* @__PURE__ */ b({
|
|
591
690
|
name: "Refresh",
|
|
592
691
|
__name: "refresh",
|
|
593
692
|
setup(e) {
|
|
594
|
-
return (t, a) => (
|
|
693
|
+
return (t, a) => (s(), f("svg", {
|
|
595
694
|
xmlns: "http://www.w3.org/2000/svg",
|
|
596
695
|
viewBox: "0 0 1024 1024"
|
|
597
696
|
}, [
|
|
598
|
-
|
|
697
|
+
w("path", {
|
|
599
698
|
fill: "currentColor",
|
|
600
699
|
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"
|
|
601
700
|
})
|
|
602
701
|
]));
|
|
603
702
|
}
|
|
604
|
-
}),
|
|
703
|
+
}), ue = Tt, Lt = /* @__PURE__ */ b({
|
|
605
704
|
name: "Search",
|
|
606
705
|
__name: "search",
|
|
607
706
|
setup(e) {
|
|
608
|
-
return (t, a) => (
|
|
707
|
+
return (t, a) => (s(), f("svg", {
|
|
609
708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
610
709
|
viewBox: "0 0 1024 1024"
|
|
611
710
|
}, [
|
|
612
|
-
|
|
711
|
+
w("path", {
|
|
613
712
|
fill: "currentColor",
|
|
614
713
|
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"
|
|
615
714
|
})
|
|
616
715
|
]));
|
|
617
716
|
}
|
|
618
|
-
}),
|
|
717
|
+
}), de = Lt, Ht = /* @__PURE__ */ b({
|
|
619
718
|
name: "Setting",
|
|
620
719
|
__name: "setting",
|
|
621
720
|
setup(e) {
|
|
622
|
-
return (t, a) => (
|
|
721
|
+
return (t, a) => (s(), f("svg", {
|
|
623
722
|
xmlns: "http://www.w3.org/2000/svg",
|
|
624
723
|
viewBox: "0 0 1024 1024"
|
|
625
724
|
}, [
|
|
626
|
-
|
|
725
|
+
w("path", {
|
|
627
726
|
fill: "currentColor",
|
|
628
727
|
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"
|
|
629
728
|
})
|
|
630
729
|
]));
|
|
631
730
|
}
|
|
632
|
-
}),
|
|
731
|
+
}), Re = Ht, Zt = /* @__PURE__ */ b({
|
|
732
|
+
name: "Share",
|
|
733
|
+
__name: "share",
|
|
734
|
+
setup(e) {
|
|
735
|
+
return (t, a) => (s(), f("svg", {
|
|
736
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
737
|
+
viewBox: "0 0 1024 1024"
|
|
738
|
+
}, [
|
|
739
|
+
w("path", {
|
|
740
|
+
fill: "currentColor",
|
|
741
|
+
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"
|
|
742
|
+
})
|
|
743
|
+
]));
|
|
744
|
+
}
|
|
745
|
+
}), jt = Zt, Et = /* @__PURE__ */ b({
|
|
746
|
+
name: "Unlock",
|
|
747
|
+
__name: "unlock",
|
|
748
|
+
setup(e) {
|
|
749
|
+
return (t, a) => (s(), f("svg", {
|
|
750
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
751
|
+
viewBox: "0 0 1024 1024"
|
|
752
|
+
}, [
|
|
753
|
+
w("path", {
|
|
754
|
+
fill: "currentColor",
|
|
755
|
+
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"
|
|
756
|
+
}),
|
|
757
|
+
w("path", {
|
|
758
|
+
fill: "currentColor",
|
|
759
|
+
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"
|
|
760
|
+
})
|
|
761
|
+
]));
|
|
762
|
+
}
|
|
763
|
+
}), It = Et, Nt = /* @__PURE__ */ b({
|
|
633
764
|
name: "Upload",
|
|
634
765
|
__name: "upload",
|
|
635
766
|
setup(e) {
|
|
636
|
-
return (t, a) => (
|
|
767
|
+
return (t, a) => (s(), f("svg", {
|
|
637
768
|
xmlns: "http://www.w3.org/2000/svg",
|
|
638
769
|
viewBox: "0 0 1024 1024"
|
|
639
770
|
}, [
|
|
640
|
-
|
|
771
|
+
w("path", {
|
|
641
772
|
fill: "currentColor",
|
|
642
773
|
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"
|
|
643
774
|
})
|
|
644
775
|
]));
|
|
645
776
|
}
|
|
646
|
-
}),
|
|
777
|
+
}), Fe = Nt, Ut = /* @__PURE__ */ b({
|
|
647
778
|
name: "View",
|
|
648
779
|
__name: "view",
|
|
649
780
|
setup(e) {
|
|
650
|
-
return (t, a) => (
|
|
781
|
+
return (t, a) => (s(), f("svg", {
|
|
651
782
|
xmlns: "http://www.w3.org/2000/svg",
|
|
652
783
|
viewBox: "0 0 1024 1024"
|
|
653
784
|
}, [
|
|
654
|
-
|
|
785
|
+
w("path", {
|
|
655
786
|
fill: "currentColor",
|
|
656
787
|
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"
|
|
657
788
|
})
|
|
658
789
|
]));
|
|
659
790
|
}
|
|
660
|
-
}),
|
|
661
|
-
|
|
791
|
+
}), Ae = Ut, qt = /* @__PURE__ */ b({
|
|
792
|
+
name: "Warning",
|
|
793
|
+
__name: "warning",
|
|
794
|
+
setup(e) {
|
|
795
|
+
return (t, a) => (s(), f("svg", {
|
|
796
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
797
|
+
viewBox: "0 0 1024 1024"
|
|
798
|
+
}, [
|
|
799
|
+
w("path", {
|
|
800
|
+
fill: "currentColor",
|
|
801
|
+
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"
|
|
802
|
+
})
|
|
803
|
+
]));
|
|
804
|
+
}
|
|
805
|
+
}), Wt = qt;
|
|
806
|
+
const Gt = b({
|
|
662
807
|
name: "ZxtForm",
|
|
808
|
+
inheritAttrs: !1,
|
|
663
809
|
props: {
|
|
664
810
|
formColumns: { type: Array, default: () => [] },
|
|
665
811
|
initialFormData: { type: Object, default: () => ({}) },
|
|
666
|
-
rules: { type: Object, default: () => ({}) }
|
|
812
|
+
rules: { type: Object, default: () => ({}) },
|
|
813
|
+
labelWidth: { type: String, default: "100px" }
|
|
667
814
|
},
|
|
668
815
|
emits: ["submit", "reset"],
|
|
669
816
|
setup(e, { emit: t, expose: a }) {
|
|
670
|
-
const r =
|
|
817
|
+
const r = k(null), i = Ke({}), c = {
|
|
671
818
|
input: "el-input",
|
|
672
819
|
select: "el-select",
|
|
673
820
|
date: "el-date-picker",
|
|
@@ -675,47 +822,50 @@ const yt = w({
|
|
|
675
822
|
datetime: "el-date-picker",
|
|
676
823
|
datetimerange: "el-date-picker",
|
|
677
824
|
cascader: "el-cascader"
|
|
678
|
-
},
|
|
679
|
-
const
|
|
825
|
+
}, o = (l) => c[l] || "el-input", p = (l) => {
|
|
826
|
+
const S = l.type || "input", T = [
|
|
680
827
|
"select",
|
|
681
828
|
"date",
|
|
682
829
|
"daterange",
|
|
683
830
|
"datetime",
|
|
684
831
|
"datetimerange",
|
|
685
832
|
"cascader"
|
|
686
|
-
].includes(
|
|
687
|
-
placeholder: l.placeholder || `请${
|
|
833
|
+
].includes(S), U = {
|
|
834
|
+
placeholder: l.placeholder || `请${T ? "选择" : "输入"}${l.label}`,
|
|
688
835
|
disabled: l.disabled,
|
|
689
836
|
style: "width: 100%",
|
|
690
837
|
"popper-class": "zxt-form-popper"
|
|
691
838
|
};
|
|
692
|
-
|
|
839
|
+
let M = {};
|
|
840
|
+
switch (S) {
|
|
693
841
|
case "date":
|
|
694
842
|
case "daterange":
|
|
695
843
|
case "datetime":
|
|
696
844
|
case "datetimerange":
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
type: l.dateType || v,
|
|
845
|
+
M = {
|
|
846
|
+
type: l.dateType || S,
|
|
700
847
|
startPlaceholder: l.startPlaceholder || "开始日期",
|
|
701
848
|
endPlaceholder: l.endPlaceholder || "结束日期",
|
|
702
849
|
format: l.format,
|
|
703
850
|
valueFormat: l.valueFormat
|
|
704
851
|
};
|
|
852
|
+
break;
|
|
705
853
|
case "cascader":
|
|
706
|
-
|
|
707
|
-
...T,
|
|
854
|
+
M = {
|
|
708
855
|
options: l.options,
|
|
709
856
|
props: l.cascaderProps,
|
|
710
857
|
clearable: l.clearable !== !1
|
|
711
858
|
};
|
|
712
|
-
|
|
713
|
-
return T;
|
|
714
|
-
case "input":
|
|
859
|
+
break;
|
|
715
860
|
default:
|
|
716
|
-
|
|
861
|
+
M = {};
|
|
717
862
|
}
|
|
718
|
-
|
|
863
|
+
const j = {
|
|
864
|
+
...U,
|
|
865
|
+
...M
|
|
866
|
+
};
|
|
867
|
+
return "clearable" in l && (j.clearable = l.clearable), l.props && typeof l.props == "object" && Object.assign(j, l.props), j;
|
|
868
|
+
}, m = C(() => e.formColumns.map((l) => ({
|
|
719
869
|
...l,
|
|
720
870
|
colSpan: {
|
|
721
871
|
xs: l.xs ?? l.span ?? 24,
|
|
@@ -725,107 +875,106 @@ const yt = w({
|
|
|
725
875
|
xl: l.xl ?? l.span ?? 12
|
|
726
876
|
}
|
|
727
877
|
})));
|
|
728
|
-
|
|
878
|
+
J(
|
|
729
879
|
() => e.initialFormData,
|
|
730
880
|
(l) => {
|
|
731
|
-
Object.keys(
|
|
732
|
-
delete
|
|
733
|
-
}), Object.assign(
|
|
881
|
+
Object.keys(i).forEach((S) => {
|
|
882
|
+
delete i[S];
|
|
883
|
+
}), Object.assign(i, l);
|
|
734
884
|
},
|
|
735
885
|
{ immediate: !0, deep: !0 }
|
|
736
886
|
);
|
|
737
|
-
const
|
|
887
|
+
const d = C(() => {
|
|
738
888
|
const l = { ...e.rules };
|
|
739
|
-
return Object.keys(l).length === 0 && e.formColumns.length > 0 && e.formColumns.forEach((
|
|
740
|
-
if (
|
|
741
|
-
const
|
|
889
|
+
return Object.keys(l).length === 0 && e.formColumns.length > 0 && e.formColumns.forEach((S) => {
|
|
890
|
+
if (S.required) {
|
|
891
|
+
const T = [
|
|
742
892
|
"select",
|
|
743
893
|
"date",
|
|
744
894
|
"daterange",
|
|
745
895
|
"datetime",
|
|
746
896
|
"datetimerange",
|
|
747
897
|
"cascader"
|
|
748
|
-
].includes(
|
|
749
|
-
l[
|
|
898
|
+
].includes(S.type);
|
|
899
|
+
l[S.prop] = [
|
|
750
900
|
{
|
|
751
901
|
required: !0,
|
|
752
|
-
message: `请${
|
|
753
|
-
trigger:
|
|
902
|
+
message: `请${T ? "选择" : "输入"}${S.label}`,
|
|
903
|
+
trigger: T ? "change" : "blur"
|
|
754
904
|
}
|
|
755
905
|
];
|
|
756
906
|
}
|
|
757
907
|
}), l;
|
|
758
|
-
}),
|
|
908
|
+
}), h = () => {
|
|
759
909
|
r.value && r.value.validate((l) => {
|
|
760
|
-
l && t("submit", { ...
|
|
910
|
+
l && t("submit", { ...i });
|
|
761
911
|
});
|
|
762
|
-
},
|
|
912
|
+
}, u = () => {
|
|
763
913
|
r.value && r.value.resetFields(), t("reset");
|
|
764
|
-
},
|
|
914
|
+
}, g = (l) => () => bt(l, i, {}) || null;
|
|
765
915
|
return a({
|
|
766
916
|
validate: () => r.value ? r.value.validate() : Promise.resolve(!1),
|
|
767
917
|
resetFields: () => r.value && r.value.resetFields(),
|
|
768
|
-
getFormData: () => ({ ...
|
|
769
|
-
submitForm:
|
|
770
|
-
resetForm:
|
|
918
|
+
getFormData: () => ({ ...i }),
|
|
919
|
+
submitForm: h,
|
|
920
|
+
resetForm: u
|
|
771
921
|
}), {
|
|
772
922
|
formRef: r,
|
|
773
|
-
formData:
|
|
774
|
-
formRules:
|
|
775
|
-
submitForm:
|
|
776
|
-
resetForm:
|
|
777
|
-
processedColumns:
|
|
778
|
-
getComponentType:
|
|
779
|
-
getComponentProps:
|
|
780
|
-
renderCustomItem:
|
|
923
|
+
formData: i,
|
|
924
|
+
formRules: d,
|
|
925
|
+
submitForm: h,
|
|
926
|
+
resetForm: u,
|
|
927
|
+
processedColumns: m,
|
|
928
|
+
getComponentType: o,
|
|
929
|
+
getComponentProps: p,
|
|
930
|
+
renderCustomItem: g
|
|
781
931
|
};
|
|
782
932
|
}
|
|
783
|
-
}),
|
|
933
|
+
}), Jt = { class: "zxt-form-container" }, Kt = {
|
|
784
934
|
key: 0,
|
|
785
935
|
class: "form-label"
|
|
786
|
-
},
|
|
787
|
-
function
|
|
788
|
-
const
|
|
789
|
-
return
|
|
790
|
-
|
|
791
|
-
ref: "formRef",
|
|
936
|
+
}, Qt = { class: "form-control" };
|
|
937
|
+
function Xt(e, t, a, r, i, c) {
|
|
938
|
+
const o = z("el-option"), p = z("el-form-item"), m = z("el-col"), d = z("el-row"), h = z("el-form");
|
|
939
|
+
return s(), f("div", Jt, [
|
|
940
|
+
V(h, O({ ref: "formRef" }, e.$attrs, {
|
|
792
941
|
model: e.formData,
|
|
793
942
|
rules: e.formRules,
|
|
794
|
-
"label-width":
|
|
943
|
+
"label-width": e.labelWidth,
|
|
795
944
|
class: "zxt-form"
|
|
796
|
-
}, {
|
|
797
|
-
default:
|
|
798
|
-
|
|
799
|
-
default:
|
|
800
|
-
(
|
|
801
|
-
default:
|
|
802
|
-
|
|
803
|
-
prop:
|
|
804
|
-
required:
|
|
945
|
+
}), {
|
|
946
|
+
default: y(() => [
|
|
947
|
+
V(d, { gutter: 20 }, {
|
|
948
|
+
default: y(() => [
|
|
949
|
+
(s(!0), f(B, null, R(e.processedColumns, (u, g) => (s(), $(m, O({ key: g }, { ref_for: !0 }, u.colSpan), {
|
|
950
|
+
default: y(() => [
|
|
951
|
+
V(p, {
|
|
952
|
+
prop: u.prop,
|
|
953
|
+
required: u.required,
|
|
805
954
|
"label-width": "0",
|
|
806
955
|
class: "custom-form-item"
|
|
807
956
|
}, {
|
|
808
|
-
default:
|
|
809
|
-
|
|
810
|
-
class:
|
|
957
|
+
default: y(() => [
|
|
958
|
+
w("div", {
|
|
959
|
+
class: ce(["form-item-wrapper", { "is-action": u.isAction }])
|
|
811
960
|
}, [
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
961
|
+
u.label ? (s(), f("span", Kt, K(u.label), 1)) : Q("", !0),
|
|
962
|
+
w("div", Qt, [
|
|
963
|
+
u.type === "slot" ? H(e.$slots, u.slotName || u.prop, {
|
|
815
964
|
key: 0,
|
|
816
965
|
formData: e.formData,
|
|
817
|
-
column:
|
|
818
|
-
}, void 0, !0) :
|
|
966
|
+
column: u
|
|
967
|
+
}, void 0, !0) : u.itemRender ? (s(), $(ze(e.renderCustomItem(u)), { key: 1 })) : (s(), $(ze(e.getComponentType(u.type)), O({
|
|
819
968
|
key: 2,
|
|
820
|
-
modelValue: e.formData[
|
|
821
|
-
"onUpdate:modelValue": (l) => e.formData[
|
|
822
|
-
}, { ref_for: !0 }, e.getComponentProps(
|
|
823
|
-
default:
|
|
824
|
-
|
|
825
|
-
key:
|
|
969
|
+
modelValue: e.formData[u.prop],
|
|
970
|
+
"onUpdate:modelValue": (l) => e.formData[u.prop] = l
|
|
971
|
+
}, { ref_for: !0 }, e.getComponentProps(u), Qe(u.events || {})), {
|
|
972
|
+
default: y(() => [
|
|
973
|
+
u.type === "select" ? (s(!0), f(B, { key: 0 }, R(u.options, (l, S) => (s(), $(o, {
|
|
974
|
+
key: S,
|
|
826
975
|
label: l.label,
|
|
827
976
|
value: l.value
|
|
828
|
-
}, null, 8, ["label", "value"]))), 128)) :
|
|
977
|
+
}, null, 8, ["label", "value"]))), 128)) : Q("", !0)
|
|
829
978
|
]),
|
|
830
979
|
_: 2
|
|
831
980
|
}, 1040, ["modelValue", "onUpdate:modelValue"]))
|
|
@@ -842,24 +991,146 @@ function wt(e, t, a, r, o, p) {
|
|
|
842
991
|
})
|
|
843
992
|
]),
|
|
844
993
|
_: 3
|
|
845
|
-
},
|
|
994
|
+
}, 16, ["model", "rules", "label-width"])
|
|
846
995
|
]);
|
|
847
996
|
}
|
|
848
|
-
const
|
|
997
|
+
const De = /* @__PURE__ */ N(Gt, [["render", Xt], ["__scopeId", "data-v-6b22a57b"]]), Yt = {
|
|
998
|
+
Plus: Pe,
|
|
999
|
+
Delete: ke,
|
|
1000
|
+
Refresh: ue,
|
|
1001
|
+
Download: $e,
|
|
1002
|
+
Search: de,
|
|
1003
|
+
Edit: Ve,
|
|
1004
|
+
View: Ae,
|
|
1005
|
+
Upload: Fe,
|
|
1006
|
+
Setting: Re,
|
|
1007
|
+
Warning: Wt,
|
|
1008
|
+
Check: St,
|
|
1009
|
+
Close: $t,
|
|
1010
|
+
Document: At,
|
|
1011
|
+
CopyDocument: Pt,
|
|
1012
|
+
Share: jt,
|
|
1013
|
+
Lock: Ot,
|
|
1014
|
+
Unlock: It,
|
|
1015
|
+
ArrowDown: Oe
|
|
1016
|
+
}, ea = b({
|
|
1017
|
+
name: "ActionColumn",
|
|
1018
|
+
components: { ArrowDown: Oe },
|
|
1019
|
+
props: {
|
|
1020
|
+
buttons: {
|
|
1021
|
+
type: Array,
|
|
1022
|
+
default: () => []
|
|
1023
|
+
},
|
|
1024
|
+
row: {
|
|
1025
|
+
type: Object,
|
|
1026
|
+
default: () => ({})
|
|
1027
|
+
},
|
|
1028
|
+
maxVisible: {
|
|
1029
|
+
type: Number,
|
|
1030
|
+
default: 2
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
emits: ["action-click"],
|
|
1034
|
+
setup(e, { emit: t }) {
|
|
1035
|
+
const a = C(() => e.buttons.filter((d) => typeof d.visible == "function" ? d.visible(e.row) : typeof d.visible == "boolean" ? d.visible : !0)), r = C(
|
|
1036
|
+
() => a.value.length > e.maxVisible
|
|
1037
|
+
), i = C(
|
|
1038
|
+
() => r.value ? a.value.slice(0, e.maxVisible) : a.value
|
|
1039
|
+
), c = C(
|
|
1040
|
+
() => r.value ? a.value.slice(e.maxVisible) : []
|
|
1041
|
+
);
|
|
1042
|
+
return {
|
|
1043
|
+
visibleButtons: i,
|
|
1044
|
+
overflowButtons: c,
|
|
1045
|
+
getIconComponent: (d) => {
|
|
1046
|
+
if (d)
|
|
1047
|
+
return typeof d == "object" || typeof d == "function" ? d : Yt[d];
|
|
1048
|
+
},
|
|
1049
|
+
handleClick: (d) => {
|
|
1050
|
+
t("action-click", { code: d.code, button: d, row: e.row });
|
|
1051
|
+
},
|
|
1052
|
+
handleCommand: (d) => {
|
|
1053
|
+
t("action-click", { code: d.code, button: d, row: e.row });
|
|
1054
|
+
}
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
}), ta = { class: "action-column" };
|
|
1058
|
+
function aa(e, t, a, r, i, c) {
|
|
1059
|
+
const o = z("el-button"), p = z("ArrowDown"), m = z("el-icon"), d = z("el-dropdown-item"), h = z("el-dropdown-menu"), u = z("el-dropdown");
|
|
1060
|
+
return s(), f("div", ta, [
|
|
1061
|
+
(s(!0), f(B, null, R(e.visibleButtons, (g) => (s(), $(o, {
|
|
1062
|
+
key: g.code,
|
|
1063
|
+
type: g.type || "",
|
|
1064
|
+
icon: e.getIconComponent(g.icon),
|
|
1065
|
+
size: "small",
|
|
1066
|
+
link: "",
|
|
1067
|
+
onClick: (l) => e.handleClick(g)
|
|
1068
|
+
}, {
|
|
1069
|
+
default: y(() => [
|
|
1070
|
+
Z(K(g.label), 1)
|
|
1071
|
+
]),
|
|
1072
|
+
_: 2
|
|
1073
|
+
}, 1032, ["type", "icon", "onClick"]))), 128)),
|
|
1074
|
+
e.overflowButtons.length ? (s(), $(u, {
|
|
1075
|
+
key: 0,
|
|
1076
|
+
trigger: "hover",
|
|
1077
|
+
onCommand: e.handleCommand
|
|
1078
|
+
}, {
|
|
1079
|
+
dropdown: y(() => [
|
|
1080
|
+
V(h, null, {
|
|
1081
|
+
default: y(() => [
|
|
1082
|
+
(s(!0), f(B, null, R(e.overflowButtons, (g) => (s(), $(d, {
|
|
1083
|
+
key: g.code,
|
|
1084
|
+
command: g,
|
|
1085
|
+
icon: e.getIconComponent(g.icon)
|
|
1086
|
+
}, {
|
|
1087
|
+
default: y(() => [
|
|
1088
|
+
Z(K(g.label), 1)
|
|
1089
|
+
]),
|
|
1090
|
+
_: 2
|
|
1091
|
+
}, 1032, ["command", "icon"]))), 128))
|
|
1092
|
+
]),
|
|
1093
|
+
_: 1
|
|
1094
|
+
})
|
|
1095
|
+
]),
|
|
1096
|
+
default: y(() => [
|
|
1097
|
+
V(o, {
|
|
1098
|
+
type: "",
|
|
1099
|
+
size: "small",
|
|
1100
|
+
link: ""
|
|
1101
|
+
}, {
|
|
1102
|
+
default: y(() => [
|
|
1103
|
+
t[0] || (t[0] = Z(" 更多 ", -1)),
|
|
1104
|
+
V(m, { class: "el-icon--right" }, {
|
|
1105
|
+
default: y(() => [
|
|
1106
|
+
V(p)
|
|
1107
|
+
]),
|
|
1108
|
+
_: 1
|
|
1109
|
+
})
|
|
1110
|
+
]),
|
|
1111
|
+
_: 1
|
|
1112
|
+
})
|
|
1113
|
+
]),
|
|
1114
|
+
_: 1
|
|
1115
|
+
}, 8, ["onCommand"])) : Q("", !0)
|
|
1116
|
+
]);
|
|
1117
|
+
}
|
|
1118
|
+
const na = /* @__PURE__ */ N(ea, [["render", aa], ["__scopeId", "data-v-6d75a891"]]), oa = b({
|
|
849
1119
|
name: "ZxtGrid",
|
|
850
1120
|
inheritAttrs: !1,
|
|
851
1121
|
components: {
|
|
852
|
-
ZxtTable:
|
|
853
|
-
ZxtForm:
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
1122
|
+
ZxtTable: x,
|
|
1123
|
+
ZxtForm: De,
|
|
1124
|
+
ActionColumn: na,
|
|
1125
|
+
Plus: Pe,
|
|
1126
|
+
Delete: ke,
|
|
1127
|
+
Refresh: ue,
|
|
1128
|
+
Download: $e,
|
|
1129
|
+
Search: de,
|
|
1130
|
+
Edit: Ve,
|
|
1131
|
+
View: Ae,
|
|
1132
|
+
Upload: Fe,
|
|
1133
|
+
Setting: Re
|
|
863
1134
|
},
|
|
864
1135
|
props: {
|
|
865
1136
|
// 网格配置选项
|
|
@@ -885,187 +1156,237 @@ const Ce = /* @__PURE__ */ N(yt, [["render", wt], ["__scopeId", "data-v-9c337267
|
|
|
885
1156
|
default: () => []
|
|
886
1157
|
}
|
|
887
1158
|
},
|
|
888
|
-
emits: ["toolbar-click", "submit", "reset", "page-change", "size-change"],
|
|
1159
|
+
emits: ["toolbar-click", "action-click", "submit", "reset", "page-change", "size-change"],
|
|
889
1160
|
setup(e, { emit: t, expose: a }) {
|
|
890
|
-
const r =
|
|
891
|
-
Plus:
|
|
892
|
-
Delete:
|
|
893
|
-
Refresh:
|
|
894
|
-
Download:
|
|
895
|
-
Search:
|
|
896
|
-
Edit:
|
|
897
|
-
View:
|
|
898
|
-
Upload:
|
|
899
|
-
Setting:
|
|
900
|
-
},
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
1161
|
+
const r = Xe(), i = Ye(), c = k(null), o = k(null), p = k(1), m = k(10), d = k(null), h = k(e.gridOptions.formMode !== !1), u = k({}), g = {
|
|
1162
|
+
Plus: Pe,
|
|
1163
|
+
Delete: ke,
|
|
1164
|
+
Refresh: ue,
|
|
1165
|
+
Download: $e,
|
|
1166
|
+
Search: de,
|
|
1167
|
+
Edit: Ve,
|
|
1168
|
+
View: Ae,
|
|
1169
|
+
Upload: Fe,
|
|
1170
|
+
Setting: Re
|
|
1171
|
+
}, l = C(() => {
|
|
1172
|
+
const v = (e.gridOptions.columns || []).find((be) => be.actionColumn);
|
|
1173
|
+
return v ? v.actionColumn : null;
|
|
1174
|
+
}), S = C(() => (e.gridOptions.columns || []).map((v) => v.actionColumn ? {
|
|
1175
|
+
...v,
|
|
1176
|
+
slot: "__action__",
|
|
1177
|
+
actionColumn: void 0
|
|
1178
|
+
} : v)), T = (n) => {
|
|
1179
|
+
t("action-click", n);
|
|
1180
|
+
}, U = C(() => {
|
|
1181
|
+
const n = e.gridOptions.formConfig;
|
|
1182
|
+
if (!n || !n.items) return [];
|
|
1183
|
+
const v = [...n.items];
|
|
1184
|
+
return v.some(
|
|
1185
|
+
(ye) => ye.type === "slot" && ye.slotName === "search-actions"
|
|
1186
|
+
) || v.push({
|
|
907
1187
|
type: "slot",
|
|
908
1188
|
slotName: "search-actions",
|
|
909
1189
|
span: 6,
|
|
910
1190
|
labelWidth: "0px",
|
|
911
1191
|
isAction: !0,
|
|
912
|
-
...
|
|
913
|
-
}),
|
|
914
|
-
}),
|
|
915
|
-
n
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1192
|
+
...n.actionConfig
|
|
1193
|
+
}), v;
|
|
1194
|
+
}), M = C(() => {
|
|
1195
|
+
const n = /* @__PURE__ */ new Set(["search-actions"]);
|
|
1196
|
+
return (U.value || []).forEach((v) => {
|
|
1197
|
+
v.type === "slot" && n.add(v.slotName || v.prop);
|
|
1198
|
+
}), n;
|
|
1199
|
+
}), j = C(() => {
|
|
1200
|
+
const n = {};
|
|
1201
|
+
for (const v in i)
|
|
1202
|
+
v === "search-actions" || v === "toolbar" || (M.value.has(v) || v.startsWith("form-")) && (n[v] = i[v]);
|
|
1203
|
+
return n;
|
|
1204
|
+
}), L = C(() => {
|
|
1205
|
+
const n = {};
|
|
1206
|
+
for (const v in i)
|
|
1207
|
+
v !== "toolbar" && !M.value.has(v) && !v.startsWith("form-") && (n[v] = i[v]);
|
|
1208
|
+
return n;
|
|
1209
|
+
}), oe = () => {
|
|
1210
|
+
o.value?.submitForm();
|
|
1211
|
+
}, pe = (n) => {
|
|
1212
|
+
t("submit", n), e.gridOptions.proxyConfig && (u.value = { ...n }, p.value = 1, c.value?.reload?.());
|
|
1213
|
+
}, fe = () => {
|
|
1214
|
+
o.value?.resetForm();
|
|
1215
|
+
}, me = () => {
|
|
1216
|
+
t("reset"), e.gridOptions.proxyConfig && (u.value = {}, p.value = 1, c.value?.reload?.());
|
|
1217
|
+
}, _ = (n) => {
|
|
1218
|
+
if (n)
|
|
1219
|
+
return typeof n == "object" || typeof n == "function" ? n : g[n];
|
|
1220
|
+
}, F = C(() => {
|
|
1221
|
+
const n = e.gridOptions.proxyConfig;
|
|
1222
|
+
return n ? {
|
|
1223
|
+
...n,
|
|
1224
|
+
_formData: u.value
|
|
1225
|
+
} : null;
|
|
1226
|
+
}), A = C(() => {
|
|
926
1227
|
const {
|
|
927
|
-
formConfig:
|
|
928
|
-
toolbar:
|
|
929
|
-
formMode:
|
|
930
|
-
formColumns:
|
|
931
|
-
rules:
|
|
932
|
-
data:
|
|
933
|
-
|
|
1228
|
+
formConfig: n,
|
|
1229
|
+
toolbar: v,
|
|
1230
|
+
formMode: be,
|
|
1231
|
+
formColumns: ye,
|
|
1232
|
+
rules: pa,
|
|
1233
|
+
data: fa,
|
|
1234
|
+
proxyConfig: Ee,
|
|
1235
|
+
...Ie
|
|
934
1236
|
} = e.gridOptions;
|
|
935
|
-
return
|
|
936
|
-
|
|
937
|
-
|
|
1237
|
+
return {
|
|
1238
|
+
...Ie,
|
|
1239
|
+
proxyConfig: F.value || Ee || null
|
|
1240
|
+
};
|
|
1241
|
+
}), re = C(() => d.value !== null ? d.value : e.externalData.length > 0 ? e.externalData : e.gridOptions.data || []), ge = C(() => !!e.gridOptions.proxyConfig), he = C(() => ge.value ? 0 : re.value.length), ve = (n, v) => {
|
|
1242
|
+
switch (t("toolbar-click", { code: n, button: v, grid: c.value }), n) {
|
|
938
1243
|
case "add":
|
|
939
|
-
|
|
1244
|
+
_e();
|
|
940
1245
|
break;
|
|
941
1246
|
case "delete":
|
|
942
|
-
|
|
1247
|
+
E();
|
|
943
1248
|
break;
|
|
944
1249
|
case "refresh":
|
|
945
|
-
|
|
1250
|
+
P();
|
|
946
1251
|
break;
|
|
947
1252
|
case "export":
|
|
948
|
-
|
|
1253
|
+
X();
|
|
949
1254
|
break;
|
|
950
1255
|
}
|
|
951
|
-
},
|
|
952
|
-
|
|
953
|
-
},
|
|
954
|
-
const
|
|
955
|
-
if (
|
|
956
|
-
|
|
1256
|
+
}, _e = () => {
|
|
1257
|
+
h.value = !0;
|
|
1258
|
+
}, E = () => {
|
|
1259
|
+
const n = c.value?.getTableRef()?.getSelectionRows?.() || [];
|
|
1260
|
+
if (n.length === 0) {
|
|
1261
|
+
ie.warning("请先选择要删除的数据");
|
|
957
1262
|
return;
|
|
958
1263
|
}
|
|
959
|
-
|
|
960
|
-
},
|
|
961
|
-
|
|
962
|
-
},
|
|
963
|
-
|
|
964
|
-
},
|
|
965
|
-
t("submit",
|
|
966
|
-
},
|
|
1264
|
+
ie.success(`删除 ${n.length} 条数据`);
|
|
1265
|
+
}, P = () => {
|
|
1266
|
+
ie.success("刷新数据"), c.value?.reload?.();
|
|
1267
|
+
}, X = () => {
|
|
1268
|
+
ie.success("导出数据");
|
|
1269
|
+
}, Ce = (n) => {
|
|
1270
|
+
t("submit", n);
|
|
1271
|
+
}, we = () => {
|
|
967
1272
|
t("reset");
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
},
|
|
971
|
-
|
|
972
|
-
},
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
switch (
|
|
1273
|
+
}, le = () => {
|
|
1274
|
+
h.value = !1;
|
|
1275
|
+
}, q = (n) => {
|
|
1276
|
+
p.value = n.page, t("page-change", n);
|
|
1277
|
+
}, Y = (n) => {
|
|
1278
|
+
m.value = n.size, t("size-change", n);
|
|
1279
|
+
}, se = () => c.value, Te = () => o.value, Le = () => c.value?.getTableRef()?.getSelectionRows?.() || [], He = (n) => {
|
|
1280
|
+
d.value = n ?? null;
|
|
1281
|
+
}, Ze = (n) => {
|
|
1282
|
+
h.value = n;
|
|
1283
|
+
}, je = (n, ...v) => {
|
|
1284
|
+
switch (n) {
|
|
980
1285
|
case "query":
|
|
981
|
-
|
|
1286
|
+
p.value = 1, c.value?.reload?.();
|
|
982
1287
|
break;
|
|
983
1288
|
case "reload":
|
|
984
|
-
|
|
1289
|
+
c.value?.reload?.();
|
|
985
1290
|
break;
|
|
986
1291
|
default:
|
|
987
|
-
console.warn(`[ZxtGrid] commitProxy: unknown type "${
|
|
1292
|
+
console.warn(`[ZxtGrid] commitProxy: unknown type "${n}"`);
|
|
988
1293
|
}
|
|
989
1294
|
};
|
|
990
|
-
|
|
1295
|
+
J(
|
|
991
1296
|
() => e.gridOptions.formMode,
|
|
992
|
-
(
|
|
993
|
-
|
|
1297
|
+
(n) => {
|
|
1298
|
+
n !== void 0 && (h.value = n);
|
|
994
1299
|
}
|
|
995
|
-
)
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1300
|
+
);
|
|
1301
|
+
const D = () => c.value?.getTableRef?.();
|
|
1302
|
+
return a({
|
|
1303
|
+
getGridRef: se,
|
|
1304
|
+
getFormRef: Te,
|
|
1305
|
+
getElTableRef: D,
|
|
1306
|
+
getSelectedRows: Le,
|
|
1307
|
+
reloadData: He,
|
|
1308
|
+
setFormVisible: Ze,
|
|
1309
|
+
commitProxy: je,
|
|
1310
|
+
clearSelection: () => D()?.clearSelection(),
|
|
1311
|
+
toggleRowSelection: (...n) => D()?.toggleRowSelection(...n),
|
|
1312
|
+
toggleAllSelection: () => D()?.toggleAllSelection(),
|
|
1313
|
+
toggleRowExpansion: (...n) => D()?.toggleRowExpansion(...n),
|
|
1314
|
+
setCurrentRow: (...n) => D()?.setCurrentRow(...n),
|
|
1315
|
+
clearSort: () => D()?.clearSort(),
|
|
1316
|
+
clearFilter: (...n) => D()?.clearFilter(...n),
|
|
1317
|
+
doLayout: () => D()?.doLayout(),
|
|
1318
|
+
sort: (...n) => D()?.sort(...n)
|
|
1002
1319
|
}), {
|
|
1003
1320
|
attrs: r,
|
|
1004
|
-
gridRef:
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1321
|
+
gridRef: c,
|
|
1322
|
+
searchFormRef: o,
|
|
1323
|
+
currentPage: p,
|
|
1324
|
+
pageSize: m,
|
|
1325
|
+
tableData: re,
|
|
1326
|
+
tableProps: A,
|
|
1327
|
+
mergedColumns: S,
|
|
1328
|
+
actionColumnConfig: l,
|
|
1329
|
+
total: he,
|
|
1330
|
+
isFormVisible: h,
|
|
1331
|
+
searchFormColumns: U,
|
|
1332
|
+
formFilteredSlots: j,
|
|
1333
|
+
tableFilteredSlots: L,
|
|
1334
|
+
getIconComponent: _,
|
|
1335
|
+
handleToolbarClick: ve,
|
|
1336
|
+
handleActionClick: T,
|
|
1337
|
+
handleSubmit: Ce,
|
|
1338
|
+
handleFormReset: we,
|
|
1339
|
+
handleFormCancel: le,
|
|
1340
|
+
handlePageChange: q,
|
|
1341
|
+
handleSizeChange: Y,
|
|
1342
|
+
handleSearch: oe,
|
|
1343
|
+
handleSearchSubmit: pe,
|
|
1344
|
+
handleReset: fe,
|
|
1345
|
+
handleSearchReset: me,
|
|
1346
|
+
Search: de,
|
|
1347
|
+
Refresh: ue
|
|
1027
1348
|
};
|
|
1028
1349
|
}
|
|
1029
|
-
}),
|
|
1350
|
+
}), ra = {
|
|
1030
1351
|
key: 0,
|
|
1031
1352
|
class: "grid-search-form"
|
|
1032
|
-
},
|
|
1353
|
+
}, la = { class: "search-btn-group" }, sa = { class: "grid-table-wrapper" }, ia = {
|
|
1033
1354
|
key: 0,
|
|
1034
1355
|
class: "grid-toolbar"
|
|
1035
1356
|
};
|
|
1036
|
-
function
|
|
1037
|
-
const
|
|
1038
|
-
return
|
|
1039
|
-
class:
|
|
1357
|
+
function ua(e, t, a, r, i, c) {
|
|
1358
|
+
const o = z("el-button"), p = z("ZxtForm"), m = z("ActionColumn"), d = z("ZxtTable");
|
|
1359
|
+
return s(), f("div", {
|
|
1360
|
+
class: ce(["zxt-grid-container", { "zxt-grid-container--full": e.gridOptions.height === "full" }])
|
|
1040
1361
|
}, [
|
|
1041
|
-
e.gridOptions.formConfig ? (
|
|
1042
|
-
|
|
1362
|
+
e.gridOptions.formConfig && e.isFormVisible ? (s(), f("div", ra, [
|
|
1363
|
+
V(p, {
|
|
1043
1364
|
ref: "searchFormRef",
|
|
1044
1365
|
"form-columns": e.searchFormColumns,
|
|
1045
1366
|
"initial-form-data": e.gridOptions.formConfig.data,
|
|
1046
1367
|
rules: e.gridOptions.formConfig.rules,
|
|
1047
1368
|
onSubmit: e.handleSearchSubmit,
|
|
1048
1369
|
onReset: e.handleSearchReset
|
|
1049
|
-
},
|
|
1050
|
-
"search-actions":
|
|
1051
|
-
|
|
1052
|
-
|
|
1370
|
+
}, ne({
|
|
1371
|
+
"search-actions": y(() => [
|
|
1372
|
+
w("div", la, [
|
|
1373
|
+
V(o, {
|
|
1053
1374
|
class: "btn-search",
|
|
1054
1375
|
icon: e.Search,
|
|
1055
1376
|
onClick: e.handleSearch
|
|
1056
1377
|
}, {
|
|
1057
|
-
default:
|
|
1058
|
-
|
|
1378
|
+
default: y(() => [...t[0] || (t[0] = [
|
|
1379
|
+
Z(" 查询 ", -1)
|
|
1059
1380
|
])]),
|
|
1060
1381
|
_: 1
|
|
1061
1382
|
}, 8, ["icon", "onClick"]),
|
|
1062
|
-
|
|
1383
|
+
V(o, {
|
|
1063
1384
|
class: "btn-reset",
|
|
1064
1385
|
icon: e.Refresh,
|
|
1065
1386
|
onClick: e.handleReset
|
|
1066
1387
|
}, {
|
|
1067
|
-
default:
|
|
1068
|
-
|
|
1388
|
+
default: y(() => [...t[1] || (t[1] = [
|
|
1389
|
+
Z(" 重置 ", -1)
|
|
1069
1390
|
])]),
|
|
1070
1391
|
_: 1
|
|
1071
1392
|
}, 8, ["icon", "onClick"])
|
|
@@ -1073,36 +1394,36 @@ function Rt(e, t, a, r, o, p) {
|
|
|
1073
1394
|
]),
|
|
1074
1395
|
_: 2
|
|
1075
1396
|
}, [
|
|
1076
|
-
|
|
1077
|
-
name:
|
|
1078
|
-
fn:
|
|
1079
|
-
|
|
1397
|
+
R(e.formFilteredSlots, (h, u) => ({
|
|
1398
|
+
name: u,
|
|
1399
|
+
fn: y((g) => [
|
|
1400
|
+
H(e.$slots, u, xe(Me(g)), void 0, !0)
|
|
1080
1401
|
])
|
|
1081
1402
|
}))
|
|
1082
1403
|
]), 1032, ["form-columns", "initial-form-data", "rules", "onSubmit", "onReset"])
|
|
1083
|
-
])) :
|
|
1084
|
-
|
|
1085
|
-
e.gridOptions.toolbar ? (
|
|
1086
|
-
(
|
|
1087
|
-
key:
|
|
1088
|
-
type:
|
|
1089
|
-
size:
|
|
1090
|
-
icon: e.getIconComponent(
|
|
1091
|
-
disabled:
|
|
1092
|
-
onClick: (
|
|
1404
|
+
])) : Q("", !0),
|
|
1405
|
+
w("div", sa, [
|
|
1406
|
+
e.gridOptions.toolbar ? (s(), f("div", ia, [
|
|
1407
|
+
(s(!0), f(B, null, R(e.gridOptions.toolbar.buttons, (h, u) => (s(), $(o, {
|
|
1408
|
+
key: u,
|
|
1409
|
+
type: h.type || "default",
|
|
1410
|
+
size: h.size || "small",
|
|
1411
|
+
icon: e.getIconComponent(h.icon),
|
|
1412
|
+
disabled: h.disabled,
|
|
1413
|
+
onClick: (g) => e.handleToolbarClick(h.code, h)
|
|
1093
1414
|
}, {
|
|
1094
|
-
default:
|
|
1095
|
-
|
|
1415
|
+
default: y(() => [
|
|
1416
|
+
Z(K(h.name), 1)
|
|
1096
1417
|
]),
|
|
1097
1418
|
_: 2
|
|
1098
1419
|
}, 1032, ["type", "size", "icon", "disabled", "onClick"]))), 128)),
|
|
1099
|
-
|
|
1420
|
+
H(e.$slots, "toolbar", {
|
|
1100
1421
|
grid: e.$refs.gridRef
|
|
1101
1422
|
}, void 0, !0)
|
|
1102
|
-
])) :
|
|
1103
|
-
|
|
1423
|
+
])) : Q("", !0),
|
|
1424
|
+
V(d, O({ ref: "gridRef" }, { ...e.tableProps, ...e.attrs }, {
|
|
1104
1425
|
id: e.gridOptions.id,
|
|
1105
|
-
columns: e.
|
|
1426
|
+
columns: e.mergedColumns,
|
|
1106
1427
|
data: e.tableData,
|
|
1107
1428
|
height: e.gridOptions.height,
|
|
1108
1429
|
pageable: e.gridOptions.pageable !== !1,
|
|
@@ -1113,50 +1434,62 @@ function Rt(e, t, a, r, o, p) {
|
|
|
1113
1434
|
"pagination-layout": e.gridOptions.paginationLayout,
|
|
1114
1435
|
onPageChange: e.handlePageChange,
|
|
1115
1436
|
onSizeChange: e.handleSizeChange
|
|
1116
|
-
}),
|
|
1117
|
-
|
|
1118
|
-
name:
|
|
1119
|
-
fn:
|
|
1120
|
-
|
|
1437
|
+
}), ne({ _: 2 }, [
|
|
1438
|
+
e.actionColumnConfig ? {
|
|
1439
|
+
name: "__action__",
|
|
1440
|
+
fn: y(({ row: h }) => [
|
|
1441
|
+
V(m, {
|
|
1442
|
+
buttons: e.actionColumnConfig.buttons,
|
|
1443
|
+
row: h,
|
|
1444
|
+
"max-visible": e.actionColumnConfig.maxVisible || 2,
|
|
1445
|
+
onActionClick: e.handleActionClick
|
|
1446
|
+
}, null, 8, ["buttons", "row", "max-visible", "onActionClick"])
|
|
1447
|
+
]),
|
|
1448
|
+
key: "0"
|
|
1449
|
+
} : void 0,
|
|
1450
|
+
R(e.tableFilteredSlots, (h, u) => ({
|
|
1451
|
+
name: u,
|
|
1452
|
+
fn: y((g) => [
|
|
1453
|
+
H(e.$slots, u, xe(Me(g)), void 0, !0)
|
|
1121
1454
|
])
|
|
1122
1455
|
}))
|
|
1123
1456
|
]), 1040, ["id", "columns", "data", "height", "pageable", "current-page", "page-size", "page-sizes", "total", "pagination-layout", "onPageChange", "onSizeChange"])
|
|
1124
1457
|
])
|
|
1125
1458
|
], 2);
|
|
1126
1459
|
}
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
e.component(
|
|
1460
|
+
const Be = /* @__PURE__ */ N(oa, [["render", ua], ["__scopeId", "data-v-38879918"]]);
|
|
1461
|
+
G.install = function(e) {
|
|
1462
|
+
e.component(G.name, G);
|
|
1130
1463
|
};
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
],
|
|
1139
|
-
|
|
1464
|
+
const da = [
|
|
1465
|
+
ee,
|
|
1466
|
+
te,
|
|
1467
|
+
x,
|
|
1468
|
+
Be,
|
|
1469
|
+
De,
|
|
1470
|
+
G
|
|
1471
|
+
], ca = (e) => {
|
|
1472
|
+
da.forEach((t) => {
|
|
1140
1473
|
e.component(t.name, t);
|
|
1141
1474
|
});
|
|
1142
|
-
},
|
|
1143
|
-
install:
|
|
1144
|
-
MyButton:
|
|
1145
|
-
JsxButton:
|
|
1146
|
-
ZxtTable:
|
|
1147
|
-
ZxtGrid:
|
|
1148
|
-
ZxtForm:
|
|
1149
|
-
ZxtPagination:
|
|
1475
|
+
}, ha = {
|
|
1476
|
+
install: ca,
|
|
1477
|
+
MyButton: ee,
|
|
1478
|
+
JsxButton: te,
|
|
1479
|
+
ZxtTable: x,
|
|
1480
|
+
ZxtGrid: Be,
|
|
1481
|
+
ZxtForm: De,
|
|
1482
|
+
ZxtPagination: G,
|
|
1150
1483
|
// 暴露渲染器 API
|
|
1151
|
-
renderer:
|
|
1152
|
-
registerRenderer:
|
|
1484
|
+
renderer: x.renderer,
|
|
1485
|
+
registerRenderer: x.registerRenderer
|
|
1153
1486
|
};
|
|
1154
1487
|
export {
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1488
|
+
te as JsxButton,
|
|
1489
|
+
ee as MyButton,
|
|
1490
|
+
De as ZxtForm,
|
|
1491
|
+
Be as ZxtGrid,
|
|
1492
|
+
G as ZxtPagination,
|
|
1493
|
+
x as ZxtTable,
|
|
1494
|
+
ha as default
|
|
1162
1495
|
};
|