zxt-table 0.6.3 → 0.6.6

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