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.
@@ -1,4 +1,4 @@
1
- import { createElementBlock as g, openBlock as s, normalizeClass as ie, renderSlot as B, defineComponent as b, createVNode as D, ref as k, watch as K, resolveComponent as z, createBlock as $, h as G, inject as Te, computed as _, mergeProps as O, withCtx as y, Fragment as L, renderList as R, createSlots as ne, resolveDynamicComponent as ye, createTextVNode as j, toDisplayString as Q, provide as He, onMounted as Oe, resolveDirective as Ze, normalizeStyle as je, withDirectives as Ie, createCommentVNode as X, createElementVNode as w, reactive as Ee, toHandlers as Ne, useAttrs as Ue, useSlots as qe, normalizeProps as Re, guardReactiveProps as Ae } from "vue";
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, c) {
31
- return s(), g("button", {
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] = (...r) => l.handleClick && l.handleClick(...r))
34
+ onClick: t[0] || (t[0] = (...o) => l.handleClick && l.handleClick(...o))
35
35
  }, [
36
- B(e.$slots, "default", {}, void 0, !0)
36
+ A(e.$slots, "default", {}, void 0, !0)
37
37
  ], 10, at);
38
38
  }
39
- const ee = /* @__PURE__ */ q(tt, [["render", nt], ["__scopeId", "data-v-4480e77d"]]);
40
- ee.install = function(e) {
41
- e.component(ee.name, ee);
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 te = /* @__PURE__ */ b({
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
- te.install = function(e) {
74
- e.component(te.name, te);
73
+ ne.install = function(e) {
74
+ e.component(ne.name, ne);
75
75
  };
76
- const ot = b({
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 K(
97
+ return Q(
98
98
  () => e.modelValue,
99
- (r) => {
100
- a.value = r;
99
+ (o) => {
100
+ a.value = o;
101
101
  }
102
- ), K(
102
+ ), Q(
103
103
  () => e.pageSize,
104
- (r) => {
105
- l.value = r;
104
+ (o) => {
105
+ l.value = o;
106
106
  }
107
107
  ), {
108
108
  currentPage: a,
109
109
  pageSize: l,
110
- handleSizeChange: (r) => {
111
- l.value = r, a.value = 1, t("update:pageSize", r), t("size-change", { page: a.value, size: r });
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: (r) => {
114
- a.value = r, t("update:modelValue", r), t("page-change", { page: r, size: l.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 rt(e, t, a, l, u, c) {
120
- const r = z("el-pagination");
121
- return s(), $(r, {
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 J = /* @__PURE__ */ q(ot, [["render", rt], ["__scopeId", "data-v-497aa44d"]]), ae = {
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 }) => G(Xe, {
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 = [] }) => G(
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: (c) => l({ ...t, [a.property]: c })
146
+ onChange: (d) => l({ ...t, [a.property]: d })
147
147
  },
148
148
  () => u.map(
149
- (c) => G(Qe, { label: c.label, value: c.value, key: c.value })
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 }) => G(Je, {
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" }) => G(Ge, { href: t, target: a }, () => e)
156
+ link: ({ cellValue: e, href: t, target: a = "_blank" }) => J(Ge, { href: t, target: a }, () => e)
157
157
  };
158
- function lt(e, t) {
158
+ function rt(e, t) {
159
159
  if (!e) return null;
160
160
  if (typeof e == "string") {
161
- const a = ae[e];
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: c = {}, content: r } = e;
168
- return typeof a == "string" && ae[a] ? ae[a]({
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
- ...c
173
- }) : typeof a == "object" || typeof a == "function" ? G(a, { ...l, ...u, ...c }, r) : (console.warn("[ZxtTable] cellRender 对象缺少有效的 name 字段"), t.cellValue ?? "");
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
- ae[e] && console.warn(`[ZxtTable] 内置渲染器 ${e} 已被覆盖`), ae[e] = t;
178
+ oe[e] && console.warn(`[ZxtTable] 内置渲染器 ${e} 已被覆盖`), oe[e] = t;
179
179
  }
180
- const it = b({
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 = Te("updateRow", () => {
199
- }), a = (r) => {
200
- const { currentPage: p, pageSize: f } = e;
201
- return (p - 1) * f + r + 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 r = e.column;
203
+ const o = e.column;
204
204
  return {
205
- ...r,
206
- prop: r.prop ?? r.field,
205
+ ...o,
206
+ prop: o.prop ?? o.field,
207
207
  // 优先使用 prop,兼容 field
208
- label: r.label ?? r.title
208
+ label: o.label ?? o.title
209
209
  // 优先使用 label,兼容 title
210
210
  };
211
211
  }), u = _(() => {
212
- const { children: r, ...p } = l.value;
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: (r) => {
219
- const p = l.value, f = r.row[p.prop], d = f ?? p.defaultValue ?? "";
220
- return lt(p.cellRender, {
221
- row: r.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: r.$index,
224
- cellValue: d,
225
- updateRow: (h) => t(h, r.$index)
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, c) {
233
- const r = z("ZxtTableColumn", !0), p = z("el-table-column");
234
- return e.normalizedColumn.children && e.normalizedColumn.children.length ? (s(), $(p, O({ key: 0 }, e.columnProps, {
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), g(L, null, R(e.normalizedColumn.children, (f, d) => (s(), $(r, {
239
- key: d,
240
- column: f,
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
- }, ne({ _: 2 }, [
244
- R(e.$slots, (h, i) => ({
243
+ }, X({ _: 2 }, [
244
+ O(e.$slots, (g, i) => ({
245
245
  name: i,
246
- fn: y((C) => [
247
- B(e.$slots, i, O({ ref_for: !0 }, C))
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(), $(p, O({ key: 1 }, e.columnProps, {
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
- }), ne({ _: 2 }, [
256
+ }), X({ _: 2 }, [
257
257
  e.normalizedColumn.headerSlot ? {
258
258
  name: "header",
259
- fn: y((f) => [
260
- B(e.$slots, e.normalizedColumn.headerSlot, O({ column: e.normalizedColumn }, f))
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((f) => [
267
- e.normalizedColumn.slot ? B(e.$slots, e.normalizedColumn.slot, {
266
+ fn: y((m) => [
267
+ e.normalizedColumn.slot ? A(e.$slots, e.normalizedColumn.slot, {
268
268
  key: 0,
269
- row: f.row,
270
- index: f.$index,
269
+ row: m.row,
270
+ index: m.$index,
271
271
  column: e.normalizedColumn
272
- }) : e.normalizedColumn.cellRender ? (s(), $(ye(e.renderCell(f)), { key: 1 })) : e.normalizedColumn.formatter ? (s(), g(L, { key: 2 }, [
273
- j(Q(e.normalizedColumn.formatter(
274
- f.row,
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
- f.row[e.normalizedColumn.prop],
277
- f.$index
276
+ m.row[e.normalizedColumn.prop],
277
+ m.$index
278
278
  )), 1)
279
- ], 64)) : (s(), g(L, { key: 3 }, [
280
- j(Q(f.row[e.normalizedColumn.prop]), 1)
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 = b({
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: J, ZxtTableColumn: dt, ElTable: et },
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), l = k(e.pageSize), u = k(e.currentPage), c = k(!1), r = k([]), p = k(0), f = k({ prop: "", order: "" }), d = k({}), h = k({});
337
- K(() => e.currentPage, (v) => {
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 i = _(() => e.height === "full" ? { height: "100%" } : {}), C = _(() => {
342
+ const w = _(() => e.height === "full" ? { height: "100%" } : {}), r = _(() => {
343
343
  if (e.height !== "full")
344
344
  return e.height;
345
- }), o = _(() => !!e.proxyConfig), S = _(() => o.value ? p.value : e.total > 0 ? e.total : e.data.length), T = _(
346
- () => o.value ? r.value : e.data
347
- ), W = (v) => {
348
- o.value && (u.value = v.page, l.value = v.size, H()), t("size-change", v);
349
- }, x = (v) => {
350
- o.value && (u.value = v.page, l.value = v.size, H()), t("page-change", v);
351
- }, I = ({ column: v, prop: P, order: Z }) => {
352
- f.value = { prop: P, order: Z }, o.value && H(), t("sort-change", { column: v, prop: P, order: Z });
353
- }, ue = (v) => {
354
- d.value = v || {}, o.value && H(), t("filter-change", d.value);
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 (!o.value) return;
357
- const P = e.proxyConfig || {}, Z = P.ajax?.query;
358
- if (typeof Z != "function") return;
359
- const E = P.props || {}, fe = E.pageField || "page";
360
- E.sizeField;
361
- const me = E.sortField || "sort", ge = E.orderField || "order", he = E.filtersField || "filters";
362
- v?.formData !== void 0 ? h.value = v.formData : P._formData && (h.value = P._formData);
363
- const ve = P.params || {}, N = {
364
- [fe]: {
365
- currentPage: v?.page ?? u.value,
366
- pageSize: v?.pageSize ?? l.value
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: h.value,
369
- ...ve
368
+ form: i.value,
369
+ ...Ce
370
370
  };
371
- f.value?.prop && (N[me] = f.value.prop, N[ge] = f.value.order), d.value && Object.keys(d.value).length && (N[he] = d.value), c.value = !0;
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 F = await Z(N), Y = P.response || {}, Ce = Y.listField || "list", _e = Y.totalField || "total", re = Y.transform;
374
- let V = [], n = 0;
375
- if (typeof re == "function") {
376
- const m = re(F);
377
- V = m?.list ?? [], n = m?.total ?? 0;
378
- } else F && typeof F == "object" && (V = F?.[Ce] ?? F?.data ?? [], n = F?.[_e] ?? F?.total ?? 0);
379
- r.value = Array.isArray(V) ? V : [], p.value = Number(n) || 0, t("loaded", {
380
- data: r.value,
381
- total: p.value,
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 (F) {
385
- t("load-error", F);
384
+ } catch (R) {
385
+ t("load-error", R);
386
386
  } finally {
387
- c.value = !1;
387
+ o.value = !1;
388
388
  }
389
- }, oe = (v, P) => {
390
- o.value ? r.value.splice(P, 1, v) : t("update:row", { index: P, row: v });
389
+ }, le = (v, $) => {
390
+ C.value ? p.value.splice($, 1, v) : t("update:row", { index: $, row: v });
391
391
  };
392
- He("updateRow", oe), Oe(() => {
393
- o.value && e.autoLoad && H();
392
+ Ze("updateRow", le), Me(() => {
393
+ C.value && e.autoLoad && H();
394
394
  });
395
- const de = () => a.value, ce = () => a.value?.getSelectionRows?.() || [], pe = (v) => H(v);
395
+ const ce = () => l.value, pe = () => l.value?.getSelectionRows?.() || [], fe = (v) => H(v);
396
396
  return {
397
- tableRef: a,
398
- containerStyle: i,
399
- tableHeight: C,
400
- getTableRef: de,
401
- pageSize: l,
402
- currentPage: u,
403
- loading: c,
404
- renderData: T,
405
- total: S,
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: W,
409
- handlePageChange: x,
410
- handleSortChange: I,
411
- handleFilterChange: ue,
412
- reload: pe,
413
- getSelectedRows: ce,
414
- updateRow: oe
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 pt(e, t, a, l, u, c) {
419
- const r = z("ZxtTableColumn"), p = z("el-table"), f = z("ZxtPagination"), d = Ze("loading");
420
- return s(), g("div", {
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: je(e.containerStyle)
428
+ style: Ee(e.containerStyle)
423
429
  }, [
424
- Ie((s(), $(p, O({
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), g(L, null, R(e.columns, (h, i) => (s(), $(r, {
440
+ (s(!0), h(T, null, O(e.columns, (g, i) => (s(), V(o, {
435
441
  key: i,
436
- column: h,
442
+ column: g,
437
443
  "current-page": e.currentPage,
438
444
  "page-size": e.pageSize
439
- }, ne({ _: 2 }, [
440
- R(e.$slots, (C, o) => ({
441
- name: o,
442
- fn: y((S) => [
443
- B(e.$slots, o, O({ ref_for: !0 }, S), void 0, !0)
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
- _: 3
449
- }, 16, ["data", "height", "id", "onSortChange", "onFilterChange"])), [
450
- [d, e.loading]
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(), $(f, {
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] = (h) => e.pageSize = h),
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"])) : X("", !0)
483
+ }, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) : ee("", !0)
463
484
  ], 6);
464
485
  }
465
- const M = /* @__PURE__ */ q(ct, [["render", pt], ["__scopeId", "data-v-ebf6786f"]]), U = /* @__PURE__ */ new Map();
466
- class ft {
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 be = new ft();
520
- function mt(e, t, a = {}) {
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 && be.has(l)) {
525
- const u = be.get(l);
545
+ if (l && we.has(l)) {
546
+ const u = we.get(l);
526
547
  if (typeof u.renderItemContent == "function") {
527
- const c = {
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, c);
535
- } catch (r) {
536
- return console.error(`[ZxtTable] 渲染器 "${l}" 执行出错:`, r), null;
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
- M.install = function(e) {
543
- e.component(M.name, M);
563
+ B.install = function(e) {
564
+ e.component(B.name, B);
544
565
  };
545
- M.registerRenderer = st;
546
- M.renderer = be;
547
- var gt = /* @__PURE__ */ b({
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(), g("svg", {
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
- w("path", {
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
- }), Me = gt, ht = /* @__PURE__ */ b({
582
+ }), Be = ht, vt = /* @__PURE__ */ z({
562
583
  name: "Check",
563
584
  __name: "check",
564
585
  setup(e) {
565
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), vt = ht, Ct = /* @__PURE__ */ b({
596
+ }), Ct = vt, _t = /* @__PURE__ */ z({
576
597
  name: "Close",
577
598
  __name: "close",
578
599
  setup(e) {
579
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), _t = Ct, wt = /* @__PURE__ */ b({
610
+ }), yt = _t, wt = /* @__PURE__ */ z({
590
611
  name: "CopyDocument",
591
612
  __name: "copy-document",
592
613
  setup(e) {
593
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), yt = wt, bt = /* @__PURE__ */ b({
628
+ }), bt = wt, zt = /* @__PURE__ */ z({
608
629
  name: "Delete",
609
630
  __name: "delete",
610
631
  setup(e) {
611
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), ze = bt, zt = /* @__PURE__ */ b({
642
+ }), be = zt, St = /* @__PURE__ */ z({
622
643
  name: "Document",
623
644
  __name: "document",
624
645
  setup(e) {
625
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), St = zt, kt = /* @__PURE__ */ b({
656
+ }), kt = St, $t = /* @__PURE__ */ z({
636
657
  name: "Download",
637
658
  __name: "download",
638
659
  setup(e) {
639
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Se = kt, $t = /* @__PURE__ */ b({
670
+ }), ze = $t, Vt = /* @__PURE__ */ z({
650
671
  name: "Edit",
651
672
  __name: "edit",
652
673
  setup(e) {
653
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), ke = $t, Vt = /* @__PURE__ */ b({
688
+ }), Se = Vt, Pt = /* @__PURE__ */ z({
668
689
  name: "Lock",
669
690
  __name: "lock",
670
691
  setup(e) {
671
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), Pt = Vt, Dt = /* @__PURE__ */ b({
706
+ }), Dt = Pt, Ft = /* @__PURE__ */ z({
686
707
  name: "Plus",
687
708
  __name: "plus",
688
709
  setup(e) {
689
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), $e = Dt, Ft = /* @__PURE__ */ b({
720
+ }), ke = Ft, Rt = /* @__PURE__ */ z({
700
721
  name: "Refresh",
701
722
  __name: "refresh",
702
723
  setup(e) {
703
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), le = Ft, Rt = /* @__PURE__ */ b({
734
+ }), re = Rt, At = /* @__PURE__ */ z({
714
735
  name: "Search",
715
736
  __name: "search",
716
737
  setup(e) {
717
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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 = Rt, At = /* @__PURE__ */ b({
748
+ }), se = At, Ot = /* @__PURE__ */ z({
728
749
  name: "Setting",
729
750
  __name: "setting",
730
751
  setup(e) {
731
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Ve = At, Ot = /* @__PURE__ */ b({
762
+ }), $e = Ot, Mt = /* @__PURE__ */ z({
742
763
  name: "Share",
743
764
  __name: "share",
744
765
  setup(e) {
745
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Mt = Ot, xt = /* @__PURE__ */ b({
776
+ }), Bt = Mt, Lt = /* @__PURE__ */ z({
756
777
  name: "Unlock",
757
778
  __name: "unlock",
758
779
  setup(e) {
759
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), Bt = xt, Lt = /* @__PURE__ */ b({
794
+ }), Tt = Lt, xt = /* @__PURE__ */ z({
774
795
  name: "Upload",
775
796
  __name: "upload",
776
797
  setup(e) {
777
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Pe = Lt, Tt = /* @__PURE__ */ b({
808
+ }), Ve = xt, Ht = /* @__PURE__ */ z({
788
809
  name: "View",
789
810
  __name: "view",
790
811
  setup(e) {
791
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), De = Tt, Ht = /* @__PURE__ */ b({
822
+ }), Pe = Ht, Zt = /* @__PURE__ */ z({
802
823
  name: "Warning",
803
824
  __name: "warning",
804
825
  setup(e) {
805
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Zt = Ht;
816
- const jt = b({
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 = Ee({}), c = {
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
- }, r = (o) => c[o] || "el-input", p = (o) => {
836
- const S = o.type || "input", T = [
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(S), W = {
844
- placeholder: o.placeholder || `请${T ? "选择" : "输入"}${o.label}`,
845
- disabled: o.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 x = {};
850
- switch (S) {
870
+ let L = {};
871
+ switch (C) {
851
872
  case "date":
852
873
  case "daterange":
853
874
  case "datetime":
854
875
  case "datetimerange":
855
- x = {
856
- type: o.dateType || S,
857
- startPlaceholder: o.startPlaceholder || "开始日期",
858
- endPlaceholder: o.endPlaceholder || "结束日期",
859
- format: o.format,
860
- valueFormat: o.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
- x = {
865
- options: o.options,
866
- props: o.cascaderProps,
867
- clearable: o.clearable !== !1
885
+ L = {
886
+ options: r.options,
887
+ props: r.cascaderProps,
888
+ clearable: r.clearable !== !1
868
889
  };
869
890
  break;
870
891
  default:
871
- x = {};
892
+ L = {};
872
893
  }
873
- const I = {
894
+ const j = {
874
895
  ...W,
875
- ...x
896
+ ...L
876
897
  };
877
- return "clearable" in o && (I.clearable = o.clearable), o.props && typeof o.props == "object" && Object.assign(I, o.props), I;
878
- }, f = _(() => e.formColumns.map((o) => ({
879
- ...o,
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: o.xs ?? o.span ?? 24,
882
- sm: o.sm ?? o.span ?? 12,
883
- md: o.md ?? o.span ?? 12,
884
- lg: o.lg ?? o.span ?? 12,
885
- xl: o.xl ?? o.span ?? 12
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
- K(
909
+ Q(
889
910
  () => e.initialFormData,
890
- (o) => {
891
- Object.keys(u).forEach((S) => {
892
- delete u[S];
893
- }), Object.assign(u, o);
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 d = _(() => {
898
- const o = { ...e.rules };
899
- return Object.keys(o).length === 0 && e.formColumns.length > 0 && e.formColumns.forEach((S) => {
900
- if (S.required) {
901
- const T = [
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(S.type);
909
- o[S.prop] = [
929
+ ].includes(C.type);
930
+ r[C.prop] = [
910
931
  {
911
932
  required: !0,
912
- message: `请${T ? "选择" : "输入"}${S.label}`,
913
- trigger: T ? "change" : "blur"
933
+ message: `请${x ? "选择" : "输入"}${C.label}`,
934
+ trigger: x ? "change" : "blur"
914
935
  }
915
936
  ];
916
937
  }
917
- }), o;
918
- }), h = () => {
919
- l.value && l.value.validate((o) => {
920
- o && t("submit", { ...u });
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
- }, C = (o) => () => mt(o, u, {}) || null;
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: h,
950
+ submitForm: g,
930
951
  resetForm: i
931
952
  }), {
932
953
  formRef: l,
933
954
  formData: u,
934
- formRules: d,
935
- submitForm: h,
955
+ formRules: c,
956
+ submitForm: g,
936
957
  resetForm: i,
937
- processedColumns: f,
938
- getComponentType: r,
958
+ processedColumns: m,
959
+ getComponentType: o,
939
960
  getComponentProps: p,
940
- renderCustomItem: C
961
+ renderCustomItem: w
941
962
  };
942
963
  }
943
- }), It = { class: "zxt-form-container" }, Et = {
964
+ }), It = { class: "zxt-form-container" }, Nt = {
944
965
  key: 0,
945
966
  class: "form-label"
946
- }, Nt = { class: "form-control" };
947
- function Ut(e, t, a, l, u, c) {
948
- const r = z("el-option"), p = z("el-form-item"), f = z("el-col"), d = z("el-row"), h = z("el-form");
949
- return s(), g("div", It, [
950
- D(h, O({ ref: "formRef" }, e.$attrs, {
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(d, { gutter: 20 }, {
978
+ D(c, { gutter: 20 }, {
958
979
  default: y(() => [
959
- (s(!0), g(L, null, R(e.processedColumns, (i, C) => (s(), $(f, O({ key: C }, { ref_for: !0 }, i.colSpan), {
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
- w("div", {
989
+ b("div", {
969
990
  class: ie(["form-item-wrapper", { "is-action": i.isAction }])
970
991
  }, [
971
- i.label ? (s(), g("span", Et, Q(i.label), 1)) : X("", !0),
972
- w("div", Nt, [
973
- i.type === "slot" ? B(e.$slots, i.slotName || i.prop, {
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(), $(ye(e.renderCustomItem(i)), { key: 1 })) : (s(), $(ye(e.getComponentType(i.type)), O({
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": (o) => e.formData[i.prop] = o
981
- }, { ref_for: !0 }, e.getComponentProps(i), Ne(i.events || {})), {
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), g(L, { key: 0 }, R(i.options, (o, S) => (s(), $(r, {
984
- key: S,
985
- label: o.label,
986
- value: o.value
987
- }, null, 8, ["label", "value"]))), 128)) : X("", !0)
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 Fe = /* @__PURE__ */ q(jt, [["render", Ut], ["__scopeId", "data-v-6b22a57b"]]), qt = {
1008
- Plus: $e,
1009
- Delete: ze,
1010
- Refresh: le,
1011
- Download: Se,
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: ke,
1014
- View: De,
1015
- Upload: Pe,
1016
- Setting: Ve,
1017
- Warning: Zt,
1018
- Check: vt,
1019
- Close: _t,
1020
- Document: St,
1021
- CopyDocument: yt,
1022
- Share: Mt,
1023
- Lock: Pt,
1024
- Unlock: Bt,
1025
- ArrowDown: Me
1026
- }, Wt = b({
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: Me },
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((d) => typeof d.visible == "function" ? d.visible(e.row) : typeof d.visible == "boolean" ? d.visible : !0)), l = _(
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
- ), c = _(
1070
+ ), d = _(
1050
1071
  () => l.value ? a.value.slice(e.maxVisible) : []
1051
1072
  );
1052
1073
  return {
1053
1074
  visibleButtons: u,
1054
- overflowButtons: c,
1055
- getIconComponent: (d) => {
1056
- if (d)
1057
- return typeof d == "object" || typeof d == "function" ? d : qt[d];
1075
+ overflowButtons: d,
1076
+ getIconComponent: (c) => {
1077
+ if (c)
1078
+ return typeof c == "object" || typeof c == "function" ? c : Wt[c];
1058
1079
  },
1059
- handleClick: (d) => {
1060
- t("action-click", { code: d.code, button: d, row: e.row });
1080
+ handleClick: (c) => {
1081
+ t("action-click", { code: c.code, button: c, row: e.row });
1061
1082
  },
1062
- handleCommand: (d) => {
1063
- t("action-click", { code: d.code, button: d, row: e.row });
1083
+ handleCommand: (c) => {
1084
+ t("action-click", { code: c.code, button: c, row: e.row });
1064
1085
  }
1065
1086
  };
1066
1087
  }
1067
- }), Gt = { class: "action-column" };
1068
- function Jt(e, t, a, l, u, c) {
1069
- const r = z("el-button"), p = z("ArrowDown"), f = z("el-icon"), d = z("el-dropdown-item"), h = z("el-dropdown-menu"), i = z("el-dropdown");
1070
- return s(), g("div", Gt, [
1071
- (s(!0), g(L, null, R(e.visibleButtons, (C) => (s(), $(r, {
1072
- key: C.code,
1073
- type: C.type || "",
1074
- icon: e.getIconComponent(C.icon),
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: (o) => e.handleClick(C)
1098
+ onClick: (r) => e.handleClick(w)
1078
1099
  }, {
1079
1100
  default: y(() => [
1080
- j(Q(C.label), 1)
1101
+ Z(Y(w.label), 1)
1081
1102
  ]),
1082
1103
  _: 2
1083
1104
  }, 1032, ["type", "icon", "onClick"]))), 128)),
1084
- e.overflowButtons.length ? (s(), $(i, {
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(h, null, {
1111
+ D(g, null, {
1091
1112
  default: y(() => [
1092
- (s(!0), g(L, null, R(e.overflowButtons, (C) => (s(), $(d, {
1093
- key: C.code,
1094
- command: C,
1095
- icon: e.getIconComponent(C.icon)
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
- j(Q(C.label), 1)
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(r, {
1128
+ D(o, {
1108
1129
  type: "",
1109
1130
  size: "small",
1110
1131
  link: ""
1111
1132
  }, {
1112
1133
  default: y(() => [
1113
- t[0] || (t[0] = j(" 更多 ", -1)),
1114
- D(f, { class: "el-icon--right" }, {
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"])) : X("", !0)
1146
+ }, 8, ["onCommand"])) : ee("", !0)
1126
1147
  ]);
1127
1148
  }
1128
- const Kt = /* @__PURE__ */ q(Wt, [["render", Jt], ["__scopeId", "data-v-6d75a891"]]), Qt = b({
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: M,
1133
- ZxtForm: Fe,
1134
- ActionColumn: Kt,
1135
- Plus: $e,
1136
- Delete: ze,
1137
- Refresh: le,
1138
- Download: Se,
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: ke,
1141
- View: De,
1142
- Upload: Pe,
1143
- Setting: Ve
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 = Ue(), u = qe(), c = k(null), r = k(null), p = k(1), f = k(10), d = k(null), h = k(e.gridOptions.formMode !== !1), i = k({
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
- }), C = {
1174
- Plus: $e,
1175
- Delete: ze,
1176
- Refresh: le,
1177
- Download: Se,
1194
+ }), w = {
1195
+ Plus: ke,
1196
+ Delete: be,
1197
+ Refresh: re,
1198
+ Download: ze,
1178
1199
  Search: se,
1179
- Edit: ke,
1180
- View: De,
1181
- Upload: Pe,
1182
- Setting: Ve
1183
- }, o = _(() => {
1184
- const m = (e.gridOptions.columns || []).find((A) => A.actionColumn);
1185
- return m ? m.actionColumn : null;
1186
- }), S = _(() => (e.gridOptions.columns || []).map((m) => m.actionColumn ? {
1187
- ...m,
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
- } : m)), T = (n) => {
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 m = [...n.items];
1196
- return m.some(
1197
- (we) => we.type === "slot" && we.slotName === "search-actions"
1198
- ) || m.push({
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
- }), m;
1206
- }), x = _(() => {
1226
+ }), f;
1227
+ }), L = _(() => {
1207
1228
  const n = /* @__PURE__ */ new Set(["search-actions"]);
1208
- return (W.value || []).forEach((m) => {
1209
- m.type === "slot" && n.add(m.slotName || m.prop);
1229
+ return (W.value || []).forEach((f) => {
1230
+ f.type === "slot" && n.add(f.slotName || f.prop);
1210
1231
  }), n;
1211
- }), I = _(() => {
1232
+ }), j = _(() => {
1212
1233
  const n = {};
1213
- for (const m in u)
1214
- m === "search-actions" || m === "toolbar" || (x.value.has(m) || m.startsWith("form-")) && (n[m] = u[m]);
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 m in u)
1219
- m !== "toolbar" && !x.value.has(m) && !m.startsWith("form-") && (n[m] = u[m]);
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
- }), H = () => {
1222
- r.value?.submitForm();
1223
- }, oe = (n) => {
1224
- t("submit", n), e.gridOptions.proxyConfig && (i.value = { ...n }, p.value = 1, c.value?.reload?.({ formData: i.value, page: 1 }));
1225
- }, de = () => {
1226
- r.value?.resetForm();
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, c.value?.reload?.({ formData: {}, page: 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 : C[n];
1232
- }, v = _(() => {
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
- }), P = _(() => {
1259
+ }), Fe = _(() => {
1239
1260
  const {
1240
1261
  formConfig: n,
1241
- toolbar: m,
1242
- formMode: A,
1243
- formColumns: we,
1262
+ toolbar: f,
1263
+ formMode: P,
1264
+ formColumns: G,
1244
1265
  rules: ra,
1245
- data: la,
1246
- proxyConfig: Be,
1247
- ...Le
1266
+ data: sa,
1267
+ proxyConfig: Te,
1268
+ ...xe
1248
1269
  } = e.gridOptions;
1249
1270
  return {
1250
- ...Le,
1251
- proxyConfig: v.value || Be || null
1271
+ ...xe,
1272
+ proxyConfig: fe.value || Te || null
1252
1273
  };
1253
- }), Z = _(() => d.value !== null ? d.value : e.externalData.length > 0 ? e.externalData : e.gridOptions.data || []), E = _(() => !!e.gridOptions.proxyConfig), fe = _(() => E.value ? 0 : Z.value.length), me = (n, m) => {
1254
- t("toolbar-click", { code: n, button: m, grid: c.value });
1255
- }, ge = (n) => {
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
- }, he = (n) => {
1258
- f.value = n.size, t("size-change", n);
1259
- }, ve = () => c.value, N = () => r.value, F = () => c.value?.getTableRef()?.getSelectionRows?.() || [], Y = (n) => {
1260
- d.value = n ?? null;
1261
- }, Ce = (n) => {
1262
- h.value = n;
1263
- }, _e = (n, m = !0) => {
1264
- const A = e.gridOptions.formConfig;
1265
- A?.data && Object.assign(A.data, n), i.value = { ...A?.data || {}, ...n }, m && e.gridOptions.proxyConfig && (p.value = 1, c.value?.reload?.({ formData: i.value, page: 1 }));
1266
- }, re = (n, ...m) => {
1267
- const A = i.value;
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, c.value?.reload?.({ formData: A, page: 1 });
1291
+ p.value = 1, d.value?.reload?.({ formData: P, page: 1 });
1271
1292
  break;
1272
1293
  case "reload":
1273
- c.value?.reload?.({ formData: A });
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
- K(
1300
+ Q(
1280
1301
  () => e.gridOptions.formMode,
1281
1302
  (n) => {
1282
- n !== void 0 && (h.value = n);
1303
+ n !== void 0 && (g.value = n);
1283
1304
  }
1284
- ), Oe(() => {
1285
- e.gridOptions.proxyConfig && e.gridOptions.autoLoad !== !1 && c.value?.reload?.({ formData: i.value, page: 1 });
1305
+ ), Me(() => {
1306
+ e.gridOptions.proxyConfig && e.gridOptions.autoLoad !== !1 && d.value?.reload?.({ formData: i.value, page: 1 });
1286
1307
  });
1287
- const V = () => c.value?.getTableRef?.();
1308
+ const F = () => d.value?.getTableRef?.();
1288
1309
  return a({
1289
- getGridRef: ve,
1290
- getFormRef: N,
1291
- getElTableRef: V,
1292
- getSelectedRows: F,
1293
- reloadData: Y,
1294
- setFormVisible: Ce,
1295
- setFormData: _e,
1296
- commitProxy: re,
1297
- clearSelection: () => V()?.clearSelection(),
1298
- toggleRowSelection: (...n) => V()?.toggleRowSelection(...n),
1299
- toggleAllSelection: () => V()?.toggleAllSelection(),
1300
- toggleRowExpansion: (...n) => V()?.toggleRowExpansion(...n),
1301
- setCurrentRow: (...n) => V()?.setCurrentRow(...n),
1302
- clearSort: () => V()?.clearSort(),
1303
- clearFilter: (...n) => V()?.clearFilter(...n),
1304
- doLayout: () => V()?.doLayout(),
1305
- sort: (...n) => V()?.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: c,
1309
- searchFormRef: r,
1329
+ gridRef: d,
1330
+ searchFormRef: o,
1310
1331
  currentPage: p,
1311
- pageSize: f,
1312
- tableData: Z,
1313
- tableProps: P,
1314
- mergedColumns: S,
1315
- actionColumnConfig: o,
1316
- total: fe,
1317
- isFormVisible: h,
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: I,
1340
+ formFilteredSlots: j,
1320
1341
  tableFilteredSlots: ue,
1321
1342
  getIconComponent: pe,
1322
- handleToolbarClick: me,
1323
- handleActionClick: T,
1324
- handlePageChange: ge,
1325
- handleSizeChange: he,
1326
- handleSearch: H,
1327
- handleSearchSubmit: oe,
1328
- handleReset: de,
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: le
1352
+ Refresh: re
1332
1353
  };
1333
1354
  }
1334
- }), Xt = {
1355
+ }), Yt = {
1335
1356
  key: 0,
1336
1357
  class: "grid-search-form"
1337
- }, Yt = { class: "search-btn-group" }, ea = { class: "grid-table-wrapper" }, ta = {
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 aa(e, t, a, l, u, c) {
1342
- const r = z("el-button"), p = z("ZxtForm"), f = z("ActionColumn"), d = z("ZxtTable");
1343
- return s(), g("div", {
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(), g("div", Xt, [
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
- }, ne({
1375
+ }, X({
1355
1376
  "search-actions": y(() => [
1356
- w("div", Yt, [
1357
- D(r, {
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
- j(" 查询 ", -1)
1384
+ Z(" 查询 ", -1)
1364
1385
  ])]),
1365
1386
  _: 1
1366
1387
  }, 8, ["icon", "onClick"]),
1367
- D(r, {
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
- j(" 重置 ", -1)
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
- R(e.formFilteredSlots, (h, i) => ({
1402
+ O(e.formFilteredSlots, (g, i) => ({
1382
1403
  name: i,
1383
- fn: y((C) => [
1384
- B(e.$slots, i, Re(Ae(C)), void 0, !0)
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
- ])) : X("", !0),
1389
- w("div", ea, [
1390
- e.gridOptions.toolbar ? (s(), g("div", ta, [
1391
- (s(!0), g(L, null, R(e.gridOptions.toolbar.buttons, (h, i) => (s(), $(r, {
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: h.type || "default",
1394
- size: h.size || "small",
1395
- icon: e.getIconComponent(h.icon),
1396
- disabled: h.disabled,
1397
- onClick: (C) => e.handleToolbarClick(h.code, h)
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
- j(Q(h.name), 1)
1421
+ Z(Y(g.name), 1)
1401
1422
  ]),
1402
1423
  _: 2
1403
1424
  }, 1032, ["type", "size", "icon", "disabled", "onClick"]))), 128)),
1404
- B(e.$slots, "toolbar", {
1425
+ A(e.$slots, "toolbar", {
1405
1426
  grid: e.$refs.gridRef
1406
1427
  }, void 0, !0)
1407
- ])) : X("", !0),
1408
- D(d, O({ ref: "gridRef" }, { ...e.tableProps, ...e.attrs }, {
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
- }), ne({ _: 2 }, [
1443
+ }), X({ _: 2 }, [
1423
1444
  e.actionColumnConfig ? {
1424
1445
  name: "__action__",
1425
- fn: y(({ row: h }) => [
1426
- D(f, {
1446
+ fn: y(({ row: g }) => [
1447
+ D(m, {
1427
1448
  buttons: e.actionColumnConfig.buttons,
1428
- row: h,
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
- R(e.tableFilteredSlots, (h, i) => ({
1456
+ O(e.tableFilteredSlots, (g, i) => ({
1436
1457
  name: i,
1437
- fn: y((C) => [
1438
- B(e.$slots, i, Re(Ae(C)), void 0, !0)
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 xe = /* @__PURE__ */ q(Qt, [["render", aa], ["__scopeId", "data-v-f8b2d913"]]);
1446
- J.install = function(e) {
1447
- e.component(J.name, J);
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 na = [
1450
- ee,
1451
- te,
1452
- M,
1453
- xe,
1454
- Fe,
1455
- J
1456
- ], oa = (e) => {
1457
- na.forEach((t) => {
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
- }, ua = {
1461
- install: oa,
1462
- MyButton: ee,
1463
- JsxButton: te,
1464
- ZxtTable: M,
1465
- ZxtGrid: xe,
1466
- ZxtForm: Fe,
1467
- ZxtPagination: J,
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: M.renderer,
1470
- registerRenderer: M.registerRenderer
1490
+ renderer: B.renderer,
1491
+ registerRenderer: B.registerRenderer
1471
1492
  };
1472
1493
  export {
1473
- te as JsxButton,
1474
- ee as MyButton,
1475
- Fe as ZxtForm,
1476
- xe as ZxtGrid,
1477
- J as ZxtPagination,
1478
- M as ZxtTable,
1479
- ua as default
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
  };