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