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.
@@ -1,4 +1,4 @@
1
- import { createElementBlock as g, openBlock as s, normalizeClass as ie, renderSlot as Z, defineComponent as y, createVNode as D, ref as k, watch as K, resolveComponent as z, createBlock as $, h as G, inject as Te, computed as C, mergeProps as M, withCtx as b, Fragment as B, 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
- Z(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__ */ y({
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
- 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 = y({
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 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 = y({
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 = Te("updateRow", () => {
199
- }), a = (r) => {
198
+ const t = He("updateRow", () => {
199
+ }), a = (o) => {
200
200
  const { currentPage: p, pageSize: m } = e;
201
- return (p - 1) * m + r + 1;
202
- }, l = C(() => {
203
- const r = e.column;
201
+ return (p - 1) * m + o + 1;
202
+ }, l = _(() => {
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
- }), u = C(() => {
212
- const { children: r, ...p } = l.value;
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: (r) => {
219
- const p = l.value, m = r.row[p.prop], d = m ?? 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, M({ 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
- default: b(() => [
238
- (s(!0), g(B, null, R(e.normalizedColumn.children, (m, d) => (s(), $(r, {
239
- key: d,
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
- }, ne({ _: 2 }, [
244
- R(e.$slots, (h, i) => ({
243
+ }, X({ _: 2 }, [
244
+ O(e.$slots, (g, i) => ({
245
245
  name: i,
246
- fn: b((_) => [
247
- Z(e.$slots, i, M({ ref_for: !0 }, _))
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, M({ 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
+ 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: b((m) => [
260
- e.normalizedColumn.slot ? Z(e.$slots, 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(), $(ye(e.renderCell(m)), { key: 1 })) : e.normalizedColumn.formatter ? (s(), g(B, { key: 2 }, [
266
- j(Q(e.normalizedColumn.formatter(
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(), g(B, { key: 3 }, [
273
- j(Q(m.row[e.normalizedColumn.prop]), 1)
279
+ ], 64)) : (s(), h(T, { key: 3 }, [
280
+ Z(Y(m.row[e.normalizedColumn.prop]), 1)
274
281
  ], 64))
275
282
  ]),
276
- key: "0"
283
+ key: "1"
277
284
  } : void 0
278
285
  ]), 1040, ["index"]));
279
286
  }
280
- const dt = /* @__PURE__ */ q(it, [["render", ut]]), ct = y({
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: J, ZxtTableColumn: dt, ElTable: et },
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), l = k(e.pageSize), u = k(e.currentPage), c = k(!1), r = k([]), p = k(0), m = k({ prop: "", order: "" }), d = k({}), h = k({});
330
- 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) => {
331
340
  u.value = v;
332
- }), K(() => e.pageSize, (v) => {
333
- l.value = v;
334
341
  });
335
- const i = C(() => e.height === "full" ? { height: "100%" } : {}), _ = C(() => {
342
+ const w = _(() => e.height === "full" ? { height: "100%" } : {}), r = _(() => {
336
343
  if (e.height !== "full")
337
344
  return e.height;
338
- }), o = C(() => !!e.proxyConfig), S = C(() => o.value ? p.value : e.total > 0 ? e.total : e.data.length), L = C(
339
- () => o.value ? r.value : e.data
340
- ), W = (v) => {
341
- o.value && (u.value = v.page, l.value = v.size, T()), t("size-change", v);
342
- }, x = (v) => {
343
- o.value && (u.value = v.page, l.value = v.size, T()), t("page-change", v);
344
- }, I = ({ column: v, prop: P, order: H }) => {
345
- m.value = { prop: P, order: H }, o.value && T(), t("sort-change", { column: v, prop: P, order: H });
346
- }, ue = (v) => {
347
- d.value = v || {}, o.value && T(), t("filter-change", d.value);
348
- }, T = async (v) => {
349
- if (!o.value) return;
350
- const P = e.proxyConfig || {}, H = P.ajax?.query;
351
- if (typeof H != "function") return;
352
- const E = P.props || {}, fe = E.pageField || "page";
353
- E.sizeField;
354
- const ge = E.sortField || "sort", me = E.orderField || "order", he = E.filtersField || "filters";
355
- v?.formData !== void 0 ? h.value = v.formData : P._formData && (h.value = P._formData);
356
- const ve = P.params || {}, N = {
357
- [fe]: {
358
- currentPage: v?.page ?? u.value,
359
- pageSize: v?.pageSize ?? l.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
+ }, 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: h.value,
362
- ...ve
368
+ form: i.value,
369
+ ...Ce
363
370
  };
364
- m.value?.prop && (N[ge] = m.value.prop, N[me] = m.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;
365
372
  try {
366
- const F = await H(N), Y = P.response || {}, _e = Y.listField || "list", Ce = Y.totalField || "total", re = Y.transform;
367
- let V = [], n = 0;
368
- if (typeof re == "function") {
369
- const f = re(F);
370
- V = f?.list ?? [], n = f?.total ?? 0;
371
- } else F && typeof F == "object" && (V = F?.[_e] ?? F?.data ?? [], n = F?.[Ce] ?? F?.total ?? 0);
372
- r.value = Array.isArray(V) ? V : [], p.value = Number(n) || 0, t("loaded", {
373
- data: r.value,
374
- 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,
375
382
  payload: N
376
383
  });
377
- } catch (F) {
378
- t("load-error", F);
384
+ } catch (R) {
385
+ t("load-error", R);
379
386
  } finally {
380
- c.value = !1;
387
+ o.value = !1;
381
388
  }
382
- }, oe = (v, P) => {
383
- 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 });
384
391
  };
385
- He("updateRow", oe), Oe(() => {
386
- o.value && e.autoLoad && T();
392
+ Ze("updateRow", le), Me(() => {
393
+ C.value && e.autoLoad && H();
387
394
  });
388
- const de = () => a.value, ce = () => a.value?.getSelectionRows?.() || [], pe = (v) => T(v);
395
+ const ce = () => l.value, pe = () => l.value?.getSelectionRows?.() || [], fe = (v) => H(v);
389
396
  return {
390
- tableRef: a,
391
- containerStyle: i,
392
- tableHeight: _,
393
- getTableRef: de,
394
- pageSize: l,
395
- currentPage: u,
396
- loading: c,
397
- renderData: L,
398
- total: S,
399
- pageSizes: C(() => e.pageSizes),
400
- paginationLayout: C(() => e.paginationLayout),
401
- handleSizeChange: W,
402
- handlePageChange: x,
403
- handleSortChange: I,
404
- handleFilterChange: ue,
405
- reload: pe,
406
- getSelectedRows: ce,
407
- updateRow: oe
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 pt(e, t, a, l, u, c) {
412
- const r = z("ZxtTableColumn"), p = z("el-table"), m = z("ZxtPagination"), d = Ze("loading");
413
- 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", {
414
427
  class: ie(["zxt-table-container", { "zxt-table-container--full": e.height === "full" }]),
415
- style: je(e.containerStyle)
428
+ style: Ee(e.containerStyle)
416
429
  }, [
417
- Ie((s(), $(p, M({
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: b(() => [
427
- (s(!0), g(B, null, R(e.columns, (h, i) => (s(), $(r, {
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: h,
442
+ column: g,
430
443
  "current-page": e.currentPage,
431
444
  "page-size": e.pageSize
432
- }, ne({ _: 2 }, [
433
- R(e.$slots, (_, o) => ({
434
- name: o,
435
- fn: b((S) => [
436
- Z(e.$slots, o, M({ 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)
437
450
  ])
438
451
  }))
439
452
  ]), 1032, ["column", "current-page", "page-size"]))), 128))
440
453
  ]),
441
- _: 3
442
- }, 16, ["data", "height", "id", "onSortChange", "onFilterChange"])), [
443
- [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]
444
472
  ]),
445
- e.pageable ? (s(), $(m, {
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] = (h) => e.pageSize = h),
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"])) : X("", !0)
483
+ }, null, 8, ["model-value", "page-size", "page-sizes", "total", "layout", "onPageChange", "onSizeChange"])) : ee("", !0)
456
484
  ], 6);
457
485
  }
458
- const O = /* @__PURE__ */ q(ct, [["render", pt], ["__scopeId", "data-v-ebf6786f"]]), U = /* @__PURE__ */ new Map();
459
- class ft {
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 be = new ft();
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 && be.has(l)) {
518
- const u = be.get(l);
545
+ if (l && we.has(l)) {
546
+ const u = we.get(l);
519
547
  if (typeof u.renderItemContent == "function") {
520
- const c = {
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, c);
528
- } catch (r) {
529
- return console.error(`[ZxtTable] 渲染器 "${l}" 执行出错:`, r), null;
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
- O.install = function(e) {
536
- e.component(O.name, O);
563
+ B.install = function(e) {
564
+ e.component(B.name, B);
537
565
  };
538
- O.registerRenderer = st;
539
- O.renderer = be;
540
- /*! Element Plus Icons Vue v2.3.2 */
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(), g("svg", {
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
- w("path", {
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
- }), xe = mt, ht = /* @__PURE__ */ y({
582
+ }), Be = ht, vt = /* @__PURE__ */ z({
556
583
  name: "Check",
557
584
  __name: "check",
558
585
  setup(e) {
559
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), vt = ht, _t = /* @__PURE__ */ y({
596
+ }), Ct = vt, _t = /* @__PURE__ */ z({
570
597
  name: "Close",
571
598
  __name: "close",
572
599
  setup(e) {
573
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Ct = _t, wt = /* @__PURE__ */ y({
610
+ }), yt = _t, wt = /* @__PURE__ */ z({
584
611
  name: "CopyDocument",
585
612
  __name: "copy-document",
586
613
  setup(e) {
587
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), yt = wt, bt = /* @__PURE__ */ y({
628
+ }), bt = wt, zt = /* @__PURE__ */ z({
602
629
  name: "Delete",
603
630
  __name: "delete",
604
631
  setup(e) {
605
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), ze = bt, zt = /* @__PURE__ */ y({
642
+ }), be = zt, St = /* @__PURE__ */ z({
616
643
  name: "Document",
617
644
  __name: "document",
618
645
  setup(e) {
619
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), St = zt, kt = /* @__PURE__ */ y({
656
+ }), kt = St, $t = /* @__PURE__ */ z({
630
657
  name: "Download",
631
658
  __name: "download",
632
659
  setup(e) {
633
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Se = kt, $t = /* @__PURE__ */ y({
670
+ }), ze = $t, Vt = /* @__PURE__ */ z({
644
671
  name: "Edit",
645
672
  __name: "edit",
646
673
  setup(e) {
647
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), ke = $t, Vt = /* @__PURE__ */ y({
688
+ }), Se = Vt, Pt = /* @__PURE__ */ z({
662
689
  name: "Lock",
663
690
  __name: "lock",
664
691
  setup(e) {
665
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), Pt = Vt, Dt = /* @__PURE__ */ y({
706
+ }), Dt = Pt, Ft = /* @__PURE__ */ z({
680
707
  name: "Plus",
681
708
  __name: "plus",
682
709
  setup(e) {
683
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), $e = Dt, Ft = /* @__PURE__ */ y({
720
+ }), ke = Ft, Rt = /* @__PURE__ */ z({
694
721
  name: "Refresh",
695
722
  __name: "refresh",
696
723
  setup(e) {
697
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), le = Ft, Rt = /* @__PURE__ */ y({
734
+ }), re = Rt, At = /* @__PURE__ */ z({
708
735
  name: "Search",
709
736
  __name: "search",
710
737
  setup(e) {
711
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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 = Rt, At = /* @__PURE__ */ y({
748
+ }), se = At, Ot = /* @__PURE__ */ z({
722
749
  name: "Setting",
723
750
  __name: "setting",
724
751
  setup(e) {
725
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Ve = At, Ot = /* @__PURE__ */ y({
762
+ }), $e = Ot, Mt = /* @__PURE__ */ z({
736
763
  name: "Share",
737
764
  __name: "share",
738
765
  setup(e) {
739
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), xt = Ot, Mt = /* @__PURE__ */ y({
776
+ }), Bt = Mt, Lt = /* @__PURE__ */ z({
750
777
  name: "Unlock",
751
778
  __name: "unlock",
752
779
  setup(e) {
753
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- w("path", {
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
- }), Bt = Mt, Lt = /* @__PURE__ */ y({
794
+ }), Tt = Lt, xt = /* @__PURE__ */ z({
768
795
  name: "Upload",
769
796
  __name: "upload",
770
797
  setup(e) {
771
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Pe = Lt, Tt = /* @__PURE__ */ y({
808
+ }), Ve = xt, Ht = /* @__PURE__ */ z({
782
809
  name: "View",
783
810
  __name: "view",
784
811
  setup(e) {
785
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), De = Tt, Ht = /* @__PURE__ */ y({
822
+ }), Pe = Ht, Zt = /* @__PURE__ */ z({
796
823
  name: "Warning",
797
824
  __name: "warning",
798
825
  setup(e) {
799
- return (t, a) => (s(), g("svg", {
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
- w("path", {
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
- }), Zt = Ht;
810
- const jt = y({
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 = Ee({}), c = {
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
- }, r = (o) => c[o] || "el-input", p = (o) => {
830
- const S = o.type || "input", L = [
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(S), W = {
838
- placeholder: o.placeholder || `请${L ? "选择" : "输入"}${o.label}`,
839
- disabled: o.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 x = {};
844
- switch (S) {
870
+ let L = {};
871
+ switch (C) {
845
872
  case "date":
846
873
  case "daterange":
847
874
  case "datetime":
848
875
  case "datetimerange":
849
- x = {
850
- type: o.dateType || S,
851
- startPlaceholder: o.startPlaceholder || "开始日期",
852
- endPlaceholder: o.endPlaceholder || "结束日期",
853
- format: o.format,
854
- 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
855
882
  };
856
883
  break;
857
884
  case "cascader":
858
- x = {
859
- options: o.options,
860
- props: o.cascaderProps,
861
- clearable: o.clearable !== !1
885
+ L = {
886
+ options: r.options,
887
+ props: r.cascaderProps,
888
+ clearable: r.clearable !== !1
862
889
  };
863
890
  break;
864
891
  default:
865
- x = {};
892
+ L = {};
866
893
  }
867
- const I = {
894
+ const j = {
868
895
  ...W,
869
- ...x
896
+ ...L
870
897
  };
871
- return "clearable" in o && (I.clearable = o.clearable), o.props && typeof o.props == "object" && Object.assign(I, o.props), I;
872
- }, m = C(() => e.formColumns.map((o) => ({
873
- ...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,
874
901
  colSpan: {
875
- xs: o.xs ?? o.span ?? 24,
876
- sm: o.sm ?? o.span ?? 12,
877
- md: o.md ?? o.span ?? 12,
878
- lg: o.lg ?? o.span ?? 12,
879
- 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
880
907
  }
881
908
  })));
882
- K(
909
+ Q(
883
910
  () => e.initialFormData,
884
- (o) => {
885
- Object.keys(u).forEach((S) => {
886
- delete u[S];
887
- }), Object.assign(u, o);
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 d = C(() => {
892
- const o = { ...e.rules };
893
- return Object.keys(o).length === 0 && e.formColumns.length > 0 && e.formColumns.forEach((S) => {
894
- if (S.required) {
895
- const L = [
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(S.type);
903
- o[S.prop] = [
929
+ ].includes(C.type);
930
+ r[C.prop] = [
904
931
  {
905
932
  required: !0,
906
- message: `请${L ? "选择" : "输入"}${S.label}`,
907
- trigger: L ? "change" : "blur"
933
+ message: `请${x ? "选择" : "输入"}${C.label}`,
934
+ trigger: x ? "change" : "blur"
908
935
  }
909
936
  ];
910
937
  }
911
- }), o;
912
- }), h = () => {
913
- l.value && l.value.validate((o) => {
914
- o && t("submit", { ...u });
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
- }, _ = (o) => () => gt(o, u, {}) || null;
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: h,
950
+ submitForm: g,
924
951
  resetForm: i
925
952
  }), {
926
953
  formRef: l,
927
954
  formData: u,
928
- formRules: d,
929
- submitForm: h,
955
+ formRules: c,
956
+ submitForm: g,
930
957
  resetForm: i,
931
958
  processedColumns: m,
932
- getComponentType: r,
959
+ getComponentType: o,
933
960
  getComponentProps: p,
934
- renderCustomItem: _
961
+ renderCustomItem: w
935
962
  };
936
963
  }
937
- }), It = { class: "zxt-form-container" }, Et = {
964
+ }), It = { class: "zxt-form-container" }, Nt = {
938
965
  key: 0,
939
966
  class: "form-label"
940
- }, Nt = { class: "form-control" };
941
- function Ut(e, t, a, l, u, c) {
942
- const r = z("el-option"), p = z("el-form-item"), m = z("el-col"), d = z("el-row"), h = z("el-form");
943
- return s(), g("div", It, [
944
- D(h, M({ 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, {
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: b(() => [
951
- D(d, { gutter: 20 }, {
952
- default: b(() => [
953
- (s(!0), g(B, null, R(e.processedColumns, (i, _) => (s(), $(m, M({ key: _ }, { ref_for: !0 }, i.colSpan), {
954
- default: b(() => [
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: b(() => [
962
- w("div", {
988
+ default: y(() => [
989
+ b("div", {
963
990
  class: ie(["form-item-wrapper", { "is-action": i.isAction }])
964
991
  }, [
965
- i.label ? (s(), g("span", Et, Q(i.label), 1)) : X("", !0),
966
- w("div", Nt, [
967
- i.type === "slot" ? Z(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, {
968
995
  key: 0,
969
996
  formData: e.formData,
970
997
  column: i
971
- }, void 0, !0) : i.itemRender ? (s(), $(ye(e.renderCustomItem(i)), { key: 1 })) : (s(), $(ye(e.getComponentType(i.type)), M({
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": (o) => e.formData[i.prop] = o
975
- }, { ref_for: !0 }, e.getComponentProps(i), Ne(i.events || {})), {
976
- default: b(() => [
977
- i.type === "select" ? (s(!0), g(B, { key: 0 }, R(i.options, (o, S) => (s(), $(r, {
978
- key: S,
979
- label: o.label,
980
- value: o.value
981
- }, null, 8, ["label", "value"]))), 128)) : X("", !0)
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 Fe = /* @__PURE__ */ q(jt, [["render", Ut], ["__scopeId", "data-v-6b22a57b"]]), qt = {
1002
- Plus: $e,
1003
- Delete: ze,
1004
- Refresh: le,
1005
- 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,
1006
1033
  Search: se,
1007
- Edit: ke,
1008
- View: De,
1009
- Upload: Pe,
1010
- Setting: Ve,
1011
- Warning: Zt,
1012
- Check: vt,
1013
- Close: Ct,
1014
- Document: St,
1015
- CopyDocument: yt,
1016
- Share: xt,
1017
- Lock: Pt,
1018
- Unlock: Bt,
1019
- ArrowDown: xe
1020
- }, Wt = y({
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: xe },
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 = C(() => e.buttons.filter((d) => typeof d.visible == "function" ? d.visible(e.row) : typeof d.visible == "boolean" ? d.visible : !0)), l = C(
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 = C(
1068
+ ), u = _(
1042
1069
  () => l.value ? a.value.slice(0, e.maxVisible) : a.value
1043
- ), c = C(
1070
+ ), d = _(
1044
1071
  () => l.value ? a.value.slice(e.maxVisible) : []
1045
1072
  );
1046
1073
  return {
1047
1074
  visibleButtons: u,
1048
- overflowButtons: c,
1049
- getIconComponent: (d) => {
1050
- if (d)
1051
- 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];
1052
1079
  },
1053
- handleClick: (d) => {
1054
- 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 });
1055
1082
  },
1056
- handleCommand: (d) => {
1057
- 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 });
1058
1085
  }
1059
1086
  };
1060
1087
  }
1061
- }), Gt = { class: "action-column" };
1062
- function Jt(e, t, a, l, u, c) {
1063
- const r = z("el-button"), p = z("ArrowDown"), m = z("el-icon"), d = z("el-dropdown-item"), h = z("el-dropdown-menu"), i = z("el-dropdown");
1064
- return s(), g("div", Gt, [
1065
- (s(!0), g(B, null, R(e.visibleButtons, (_) => (s(), $(r, {
1066
- key: _.code,
1067
- type: _.type || "",
1068
- icon: e.getIconComponent(_.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),
1069
1096
  size: "small",
1070
1097
  link: "",
1071
- onClick: (o) => e.handleClick(_)
1098
+ onClick: (r) => e.handleClick(w)
1072
1099
  }, {
1073
- default: b(() => [
1074
- j(Q(_.label), 1)
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(), $(i, {
1105
+ e.overflowButtons.length ? (s(), V(i, {
1079
1106
  key: 0,
1080
1107
  trigger: "hover",
1081
1108
  onCommand: e.handleCommand
1082
1109
  }, {
1083
- dropdown: b(() => [
1084
- D(h, null, {
1085
- default: b(() => [
1086
- (s(!0), g(B, null, R(e.overflowButtons, (_) => (s(), $(d, {
1087
- key: _.code,
1088
- command: _,
1089
- icon: e.getIconComponent(_.icon)
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: b(() => [
1092
- j(Q(_.label), 1)
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: b(() => [
1101
- D(r, {
1127
+ default: y(() => [
1128
+ D(o, {
1102
1129
  type: "",
1103
1130
  size: "small",
1104
1131
  link: ""
1105
1132
  }, {
1106
- default: b(() => [
1107
- t[0] || (t[0] = j(" 更多 ", -1)),
1133
+ default: y(() => [
1134
+ t[0] || (t[0] = Z(" 更多 ", -1)),
1108
1135
  D(m, { class: "el-icon--right" }, {
1109
- default: b(() => [
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"])) : X("", !0)
1146
+ }, 8, ["onCommand"])) : ee("", !0)
1120
1147
  ]);
1121
1148
  }
1122
- const Kt = /* @__PURE__ */ q(Wt, [["render", Jt], ["__scopeId", "data-v-6d75a891"]]), Qt = y({
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: O,
1127
- ZxtForm: Fe,
1128
- ActionColumn: Kt,
1129
- Plus: $e,
1130
- Delete: ze,
1131
- Refresh: le,
1132
- Download: Se,
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: ke,
1135
- View: De,
1136
- Upload: Pe,
1137
- Setting: Ve
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 = Ue(), u = qe(), c = k(null), r = k(null), p = k(1), m = 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({
1166
1193
  ...e.gridOptions.formConfig?.data || {}
1167
- }), _ = {
1168
- Plus: $e,
1169
- Delete: ze,
1170
- Refresh: le,
1171
- Download: Se,
1194
+ }), w = {
1195
+ Plus: ke,
1196
+ Delete: be,
1197
+ Refresh: re,
1198
+ Download: ze,
1172
1199
  Search: se,
1173
- Edit: ke,
1174
- View: De,
1175
- Upload: Pe,
1176
- Setting: Ve
1177
- }, o = C(() => {
1178
- const f = (e.gridOptions.columns || []).find((A) => A.actionColumn);
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
- }), S = C(() => (e.gridOptions.columns || []).map((f) => f.actionColumn ? {
1207
+ }), C = _(() => (e.gridOptions.columns || []).map((f) => f.actionColumn ? {
1181
1208
  ...f,
1182
1209
  slot: "__action__",
1183
1210
  actionColumn: void 0
1184
- } : f)), L = (n) => {
1211
+ } : f)), x = (n) => {
1185
1212
  t("action-click", n);
1186
- }, W = C(() => {
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
- (we) => we.type === "slot" && we.slotName === "search-actions"
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
- }), x = C(() => {
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
- }), I = C(() => {
1232
+ }), j = _(() => {
1206
1233
  const n = {};
1207
1234
  for (const f in u)
1208
- f === "search-actions" || f === "toolbar" || (x.value.has(f) || f.startsWith("form-")) && (n[f] = u[f]);
1235
+ f === "search-actions" || f === "toolbar" || (L.value.has(f) || f.startsWith("form-")) && (n[f] = u[f]);
1209
1236
  return n;
1210
- }), ue = C(() => {
1237
+ }), ue = _(() => {
1211
1238
  const n = {};
1212
1239
  for (const f in u)
1213
- f !== "toolbar" && !x.value.has(f) && !f.startsWith("form-") && (n[f] = u[f]);
1240
+ f !== "toolbar" && !L.value.has(f) && !f.startsWith("form-") && (n[f] = u[f]);
1214
1241
  return n;
1215
- }), T = () => {
1216
- r.value?.submitForm();
1217
- }, oe = (n) => {
1218
- t("submit", n), e.gridOptions.proxyConfig && (i.value = { ...n }, p.value = 1, c.value?.reload?.({ formData: i.value, page: 1 }));
1219
- }, de = () => {
1220
- 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();
1221
1248
  }, ce = () => {
1222
- 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 }));
1223
1250
  }, pe = (n) => {
1224
1251
  if (n)
1225
- return typeof n == "object" || typeof n == "function" ? n : _[n];
1226
- }, v = C(() => {
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
- }), P = C(() => {
1259
+ }), Fe = _(() => {
1233
1260
  const {
1234
1261
  formConfig: n,
1235
1262
  toolbar: f,
1236
- formMode: A,
1237
- formColumns: we,
1263
+ formMode: P,
1264
+ formColumns: G,
1238
1265
  rules: ra,
1239
- data: la,
1240
- proxyConfig: Be,
1241
- ...Le
1266
+ data: sa,
1267
+ proxyConfig: Te,
1268
+ ...xe
1242
1269
  } = e.gridOptions;
1243
1270
  return {
1244
- ...Le,
1245
- proxyConfig: v.value || Be || null
1271
+ ...xe,
1272
+ proxyConfig: fe.value || Te || null
1246
1273
  };
1247
- }), H = C(() => d.value !== null ? d.value : e.externalData.length > 0 ? e.externalData : e.gridOptions.data || []), E = C(() => !!e.gridOptions.proxyConfig), fe = C(() => E.value ? 0 : H.value.length), ge = (n, f) => {
1248
- t("toolbar-click", { code: n, button: f, grid: c.value });
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
- }, he = (n) => {
1278
+ }, ge = (n) => {
1252
1279
  m.value = n.size, t("size-change", n);
1253
- }, ve = () => c.value, N = () => r.value, F = () => c.value?.getTableRef()?.getSelectionRows?.() || [], Y = (n) => {
1254
- d.value = n ?? null;
1255
- }, _e = (n) => {
1256
- h.value = n;
1257
- }, Ce = (n, f = !0) => {
1258
- const A = e.gridOptions.formConfig;
1259
- A?.data && Object.assign(A.data, n), i.value = { ...A?.data || {}, ...n }, f && e.gridOptions.proxyConfig && (p.value = 1, c.value?.reload?.({ formData: i.value, page: 1 }));
1260
- }, re = (n, ...f) => {
1261
- const A = i.value;
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, c.value?.reload?.({ formData: A, page: 1 });
1291
+ p.value = 1, d.value?.reload?.({ formData: P, page: 1 });
1265
1292
  break;
1266
1293
  case "reload":
1267
- c.value?.reload?.({ formData: A });
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
- K(
1300
+ Q(
1274
1301
  () => e.gridOptions.formMode,
1275
1302
  (n) => {
1276
- n !== void 0 && (h.value = n);
1303
+ n !== void 0 && (g.value = n);
1277
1304
  }
1278
- ), Oe(() => {
1279
- 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 });
1280
1307
  });
1281
- const V = () => c.value?.getTableRef?.();
1308
+ const F = () => d.value?.getTableRef?.();
1282
1309
  return a({
1283
- getGridRef: ve,
1284
- getFormRef: N,
1285
- getElTableRef: V,
1286
- getSelectedRows: F,
1287
- reloadData: Y,
1288
- setFormVisible: _e,
1289
- setFormData: Ce,
1290
- commitProxy: re,
1291
- clearSelection: () => V()?.clearSelection(),
1292
- toggleRowSelection: (...n) => V()?.toggleRowSelection(...n),
1293
- toggleAllSelection: () => V()?.toggleAllSelection(),
1294
- toggleRowExpansion: (...n) => V()?.toggleRowExpansion(...n),
1295
- setCurrentRow: (...n) => V()?.setCurrentRow(...n),
1296
- clearSort: () => V()?.clearSort(),
1297
- clearFilter: (...n) => V()?.clearFilter(...n),
1298
- doLayout: () => V()?.doLayout(),
1299
- 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)
1300
1327
  }), {
1301
1328
  attrs: l,
1302
- gridRef: c,
1303
- searchFormRef: r,
1329
+ gridRef: d,
1330
+ searchFormRef: o,
1304
1331
  currentPage: p,
1305
1332
  pageSize: m,
1306
- tableData: H,
1307
- tableProps: P,
1308
- mergedColumns: S,
1309
- actionColumnConfig: o,
1310
- total: fe,
1311
- isFormVisible: h,
1333
+ tableData: v,
1334
+ tableProps: Fe,
1335
+ mergedColumns: C,
1336
+ actionColumnConfig: r,
1337
+ total: E,
1338
+ isFormVisible: g,
1312
1339
  searchFormColumns: W,
1313
- formFilteredSlots: I,
1340
+ formFilteredSlots: j,
1314
1341
  tableFilteredSlots: ue,
1315
1342
  getIconComponent: pe,
1316
- handleToolbarClick: ge,
1317
- handleActionClick: L,
1343
+ handleToolbarClick: I,
1344
+ handleActionClick: x,
1318
1345
  handlePageChange: me,
1319
- handleSizeChange: he,
1320
- handleSearch: T,
1321
- handleSearchSubmit: oe,
1322
- handleReset: de,
1346
+ handleSizeChange: ge,
1347
+ handleSearch: de,
1348
+ handleSearchSubmit: H,
1349
+ handleReset: le,
1323
1350
  handleSearchReset: ce,
1324
1351
  Search: se,
1325
- Refresh: le
1352
+ Refresh: re
1326
1353
  };
1327
1354
  }
1328
- }), Xt = {
1355
+ }), Yt = {
1329
1356
  key: 0,
1330
1357
  class: "grid-search-form"
1331
- }, Yt = { class: "search-btn-group" }, ea = { class: "grid-table-wrapper" }, ta = {
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 aa(e, t, a, l, u, c) {
1336
- const r = z("el-button"), p = z("ZxtForm"), m = z("ActionColumn"), d = z("ZxtTable");
1337
- 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", {
1338
1365
  class: ie(["zxt-grid-container", { "zxt-grid-container--full": e.gridOptions.height === "full" }])
1339
1366
  }, [
1340
- e.gridOptions.formConfig && e.isFormVisible ? (s(), g("div", Xt, [
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
- }, ne({
1349
- "search-actions": b(() => [
1350
- w("div", Yt, [
1351
- D(r, {
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: b(() => [...t[0] || (t[0] = [
1357
- j(" 查询 ", -1)
1383
+ default: y(() => [...t[0] || (t[0] = [
1384
+ Z(" 查询 ", -1)
1358
1385
  ])]),
1359
1386
  _: 1
1360
1387
  }, 8, ["icon", "onClick"]),
1361
- D(r, {
1388
+ D(o, {
1362
1389
  class: "btn-reset",
1363
1390
  icon: e.Refresh,
1364
1391
  onClick: e.handleReset
1365
1392
  }, {
1366
- default: b(() => [...t[1] || (t[1] = [
1367
- j(" 重置 ", -1)
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
- R(e.formFilteredSlots, (h, i) => ({
1402
+ O(e.formFilteredSlots, (g, i) => ({
1376
1403
  name: i,
1377
- fn: b((_) => [
1378
- Z(e.$slots, i, Re(Ae(_)), void 0, !0)
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
- ])) : X("", !0),
1383
- w("div", ea, [
1384
- e.gridOptions.toolbar ? (s(), g("div", ta, [
1385
- (s(!0), g(B, 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, {
1386
1413
  key: i,
1387
- type: h.type || "default",
1388
- size: h.size || "small",
1389
- icon: e.getIconComponent(h.icon),
1390
- disabled: h.disabled,
1391
- onClick: (_) => 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)
1392
1419
  }, {
1393
- default: b(() => [
1394
- j(Q(h.name), 1)
1420
+ default: y(() => [
1421
+ Z(Y(g.name), 1)
1395
1422
  ]),
1396
1423
  _: 2
1397
1424
  }, 1032, ["type", "size", "icon", "disabled", "onClick"]))), 128)),
1398
- Z(e.$slots, "toolbar", {
1425
+ A(e.$slots, "toolbar", {
1399
1426
  grid: e.$refs.gridRef
1400
1427
  }, void 0, !0)
1401
- ])) : X("", !0),
1402
- D(d, M({ ref: "gridRef" }, { ...e.tableProps, ...e.attrs }, {
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
- }), ne({ _: 2 }, [
1443
+ }), X({ _: 2 }, [
1417
1444
  e.actionColumnConfig ? {
1418
1445
  name: "__action__",
1419
- fn: b(({ row: h }) => [
1446
+ fn: y(({ row: g }) => [
1420
1447
  D(m, {
1421
1448
  buttons: e.actionColumnConfig.buttons,
1422
- row: h,
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
- R(e.tableFilteredSlots, (h, i) => ({
1456
+ O(e.tableFilteredSlots, (g, i) => ({
1430
1457
  name: i,
1431
- fn: b((_) => [
1432
- Z(e.$slots, i, Re(Ae(_)), void 0, !0)
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 Me = /* @__PURE__ */ q(Qt, [["render", aa], ["__scopeId", "data-v-f8b2d913"]]);
1440
- J.install = function(e) {
1441
- 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);
1442
1469
  };
1443
- const na = [
1444
- ee,
1445
- te,
1446
- O,
1447
- Me,
1448
- Fe,
1449
- J
1450
- ], oa = (e) => {
1451
- 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) => {
1452
1479
  e.component(t.name, t);
1453
1480
  });
1454
- }, ua = {
1455
- install: oa,
1456
- MyButton: ee,
1457
- JsxButton: te,
1458
- ZxtTable: O,
1459
- ZxtGrid: Me,
1460
- ZxtForm: Fe,
1461
- 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,
1462
1489
  // 暴露渲染器 API
1463
- renderer: O.renderer,
1464
- registerRenderer: O.registerRenderer
1490
+ renderer: B.renderer,
1491
+ registerRenderer: B.registerRenderer
1465
1492
  };
1466
1493
  export {
1467
- te as JsxButton,
1468
- ee as MyButton,
1469
- Fe as ZxtForm,
1470
- Me as ZxtGrid,
1471
- J as ZxtPagination,
1472
- O as ZxtTable,
1473
- 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
1474
1501
  };