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