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