@aspire-ui/element-component-pro 1.0.21 → 1.0.23

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,6 +1,6 @@
1
- import { reactive as et, defineComponent as ne, h as de, useSlots as he, ref as z, computed as y, onMounted as ve, nextTick as Le, onUnmounted as Be, watch as X, unref as me } from "vue";
1
+ import { reactive as et, defineComponent as ne, h as de, useSlots as he, ref as D, computed as w, onMounted as me, nextTick as Le, onUnmounted as Be, watch as U, unref as pe } from "vue";
2
2
  import { MessageBox as tt } from "element-ui";
3
- const pe = et({});
3
+ const fe = et({});
4
4
  function Te(s, e) {
5
5
  if (!e)
6
6
  return s;
@@ -22,13 +22,13 @@ function Oe(s) {
22
22
  }
23
23
  function Re() {
24
24
  return {
25
- getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? pe : pe[t] ?? {})),
25
+ getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? fe : fe[t] ?? {})),
26
26
  setSetting: (t, o) => {
27
- const r = pe[t];
28
- r ? pe[t] = Te({ ...r }, o) : pe[t] = { ...o };
27
+ const r = fe[t];
28
+ r ? fe[t] = Te({ ...r }, o) : fe[t] = { ...o };
29
29
  },
30
30
  mergeSettings: (t, o) => {
31
- const r = pe[t] ?? {};
31
+ const r = fe[t] ?? {};
32
32
  return Te({ ...r }, o);
33
33
  }
34
34
  };
@@ -70,7 +70,7 @@ const je = ne({
70
70
  setup(s) {
71
71
  return () => {
72
72
  const e = s.slotRender, n = e == null ? void 0 : e({ column: s.column, record: s.record, index: s.index, value: s.value });
73
- if (((a) => a == null ? [] : Array.isArray(a) ? a.filter((p) => p != null && p !== !1 && !p.isComment) : [a])(n).length > 0)
73
+ if (((a) => a == null ? [] : Array.isArray(a) ? a.filter((f) => f != null && f !== !1 && !f.isComment) : [a])(n).length > 0)
74
74
  return n;
75
75
  const r = { ...s.column };
76
76
  return s.customRender && (r.customRender = s.customRender), s.valueEnum && (r.valueEnum = s.valueEnum), de(je, { props: { column: r, record: s.record, index: s.index, value: s.value } });
@@ -88,29 +88,29 @@ const je = ne({
88
88
  return { __sfc: !0, props: e, $scopedSlots: n, shouldShowColumn: (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, DefaultCellRenderer: je, BodyCellRenderer: qe };
89
89
  }
90
90
  });
91
- function ae(s, e, n, t, o, r, a, p) {
91
+ function se(s, e, n, t, o, r, a, f) {
92
92
  var m = typeof s == "function" ? s.options : s;
93
93
  e && (m.render = e, m.staticRenderFns = n, m._compiled = !0), t && (m.functional = !0), r && (m._scopeId = "data-v-" + r);
94
- var h;
95
- if (a ? (h = function(C) {
96
- C = C || // cached call
94
+ var _;
95
+ if (a ? (_ = function(x) {
96
+ x = x || // cached call
97
97
  this.$vnode && this.$vnode.ssrContext || // stateful
98
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !C && typeof __VUE_SSR_CONTEXT__ < "u" && (C = __VUE_SSR_CONTEXT__), o && o.call(this, C), C && C._registeredComponents && C._registeredComponents.add(a);
99
- }, m._ssrRegister = h) : o && (h = p ? function() {
98
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !x && typeof __VUE_SSR_CONTEXT__ < "u" && (x = __VUE_SSR_CONTEXT__), o && o.call(this, x), x && x._registeredComponents && x._registeredComponents.add(a);
99
+ }, m._ssrRegister = _) : o && (_ = f ? function() {
100
100
  o.call(
101
101
  this,
102
102
  (m.functional ? this.parent : this).$root.$options.shadowRoot
103
103
  );
104
- } : o), h)
104
+ } : o), _)
105
105
  if (m.functional) {
106
- m._injectStyles = h;
107
- var O = m.render;
108
- m.render = function(c, x) {
109
- return h.call(x), O(c, x);
106
+ m._injectStyles = _;
107
+ var z = m.render;
108
+ m.render = function(p, v) {
109
+ return _.call(v), z(p, v);
110
110
  };
111
111
  } else {
112
- var b = m.beforeCreate;
113
- m.beforeCreate = b ? [].concat(b, h) : [h];
112
+ var S = m.beforeCreate;
113
+ m.beforeCreate = S ? [].concat(S, _) : [_];
114
114
  }
115
115
  return {
116
116
  exports: s,
@@ -130,7 +130,7 @@ var ot = function() {
130
130
  }), 0) : n("span", [e._v(e._s(e.column.helpMessage))])];
131
131
  }, proxy: !0 }], null, !1, 347236738) }, [n("i", { staticClass: "el-icon-question" })]) : e._e()]];
132
132
  }, proxy: !0 }], null, !0) });
133
- }, lt = [], at = /* @__PURE__ */ ae(
133
+ }, lt = [], at = /* @__PURE__ */ se(
134
134
  nt,
135
135
  ot,
136
136
  lt,
@@ -185,281 +185,289 @@ const st = at.exports, rt = /* @__PURE__ */ ne({
185
185
  },
186
186
  emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
187
187
  setup(s, { expose: e, emit: n }) {
188
- const t = s, o = he(), r = z(), a = z(), p = z(0), m = z(t.loading ?? !1), h = z([]), O = z({}), b = z([]), C = z({}), c = z([]), x = z(null), { mergeSettings: B } = Re(), F = y(() => B("ProTable", { ...t, ...C.value })), N = y(() => {
188
+ const t = s, o = he(), r = D(), a = D(), f = D(0), m = D(t.loading ?? !1), _ = D([]), z = w(() => {
189
+ const l = _.value;
190
+ if (!k.value || !l.length)
191
+ return l;
192
+ const { page: c, pageSize: b } = E.value, C = (c - 1) * b;
193
+ return l.slice(C, C + b);
194
+ }), S = D({}), x = D([]), p = D({}), v = D([]), B = D(null), { mergeSettings: V } = Re(), F = w(() => V("ProTable", { ...t, ...p.value })), A = w(() => {
189
195
  const l = F.value.pagination;
190
196
  return l && typeof l == "object" ? {
191
197
  pageSize: l.pageSize ?? 10,
192
198
  pageSizes: l.pageSizes ?? [10, 20, 50, 100]
193
199
  } : { pageSize: 10, pageSizes: [10, 20, 50, 100] };
194
- }), P = z({
200
+ }), E = D({
195
201
  page: 1,
196
- pageSize: N.value.pageSize,
197
- pageSizes: N.value.pageSizes,
202
+ pageSize: A.value.pageSize,
203
+ pageSizes: A.value.pageSizes,
198
204
  total: 0
199
- }), G = y(() => !!F.value.title || !!o.tableTitle || !!o.toolbar), I = y(() => x.value !== null ? x.value : !!t.pagination && typeof t.pagination == "object"), S = y(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.small : !1), d = y(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.background : !1), $ = y(() => F.value.rowKey || "id"), R = y(() => new Set(c.value.map((l) => l[$.value]))), j = y(
200
- () => b.value.filter((l) => !l.hideInTable && !l.defaultHidden)
201
- ), L = y(() => {
202
- const l = /* @__PURE__ */ new Map(), u = (g) => {
203
- for (const k of g)
204
- k.children && k.children.length > 0 ? u(k.children) : k.id && l.set(k.id, k);
205
+ }), N = w(() => !!F.value.title || !!o.tableTitle || !!o.toolbar), k = w(() => B.value !== null ? B.value : !!t.pagination && typeof t.pagination == "object"), u = w(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.small : !1), W = w(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.background : !1), y = w(() => F.value.rowKey || "id"), j = w(() => new Set(v.value.map((l) => l[y.value]))), q = w(() => (console.log(x.value), x.value.filter((l) => !l.hideInTable && !l.defaultHidden))), X = w(() => {
206
+ const l = /* @__PURE__ */ new Map(), c = (b) => {
207
+ for (const C of b)
208
+ C.children && C.children.length > 0 ? c(C.children) : C.dataIndex && l.set(C.dataIndex, C);
205
209
  };
206
- return u(j.value), l;
207
- }), Z = y(() => Array.from(L.value.values())), J = y(() => {
208
- var u, g;
210
+ return c(q.value), l;
211
+ }), G = w(() => Array.from(X.value.values())), ee = w(() => {
212
+ var c, b;
209
213
  let l = 0;
210
- return F.value.rowSelection && (l += Number(F.value.rowSelection.width) || 48), F.value.showIndexColumn && (l += Number((u = F.value.indexColumnProps) == null ? void 0 : u.width) || 60), F.value.actionColumn && (l += Number((g = F.value.actionColumn) == null ? void 0 : g.width) || 150), l;
211
- }), Y = (l) => typeof l == "number" && l > 0, Q = y(() => Z.value.filter((u) => _(u) && Y(u.width)).reduce((u, g) => u + (typeof g.width == "number" ? g.width : 0), 0)), ee = y(() => Z.value.filter((u) => _(u) && typeof u.width == "string").reduce((u, g) => u + (Number(oe(g)) || 80), 0)), U = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, te = (l) => {
214
+ return F.value.rowSelection && (l += Number(F.value.rowSelection.width) || 48), F.value.showIndexColumn && (l += Number((c = F.value.indexColumnProps) == null ? void 0 : c.width) || 60), F.value.actionColumn && (l += Number((b = F.value.actionColumn) == null ? void 0 : b.width) || 150), l;
215
+ }), Z = (l) => typeof l == "number" && l > 0, Y = w(() => G.value.filter((c) => O(c) && Z(c.width)).reduce((c, b) => c + (typeof b.width == "number" ? b.width : 0), 0)), te = w(() => G.value.filter((c) => O(c) && typeof c.width == "string").reduce((c, b) => c + (Number(g(b)) || 80), 0)), J = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, le = (l) => {
212
216
  if (!F.value.spanMethod)
213
217
  return [1, 1];
214
- const u = L.value.get(l.column.id);
218
+ const c = X.value.get(l.column.property);
215
219
  return F.value.spanMethod({
216
220
  ...l,
217
- column: { ...u, dataIndex: l.column.property, title: l.column.label }
221
+ column: c ? { ...c, ...l.column } : { ...l.column, dataIndex: l.column.property, title: l.column.label }
218
222
  });
219
- }, oe = (l) => {
220
- const u = l.width;
221
- if (Y(u) && Q.value > 0 && p.value > 0 && typeof u == "number") {
222
- const g = p.value - J.value - ee.value;
223
- let k = Math.floor(g * u / Q.value);
224
- const q = U(l.minWidth) ?? 60, K = U(l.maxWidth);
225
- return k = Math.max(q, k), K != null && (k = Math.min(K, k)), k;
223
+ }, g = (l) => {
224
+ const c = l.width;
225
+ if (Z(c) && Y.value > 0 && f.value > 0 && typeof c == "number") {
226
+ const b = f.value - ee.value - te.value;
227
+ let C = Math.floor(b * c / Y.value);
228
+ const H = J(l.minWidth) ?? 60, I = J(l.maxWidth);
229
+ return C = Math.max(H, C), I != null && (C = Math.min(I, C)), C;
226
230
  }
227
- if (typeof u == "string") {
228
- const g = U(u) ?? 80, k = U(l.minWidth), q = U(l.maxWidth);
229
- let K = g;
230
- return k != null && (K = Math.max(k, K)), q != null && (K = Math.min(q, K)), K;
231
+ if (typeof c == "string") {
232
+ const b = J(c) ?? 80, C = J(l.minWidth), H = J(l.maxWidth);
233
+ let I = b;
234
+ return C != null && (I = Math.max(C, I)), H != null && (I = Math.min(H, I)), I;
231
235
  }
232
236
  return l.minWidth;
233
- }, _ = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, E = y(() => {
234
- var u;
235
- const l = (u = F.value.rowSelection) == null ? void 0 : u.getCheckboxProps;
236
- return l ? h.value.filter((g) => {
237
- var k;
238
- return !((k = l(g)) != null && k.disabled);
239
- }) : h.value;
240
- }), D = y(() => E.value.length > 0), i = y(() => E.value.length === 0 ? !1 : E.value.every((l) => R.value.has(l[$.value]))), v = y(() => {
241
- const l = E.value.filter((u) => R.value.has(u[$.value])).length;
242
- return l > 0 && l < E.value.length;
243
- }), A = (l) => R.value.has(l[$.value]), V = (l) => {
244
- var u, g, k;
245
- return ((k = (g = (u = F.value.rowSelection) == null ? void 0 : u.getCheckboxProps) == null ? void 0 : g.call(u, l)) == null ? void 0 : k.disabled) ?? !1;
246
- }, W = (l) => {
247
- var u, g, k;
248
- return ((k = (g = (u = F.value.rowSelection) == null ? void 0 : u.getRadioProps) == null ? void 0 : g.call(u, l)) == null ? void 0 : k.disabled) ?? !1;
249
- }, H = () => {
250
- const l = c.value.map((u) => u[$.value]);
251
- n("selection-change", { keys: l, rows: c.value });
252
- }, ie = (l, u) => {
253
- const g = l[$.value];
254
- u ? c.value = [...c.value.filter((k) => k[$.value] !== g), l] : c.value = c.value.filter((k) => k[$.value] !== g), H();
255
- }, _e = (l) => {
256
- c.value = [l], H();
237
+ }, O = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, $ = w(() => {
238
+ var c;
239
+ const l = (c = F.value.rowSelection) == null ? void 0 : c.getCheckboxProps;
240
+ return l ? z.value.filter((b) => {
241
+ var C;
242
+ return !((C = l(b)) != null && C.disabled);
243
+ }) : z.value;
244
+ }), i = w(() => $.value.length > 0), h = w(() => $.value.length === 0 ? !1 : $.value.every((l) => j.value.has(l[y.value]))), M = w(() => {
245
+ const l = $.value.filter((c) => j.value.has(c[y.value])).length;
246
+ return l > 0 && l < $.value.length;
247
+ }), K = (l) => j.value.has(l[y.value]), L = (l) => {
248
+ var c, b, C;
249
+ return ((C = (b = (c = F.value.rowSelection) == null ? void 0 : c.getCheckboxProps) == null ? void 0 : b.call(c, l)) == null ? void 0 : C.disabled) ?? !1;
250
+ }, Q = (l) => {
251
+ var c, b, C;
252
+ return ((C = (b = (c = F.value.rowSelection) == null ? void 0 : c.getRadioProps) == null ? void 0 : b.call(c, l)) == null ? void 0 : C.disabled) ?? !1;
253
+ }, ae = () => {
254
+ const l = v.value.map((c) => c[y.value]);
255
+ n("selection-change", { keys: l, rows: v.value });
256
+ }, _e = (l, c) => {
257
+ const b = l[y.value];
258
+ c ? v.value = [...v.value.filter((C) => C[y.value] !== b), l] : v.value = v.value.filter((C) => C[y.value] !== b), ae();
257
259
  }, ge = (l) => {
260
+ v.value = [l], ae();
261
+ }, be = (l) => {
258
262
  if (l) {
259
- const u = new Set(c.value.map((k) => k[$.value])), g = E.value.filter((k) => !u.has(k[$.value]));
260
- c.value = [...c.value, ...g];
263
+ const c = new Set(v.value.map((C) => C[y.value])), b = $.value.filter((C) => !c.has(C[y.value]));
264
+ v.value = [...v.value, ...b];
261
265
  } else {
262
- const u = new Set(h.value.map((g) => g[$.value]));
263
- c.value = c.value.filter((g) => !u.has(g[$.value]));
266
+ const c = new Set(z.value.map((b) => b[y.value]));
267
+ v.value = v.value.filter((b) => !c.has(b[y.value]));
264
268
  }
265
- H();
266
- }, se = async (l) => {
269
+ ae();
270
+ }, re = async (l) => {
267
271
  if (!t.api) {
268
272
  if (t.dataSource)
269
273
  return;
270
- h.value = [];
274
+ _.value = [];
271
275
  return;
272
276
  }
273
277
  m.value = !0;
274
278
  try {
275
- const u = F.value.fetchSetting ?? {}, g = u.pageField ?? "page", k = u.sizeField ?? "pageSize", q = u.listField ?? "list", K = u.totalField ?? "total", le = {
276
- [g]: (l == null ? void 0 : l.page) ?? P.value.page,
277
- [k]: (l == null ? void 0 : l.pageSize) ?? P.value.pageSize,
279
+ const c = F.value.fetchSetting ?? {}, b = c.pageField ?? "page", C = c.sizeField ?? "pageSize", H = c.listField ?? "list", I = c.totalField ?? "total", oe = {
280
+ [b]: (l == null ? void 0 : l.page) ?? E.value.page,
281
+ [C]: (l == null ? void 0 : l.pageSize) ?? E.value.pageSize,
278
282
  ...t.searchInfo,
279
283
  ...l == null ? void 0 : l.searchInfo
280
284
  };
281
- (l == null ? void 0 : l.page) != null && (P.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (P.value.pageSize = l.pageSize);
282
- const re = t.beforeFetch ? t.beforeFetch(le) : le, $e = await t.api(re);
283
- O.value = $e || {};
284
- const Fe = t.afterFetch ? t.afterFetch($e) : $e, ze = Fe[q] ?? Fe.items ?? Fe.list ?? [], Ee = Fe[K] ?? 0;
285
- h.value = ze, P.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
286
- } catch (u) {
287
- n("fetch-error", u);
285
+ (l == null ? void 0 : l.page) != null && (E.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (E.value.pageSize = l.pageSize);
286
+ const ie = t.beforeFetch ? t.beforeFetch(oe) : oe, $e = await t.api(ie);
287
+ S.value = $e || {};
288
+ const Fe = t.afterFetch ? t.afterFetch($e) : $e, ze = Fe[H] ?? Fe.items ?? Fe.list ?? [], Ee = Fe[I] ?? 0;
289
+ _.value = ze, E.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
290
+ } catch (c) {
291
+ _.value = [], n("fetch-error", c);
288
292
  } finally {
289
293
  m.value = !1;
290
294
  }
291
- }, be = () => se(void 0), ye = (l) => {
292
- F.value.clearSelectOnPageChange && (c.value = []), P.value.pageSize = l, P.value.page = 1, se(void 0);
293
- }, we = (l) => {
294
- F.value.clearSelectOnPageChange && (c.value = []), P.value.page = l, se(void 0);
295
- }, Ce = (l, u, g) => n("row-click", l, g), xe = (l, u, g) => n("row-dblclick", l, g), Pe = ({ prop: l, order: u }) => n("sort-change", { prop: l, order: u }), Se = (l, u) => n("expand-change", l, u), fe = (l) => h.value.findIndex((u) => u[$.value] === l), ce = {
295
+ }, ye = () => re(void 0), we = (l) => {
296
+ F.value.clearSelectOnPageChange && (v.value = []), E.value.pageSize = l, E.value.page = 1, re(void 0);
297
+ }, xe = (l) => {
298
+ F.value.clearSelectOnPageChange && (v.value = []), E.value.page = l, re(void 0);
299
+ }, Ce = (l, c, b) => n("row-click", l, b), Pe = (l, c, b) => n("row-dblclick", l, b), Se = ({ prop: l, order: c }) => n("sort-change", { prop: l, order: c }), ve = (l, c) => n("expand-change", l, c), ce = {
296
300
  setProps: (l) => {
297
- C.value = { ...C.value, ...l };
301
+ p.value = { ...p.value, ...l };
298
302
  },
299
- reload: (l) => se(l),
303
+ reload: (l) => re(l),
300
304
  redoHeight: () => {
301
- var l, u;
302
- (u = (l = r.value) == null ? void 0 : l.doLayout) == null || u.call(l);
305
+ var l, c;
306
+ (c = (l = r.value) == null ? void 0 : l.doLayout) == null || c.call(l);
303
307
  },
304
308
  setLoading: (l) => {
305
309
  m.value = l;
306
310
  },
307
- getDataSource: () => h.value,
308
- getRawDataSource: () => O.value,
311
+ /** 返回全量数据(API 模式为服务端返回的当前页数据,本地模式为原始全量数据) */
312
+ getDataSource: () => _.value,
313
+ getRawDataSource: () => S.value,
314
+ /** 设置本地全量数据,同时同步 total */
309
315
  setTableData: (l) => {
310
- h.value = l ?? [];
316
+ _.value = l ?? [], t.pagination !== !1 && (E.value.total = (l ?? []).length);
311
317
  },
312
- getColumns: () => b.value,
318
+ getColumns: () => x.value,
313
319
  setColumns: (l) => {
314
320
  if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
315
- const u = l, g = (t.columns ?? []).filter((q) => u.includes(q.key ?? q.dataIndex)), k = u.map((q) => g.find((K) => (K.key ?? K.dataIndex) === q)).filter(Boolean);
316
- k.length && (b.value = k);
321
+ const c = l, b = (t.columns ?? []).filter((H) => c.includes(H.key ?? H.dataIndex)), C = c.map((H) => b.find((I) => (I.key ?? I.dataIndex) === H)).filter(Boolean);
322
+ C.length && (x.value = C);
317
323
  } else
318
- b.value = l ?? [];
324
+ x.value = l ?? [];
319
325
  },
320
326
  setPagination: (l) => {
321
- l != null && l.page && (P.value.page = l.page), l != null && l.pageSize && (P.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (P.value.total = l.total);
327
+ l != null && l.page && (E.value.page = l.page), l != null && l.pageSize && (E.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (E.value.total = l.total);
322
328
  },
323
- getSelectRowKeys: () => c.value.map((l) => l[$.value]),
324
- getSelectRows: () => c.value,
329
+ getSelectRowKeys: () => v.value.map((l) => l[y.value]),
330
+ getSelectRows: () => v.value,
325
331
  clearSelectedRowKeys: () => {
326
- c.value = [], H();
332
+ v.value = [], ae();
327
333
  },
328
334
  setSelectedRowKeys: (l) => {
329
- const u = new Set(l), g = h.value.filter((k) => u.has(k[$.value]));
330
- l.forEach((k) => {
331
- g.some((q) => q[$.value] === k) || g.push({ [$.value]: k });
332
- }), c.value = g, H();
335
+ const c = new Set(l), b = _.value.filter((C) => c.has(C[y.value]));
336
+ l.forEach((C) => {
337
+ b.some((H) => H[y.value] === C) || b.push({ [y.value]: C });
338
+ }), v.value = b, ae();
333
339
  },
334
340
  deleteSelectRowByKey: (l) => {
335
- c.value = c.value.filter((u) => u[$.value] !== l), H();
341
+ v.value = v.value.filter((c) => c[y.value] !== l), ae();
336
342
  },
337
- updateTableData: (l, u, g) => {
338
- l < 0 || l >= h.value.length || (h.value = [...h.value], h.value[l] = { ...h.value[l], [u]: g });
343
+ /** index 为当前页索引,自动转换为全量索引 */
344
+ updateTableData: (l, c, b) => {
345
+ const { page: C, pageSize: H } = E.value, I = (C - 1) * H + l;
346
+ I < 0 || I >= _.value.length || (_.value = [..._.value], _.value[I] = { ..._.value[I], [c]: b });
339
347
  },
340
- updateTableDataRecord: (l, u) => {
341
- const g = fe(l);
342
- if (!(g < 0))
343
- return h.value = [...h.value], h.value[g] = { ...h.value[g], ...u }, h.value[g];
348
+ updateTableDataRecord: (l, c) => {
349
+ const b = _.value.findIndex((C) => C[y.value] === l);
350
+ if (!(b < 0))
351
+ return _.value = [..._.value], _.value[b] = { ..._.value[b], ...c }, _.value[b];
344
352
  },
345
353
  deleteTableDataRecord: (l) => {
346
- const u = Array.isArray(l) ? l : [l], g = new Set(u);
347
- h.value = h.value.filter((k) => !g.has(k[$.value]));
354
+ const c = Array.isArray(l) ? l : [l], b = new Set(c);
355
+ _.value = _.value.filter((C) => !b.has(C[y.value])), t.pagination !== !1 && (E.value.total = _.value.length);
348
356
  },
349
- insertTableDataRecord: (l, u) => {
350
- const g = [...h.value];
351
- return u == null || u >= g.length ? g.push(l) : g.splice(u, 0, l), h.value = g, l;
357
+ insertTableDataRecord: (l, c) => {
358
+ const b = [..._.value];
359
+ return c == null || c >= b.length ? b.push(l) : b.splice(c, 0, l), _.value = b, t.pagination !== !1 && (E.value.total = _.value.length), l;
352
360
  },
353
- getPaginationRef: () => I.value ? { page: P.value.page, pageSize: Number(P.value.pageSize) || 10, total: P.value.total } : !1,
354
- getShowPagination: () => I.value,
361
+ getPaginationRef: () => k.value ? { page: E.value.page, pageSize: Number(E.value.pageSize) || 10, total: E.value.total } : !1,
362
+ getShowPagination: () => k.value,
355
363
  setShowPagination: (l) => {
356
- x.value = l;
364
+ B.value = l;
357
365
  },
358
366
  getRowSelection: () => F.value.rowSelection,
359
367
  expandAll: () => {
360
- var k;
361
- const l = ((k = F.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (q) => {
362
- const K = [];
363
- return q.forEach((le) => {
364
- K.push(le);
365
- const re = le[l];
366
- Array.isArray(re) && re.length > 0 && K.push(...u(re));
367
- }), K;
368
+ var C;
369
+ const l = ((C = F.value.treeProps) == null ? void 0 : C.children) ?? "children", c = (H) => {
370
+ const I = [];
371
+ return H.forEach((oe) => {
372
+ I.push(oe);
373
+ const ie = oe[l];
374
+ Array.isArray(ie) && ie.length > 0 && I.push(...c(ie));
375
+ }), I;
368
376
  };
369
- u(h.value).forEach((q) => {
370
- var K, le;
371
- return (le = (K = r.value) == null ? void 0 : K.toggleRowExpansion) == null ? void 0 : le.call(K, q, !0);
377
+ c(_.value).forEach((H) => {
378
+ var I, oe;
379
+ return (oe = (I = r.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : oe.call(I, H, !0);
372
380
  });
373
381
  },
374
382
  collapseAll: () => {
375
- var k;
376
- const l = ((k = F.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (q) => {
377
- const K = [];
378
- return q.forEach((le) => {
379
- K.push(le);
380
- const re = le[l];
381
- Array.isArray(re) && re.length > 0 && K.push(...u(re));
382
- }), K;
383
+ var C;
384
+ const l = ((C = F.value.treeProps) == null ? void 0 : C.children) ?? "children", c = (H) => {
385
+ const I = [];
386
+ return H.forEach((oe) => {
387
+ I.push(oe);
388
+ const ie = oe[l];
389
+ Array.isArray(ie) && ie.length > 0 && I.push(...c(ie));
390
+ }), I;
383
391
  };
384
- u(h.value).forEach((q) => {
385
- var K, le;
386
- return (le = (K = r.value) == null ? void 0 : K.toggleRowExpansion) == null ? void 0 : le.call(K, q, !1);
392
+ c(_.value).forEach((H) => {
393
+ var I, oe;
394
+ return (oe = (I = r.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : oe.call(I, H, !1);
387
395
  });
388
396
  }
389
397
  };
390
398
  e(ce);
391
399
  const ue = () => {
392
- const l = (u, g = "") => u.map((k, q) => {
393
- const K = `${g}-${q}`;
400
+ const l = (c, b = "") => c.map((C, H) => {
401
+ const I = `${C.dataIndex}`;
394
402
  return {
395
- ...k,
396
- id: k.id || K,
397
- children: k.children ? l(k.children, K) : void 0
403
+ ...C,
404
+ dataIndex: I,
405
+ children: C.children ? l(C.children, I) : void 0
398
406
  };
399
407
  });
400
- b.value = l(t.columns ?? []);
401
- }, f = () => {
402
- t.api && F.value.immediate !== !1 ? se(void 0) : t.dataSource && (h.value = [...t.dataSource], !t.api && t.pagination !== !1 && (P.value.total = t.dataSource.length));
403
- }, w = () => {
404
- a.value && (p.value = a.value.offsetWidth || 0);
408
+ x.value = l(t.columns ?? []);
409
+ }, d = () => {
410
+ t.api && F.value.immediate !== !1 ? re(void 0) : t.dataSource && (_.value = [...t.dataSource], !t.api && t.pagination !== !1 && (E.value.total = t.dataSource.length));
411
+ }, P = () => {
412
+ a.value && (f.value = a.value.offsetWidth || 0);
405
413
  };
406
- let M = null, T = null;
407
- return ve(() => {
408
- ue(), n("register", ce), f(), typeof window < "u" && (window.addEventListener("resize", w), M = new ResizeObserver(w), Le(() => {
409
- w(), T = a.value, T && (M == null || M.observe(T));
414
+ let R = null, T = null;
415
+ return me(() => {
416
+ ue(), n("register", ce), d(), typeof window < "u" && (window.addEventListener("resize", P), R = new ResizeObserver(P), Le(() => {
417
+ P(), T = a.value, T && (R == null || R.observe(T));
410
418
  }));
411
419
  }), Be(() => {
412
- typeof window < "u" && (window.removeEventListener("resize", w), M && T && (M.unobserve(T), T = null));
413
- }), X(() => t.columns, ue, { deep: !0 }), X(() => t.dataSource, () => {
414
- !t.api && t.dataSource && (h.value = [...t.dataSource]);
415
- }, { deep: !0 }), X(() => t.loading, (l) => {
420
+ typeof window < "u" && (window.removeEventListener("resize", P), R && T && (R.unobserve(T), T = null));
421
+ }), U(() => t.columns, ue, { deep: !0 }), U(() => t.dataSource, () => {
422
+ !t.api && t.dataSource && (_.value = [...t.dataSource], t.pagination !== !1 && (E.value.total = t.dataSource.length));
423
+ }, { deep: !0 }), U(() => t.loading, (l) => {
416
424
  m.value = l ?? !1;
417
- }), { __sfc: !0, props: t, emit: n, slots: o, tableRef: r, tableWrapRef: a, containerWidth: p, loading: m, innerData: h, rawDataSource: O, innerColumns: b, innerProps: C, selectedRows: c, showPaginationRef: x, mergeSettings: B, effectiveProps: F, defaultPagination: N, pagination: P, showTitleBar: G, showPagination: I, paginationSmall: S, paginationBackground: d, rowKeyField: $, selectedKeysSet: R, displayColumns: j, flatColumnsMap: L, allFlatColumns: Z, fixedColumnsWidth: J, isRatioWidth: Y, totalRatio: Q, fixedDataColumnsWidth: ee, parseWidthPx: U, spanMethodAdapter: te, getColumnWidth: oe, shouldShowColumn: _, selectableRows: E, hasSelectableRows: D, isAllCurrentPageSelected: i, isIndeterminate: v, isRowSelected: A, getCheckboxDisabled: V, getRadioDisabled: W, emitSelectionChange: H, handleCheckboxChange: ie, handleRadioSelect: _e, handleSelectAll: ge, fetchData: se, handleReload: be, handleSizeChange: ye, handleCurrentChange: we, handleRowClick: Ce, handleRowDblclick: xe, handleSortChange: Pe, handleExpandChange: Se, findRowIndex: fe, tableAction: ce, syncColumns: ue, loadData: f, updateContainerWidth: w, resizeObserver: M, observedEl: T, TableColumnGroup: st, BodyCellRenderer: qe };
425
+ }), { __sfc: !0, props: t, emit: n, slots: o, tableRef: r, tableWrapRef: a, containerWidth: f, loading: m, localFullData: _, innerData: z, rawDataSource: S, innerColumns: x, innerProps: p, selectedRows: v, showPaginationRef: B, mergeSettings: V, effectiveProps: F, defaultPagination: A, pagination: E, showTitleBar: N, showPagination: k, paginationSmall: u, paginationBackground: W, rowKeyField: y, selectedKeysSet: j, displayColumns: q, flatColumnsMap: X, allFlatColumns: G, fixedColumnsWidth: ee, isRatioWidth: Z, totalRatio: Y, fixedDataColumnsWidth: te, parseWidthPx: J, spanMethodAdapter: le, getColumnWidth: g, shouldShowColumn: O, selectableRows: $, hasSelectableRows: i, isAllCurrentPageSelected: h, isIndeterminate: M, isRowSelected: K, getCheckboxDisabled: L, getRadioDisabled: Q, emitSelectionChange: ae, handleCheckboxChange: _e, handleRadioSelect: ge, handleSelectAll: be, fetchData: re, handleReload: ye, handleSizeChange: we, handleCurrentChange: xe, handleRowClick: Ce, handleRowDblclick: Pe, handleSortChange: Se, handleExpandChange: ve, tableAction: ce, syncColumns: ue, loadData: d, updateContainerWidth: P, resizeObserver: R, observedEl: T, TableColumnGroup: st, BodyCellRenderer: qe };
418
426
  }
419
427
  });
420
428
  var it = function() {
421
- var o, r, a, p;
429
+ var o, r, a, f;
422
430
  var e = this, n = e._self._c, t = e._self._setupProxy;
423
- return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(m, h) {
424
- return n("div", { key: h }, [e._v(e._s(m))]);
431
+ return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(m, _) {
432
+ return n("div", { key: _ }, [e._v(e._s(m))]);
425
433
  }), 0) : n("span", [e._v(e._s(t.effectiveProps.titleHelpMessage))])]), n("i", { staticClass: "el-icon-question" })], 2) : e._e()], 1), n("div", { staticClass: "ecp-pro-table__toolbar" }, [e._t("tableTitle"), e._t("toolbar"), e._t("toolbar-right", function() {
426
434
  var m;
427
435
  return [((m = t.effectiveProps.tableSetting) == null ? void 0 : m.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
428
436
  })], 2)]) : e._e(), n("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [n("el-table", e._b({ ref: "tableRef", attrs: { data: t.innerData, "row-key": t.effectiveProps.rowKey, border: t.effectiveProps.bordered, stripe: t.effectiveProps.striped, size: t.effectiveProps.size, "max-height": t.effectiveProps.maxHeight, height: t.effectiveProps.height, "default-sort": t.effectiveProps.defaultSort, "span-method": t.spanMethodAdapter, "tree-props": t.effectiveProps.treeProps, "default-expand-all": t.effectiveProps.defaultExpandAll, "expand-row-keys": t.effectiveProps.expandRowKeys || [], lazy: t.effectiveProps.lazy, load: t.effectiveProps.load, "row-class-name": t.effectiveProps.rowClassName }, on: { "row-click": t.handleRowClick, "row-dblclick": t.handleRowDblclick, "sort-change": t.handleSortChange, "expand-change": t.handleExpandChange } }, "el-table", t.effectiveProps.tableProps, !1), [t.effectiveProps.rowSelection ? n("el-table-column", { attrs: { width: t.effectiveProps.rowSelection.width || 48, fixed: t.effectiveProps.rowSelection.fixed, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function(m) {
429
437
  return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isAllCurrentPageSelected, indeterminate: t.isIndeterminate, disabled: !t.hasSelectableRows }, on: { change: t.handleSelectAll } }) : n("span")];
430
438
  } }, { key: "default", fn: function(m) {
431
- var h;
432
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(m.row), disabled: t.getCheckboxDisabled(m.row) }, on: { change: (O) => t.handleCheckboxChange(m.row, O) }, nativeOn: { click: function(O) {
433
- O.stopPropagation();
434
- } } }) : n("el-radio", { attrs: { value: (h = t.selectedRows[0]) == null ? void 0 : h[t.rowKeyField], label: m.row[t.rowKeyField], disabled: t.getRadioDisabled(m.row) }, on: { change: function(O) {
439
+ var _;
440
+ return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(m.row), disabled: t.getCheckboxDisabled(m.row) }, on: { change: (z) => t.handleCheckboxChange(m.row, z) }, nativeOn: { click: function(z) {
441
+ z.stopPropagation();
442
+ } } }) : n("el-radio", { attrs: { value: (_ = t.selectedRows[0]) == null ? void 0 : _[t.rowKeyField], label: m.row[t.rowKeyField], disabled: t.getRadioDisabled(m.row) }, on: { change: function(z) {
435
443
  return t.handleRadioSelect(m.row);
436
- } }, nativeOn: { click: function(O) {
437
- O.stopPropagation();
444
+ } }, nativeOn: { click: function(z) {
445
+ z.stopPropagation();
438
446
  } } }, [n("span")])];
439
- } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((p = t.effectiveProps.indexColumnProps) == null ? void 0 : p.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(m) {
447
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((f = t.effectiveProps.indexColumnProps) == null ? void 0 : f.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(m) {
440
448
  return [t.shouldShowColumn(m) ? n(t.TableColumnGroup, { key: m.key || m.dataIndex || m.title, attrs: { column: m, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
441
449
  }), t.effectiveProps.actionColumn ? n("el-table-column", { attrs: { label: t.effectiveProps.actionColumn.title || "操作", width: t.effectiveProps.actionColumn.width || 150, fixed: t.effectiveProps.actionColumn.fixed || "right", align: t.effectiveProps.actionColumn.align || "center" }, scopedSlots: e._u([{ key: "default", fn: function(m) {
442
450
  return [e.$scopedSlots.action ? e._t("action", null, { record: m.row, column: t.effectiveProps.actionColumn, index: m.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: m.row, index: m.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
443
451
  } }], null, !0) }) : e._e()], 2)], 1), t.showPagination ? n("div", { staticClass: "ecp-pro-table__pagination" }, [n("el-pagination", e._b({ attrs: { "current-page": t.pagination.page, "page-sizes": t.pagination.pageSizes, "page-size": t.pagination.pageSize, total: t.pagination.total, small: t.paginationSmall, background: t.paginationBackground, layout: (t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" ? t.effectiveProps.pagination.layout : null) || "total, sizes, prev, pager, next, jumper" }, on: { "size-change": t.handleSizeChange, "current-change": t.handleCurrentChange } }, "el-pagination", t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" && t.effectiveProps.pagination.props || {}, !1))], 1) : e._e()]);
444
- }, ct = [], ut = /* @__PURE__ */ ae(
452
+ }, ct = [], ut = /* @__PURE__ */ se(
445
453
  rt,
446
454
  it,
447
455
  ct,
448
456
  !1,
449
457
  null,
450
- "ce606251",
458
+ "3d780f58",
451
459
  null,
452
460
  null
453
461
  );
454
- const He = ut.exports, Ne = (s) => Array.isArray(s) ? s.length > 0 : s != null && String(s).trim() !== "", Ie = (s) => Array.isArray(s) ? s.map((e) => String(e)).join(", ") : s == null ? "" : typeof s == "object" ? JSON.stringify(s) : String(s), De = (s, e) => {
462
+ const He = ut.exports, Ie = (s) => Array.isArray(s) ? s.length > 0 : s != null && String(s).trim() !== "", Ne = (s) => Array.isArray(s) ? s.map((e) => String(e)).join(", ") : s == null ? "" : typeof s == "object" ? JSON.stringify(s) : String(s), De = (s, e) => {
455
463
  if (!s)
456
464
  return null;
457
465
  if (s === !0)
458
466
  return {
459
- content: Ie(e),
467
+ content: Ne(e),
460
468
  placement: "top",
461
469
  effect: "dark",
462
- disabled: !Ne(e)
470
+ disabled: !Ie(e)
463
471
  };
464
472
  if (typeof s == "string")
465
473
  return {
@@ -468,7 +476,7 @@ const He = ut.exports, Ne = (s) => Array.isArray(s) ? s.length > 0 : s != null &
468
476
  effect: "dark"
469
477
  };
470
478
  const n = { ...s };
471
- return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ie(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Ne(n.content)), n;
479
+ return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ne(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Ie(n.content)), n;
472
480
  }, dt = /* @__PURE__ */ ne({
473
481
  __name: "TableAction",
474
482
  props: {
@@ -477,42 +485,42 @@ const He = ut.exports, Ne = (s) => Array.isArray(s) ? s.length > 0 : s != null &
477
485
  stopButtonPropagation: { type: Boolean, default: !1 }
478
486
  },
479
487
  setup(s) {
480
- const e = s, n = (c) => De(c) || {}, t = (c) => c.type ? c.type : c.color === "error" ? "danger" : c.color === "success" ? "success" : c.color === "warning" ? "warning" : "text", o = (c) => c.filter((x) => {
481
- const { ifShow: B } = x;
482
- return typeof B == "boolean" ? B : typeof B == "function" ? B(x) : !0;
483
- }), r = y(() => o(e.actions || [])), a = y(() => o(e.dropDownActions || [])), p = (c, x) => {
488
+ const e = s, n = (p) => De(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", o = (p) => p.filter((v) => {
489
+ const { ifShow: B } = v;
490
+ return typeof B == "boolean" ? B : typeof B == "function" ? B(v) : !0;
491
+ }), r = w(() => o(e.actions || [])), a = w(() => o(e.dropDownActions || [])), f = (p, v) => {
484
492
  var B;
485
- e.stopButtonPropagation && x.stopPropagation(), (B = c.onClick) == null || B.call(c, x);
486
- }, m = (c, x) => {
487
- p(c, x);
488
- }, h = (c, x, B) => {
489
- var F, N, P, G;
490
- e.stopButtonPropagation && B.stopPropagation(), c.popConfirm && (x === "confirm" ? (N = (F = c.popConfirm).confirm) == null || N.call(F) : (G = (P = c.popConfirm).cancel) == null || G.call(P));
493
+ e.stopButtonPropagation && v.stopPropagation(), (B = p.onClick) == null || B.call(p, v);
494
+ }, m = (p, v) => {
495
+ f(p, v);
496
+ }, _ = (p, v, B) => {
497
+ var V, F, A, E;
498
+ e.stopButtonPropagation && B.stopPropagation(), p.popConfirm && (v === "confirm" ? (F = (V = p.popConfirm).confirm) == null || F.call(V) : (E = (A = p.popConfirm).cancel) == null || E.call(A));
491
499
  };
492
- return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick: p, handleActionClick: m, handlePopConfirm: h, handlePopConfirmConfirm: (c, x) => {
493
- h(c, "confirm", x);
494
- }, handlePopConfirmCancel: (c, x) => {
495
- h(c, "cancel", x);
496
- }, handleDropdownCommand: (c) => {
497
- var F;
498
- const x = Number(c), B = a.value[x];
500
+ return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick: f, handleActionClick: m, handlePopConfirm: _, handlePopConfirmConfirm: (p, v) => {
501
+ _(p, "confirm", v);
502
+ }, handlePopConfirmCancel: (p, v) => {
503
+ _(p, "cancel", v);
504
+ }, handleDropdownCommand: (p) => {
505
+ var V;
506
+ const v = Number(p), B = a.value[v];
499
507
  if (!(!B || B.disabled)) {
500
508
  if (B.popConfirm) {
501
- const N = B.popConfirm.title, P = B.popConfirm.okText || "确定", G = B.popConfirm.cancelText || "取消";
502
- tt.confirm(N, "提示", {
503
- confirmButtonText: P,
504
- cancelButtonText: G,
509
+ const F = B.popConfirm.title, A = B.popConfirm.okText || "确定", E = B.popConfirm.cancelText || "取消";
510
+ tt.confirm(F, "提示", {
511
+ confirmButtonText: A,
512
+ cancelButtonText: E,
505
513
  type: "warning"
506
514
  }).then(() => {
507
- var I, S;
508
- return (S = (I = B.popConfirm) == null ? void 0 : I.confirm) == null ? void 0 : S.call(I);
515
+ var N, k;
516
+ return (k = (N = B.popConfirm) == null ? void 0 : N.confirm) == null ? void 0 : k.call(N);
509
517
  }).catch(() => {
510
- var I, S;
511
- return (S = (I = B.popConfirm) == null ? void 0 : I.cancel) == null ? void 0 : S.call(I);
518
+ var N, k;
519
+ return (k = (N = B.popConfirm) == null ? void 0 : N.cancel) == null ? void 0 : k.call(N);
512
520
  });
513
521
  return;
514
522
  }
515
- (F = B.onClick) == null || F.call(B, {});
523
+ (V = B.onClick) == null || V.call(B, {});
516
524
  }
517
525
  } };
518
526
  }
@@ -532,7 +540,7 @@ var ft = function() {
532
540
  }), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(o, r) {
533
541
  return n("el-dropdown-item", { key: `dropdown-${r}`, attrs: { command: r, disabled: o.disabled, divided: !!o.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])]);
534
542
  }), 1)], 1) : e._e()], 2);
535
- }, pt = [], mt = /* @__PURE__ */ ae(
543
+ }, pt = [], mt = /* @__PURE__ */ se(
536
544
  dt,
537
545
  ft,
538
546
  pt,
@@ -544,17 +552,17 @@ var ft = function() {
544
552
  );
545
553
  const Ge = mt.exports;
546
554
  function un(s) {
547
- const e = z(null), n = () => s ? me(s) : void 0, t = () => {
548
- const a = me(e);
555
+ const e = D(null), n = () => s ? pe(s) : void 0, t = () => {
556
+ const a = pe(e);
549
557
  if (!a)
550
558
  throw new Error("ProTable instance has not been registered");
551
559
  return a;
552
560
  }, o = (a) => {
553
561
  e.value = a;
554
- const p = n();
555
- p && Object.keys(p).length > 0 && a.setProps(p);
562
+ const f = n();
563
+ f && Object.keys(f).length > 0 && a.setProps(f);
556
564
  };
557
- return s && X(
565
+ return s && U(
558
566
  () => n(),
559
567
  (a) => {
560
568
  a && e.value && e.value.setProps(a);
@@ -576,21 +584,21 @@ function un(s) {
576
584
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
577
585
  setSelectedRowKeys: (a) => t().setSelectedRowKeys(a),
578
586
  deleteSelectRowByKey: (a) => t().deleteSelectRowByKey(a),
579
- updateTableData: (a, p, m) => t().updateTableData(a, p, m),
580
- updateTableDataRecord: (a, p) => t().updateTableDataRecord(a, p),
587
+ updateTableData: (a, f, m) => t().updateTableData(a, f, m),
588
+ updateTableDataRecord: (a, f) => t().updateTableDataRecord(a, f),
581
589
  deleteTableDataRecord: (a) => t().deleteTableDataRecord(a),
582
- insertTableDataRecord: (a, p) => t().insertTableDataRecord(a, p),
590
+ insertTableDataRecord: (a, f) => t().insertTableDataRecord(a, f),
583
591
  getPaginationRef: () => t().getPaginationRef(),
584
592
  getShowPagination: () => t().getShowPagination(),
585
593
  setShowPagination: (a) => t().setShowPagination(a),
586
594
  getRowSelection: () => t().getRowSelection(),
587
595
  expandAll: () => {
588
- var a, p;
589
- return (p = (a = t()).expandAll) == null ? void 0 : p.call(a);
596
+ var a, f;
597
+ return (f = (a = t()).expandAll) == null ? void 0 : f.call(a);
590
598
  },
591
599
  collapseAll: () => {
592
- var a, p;
593
- return (p = (a = t()).collapseAll) == null ? void 0 : p.call(a);
600
+ var a, f;
601
+ return (f = (a = t()).collapseAll) == null ? void 0 : f.call(a);
594
602
  }
595
603
  }];
596
604
  }
@@ -611,20 +619,20 @@ const vt = /* @__PURE__ */ ne({
611
619
  },
612
620
  emits: ["input", "change"],
613
621
  setup(s, { expose: e }) {
614
- const n = s, t = z(!1), o = z([]), r = z([]), a = (b) => b == null ? "null" : JSON.stringify(p(b)), p = (b) => Array.isArray(b) ? b.map(p) : b !== null && typeof b == "object" ? Object.keys(b).sort().reduce((C, c) => (C[c] = p(b[c]), C), {}) : b, m = z(a(n.params ?? null)), h = (b) => {
615
- n.lazy && b && (a(n.params ?? null) !== m.value || o.value.length === 0) && O();
616
- }, O = async () => {
622
+ const n = s, t = D(!1), o = D([]), r = D([]), a = (S) => S == null ? "null" : JSON.stringify(f(S)), f = (S) => Array.isArray(S) ? S.map(f) : S !== null && typeof S == "object" ? Object.keys(S).sort().reduce((x, p) => (x[p] = f(S[p]), x), {}) : S, m = D(a(n.params ?? null)), _ = (S) => {
623
+ n.lazy && S && (a(n.params ?? null) !== m.value || o.value.length === 0) && z();
624
+ }, z = async () => {
617
625
  if (n.api) {
618
626
  t.value = !0;
619
627
  try {
620
- const b = await n.api(n.params), C = Array.isArray(b) ? b : (b == null ? void 0 : b.list) ?? (b == null ? void 0 : b.data) ?? [];
621
- r.value = C;
622
- const c = n.labelField ?? "label", x = n.valueField ?? "value";
623
- o.value = C.map((B) => {
624
- const F = B;
628
+ const S = await n.api(n.params), x = Array.isArray(S) ? S : (S == null ? void 0 : S.list) ?? (S == null ? void 0 : S.data) ?? [];
629
+ r.value = x;
630
+ const p = n.labelField ?? "label", v = n.valueField ?? "value";
631
+ o.value = x.map((B) => {
632
+ const V = B;
625
633
  return {
626
- label: String(F[c] ?? F.label ?? ""),
627
- value: F[x] ?? F.value
634
+ label: String(V[p] ?? V.label ?? ""),
635
+ value: V[v] ?? V.value
628
636
  };
629
637
  }), m.value = a(n.params ?? null);
630
638
  } finally {
@@ -636,18 +644,18 @@ const vt = /* @__PURE__ */ ne({
636
644
  options: o,
637
645
  rawOptions: r,
638
646
  loading: t,
639
- fetchOptions: O
640
- }), ve(() => {
641
- n.lazy || O();
642
- }), X(
647
+ fetchOptions: z
648
+ }), me(() => {
649
+ n.lazy || z();
650
+ }), U(
643
651
  () => n.api,
644
652
  () => {
645
- n.lazy ? (o.value = [], r.value = []) : O();
653
+ n.lazy ? (o.value = [], r.value = []) : z();
646
654
  },
647
655
  { deep: !0 }
648
- ), X(() => n.params, () => {
649
- a(n.params ?? null) !== m.value && (n.lazy ? (o.value = [], r.value = []) : O());
650
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: p, lastFetchedParamsKey: m, onVisibleChange: h, fetchOptions: O };
656
+ ), U(() => n.params, () => {
657
+ a(n.params ?? null) !== m.value && (n.lazy ? (o.value = [], r.value = []) : z());
658
+ }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: f, lastFetchedParamsKey: m, onVisibleChange: _, fetchOptions: z };
651
659
  }
652
660
  });
653
661
  var ht = function() {
@@ -659,7 +667,7 @@ var ht = function() {
659
667
  }, "visible-change": t.onVisibleChange } }, "el-select", { ...e.$attrs, value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, !1), e._l(t.options, function(o) {
660
668
  return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
661
669
  }), 1);
662
- }, _t = [], gt = /* @__PURE__ */ ae(
670
+ }, _t = [], gt = /* @__PURE__ */ se(
663
671
  vt,
664
672
  ht,
665
673
  _t,
@@ -697,18 +705,18 @@ function yt(s, e, n) {
697
705
  let o = t ? s.slice(1) : s;
698
706
  const r = o.indexOf(".");
699
707
  if (r === -1) {
700
- const O = Math.max(0, e);
701
- return o = O > 0 ? o.slice(0, O) : o, t ? "-" + o : o;
708
+ const z = Math.max(0, e);
709
+ return o = z > 0 ? o.slice(0, z) : o, t ? "-" + o : o;
702
710
  }
703
711
  let a = o.slice(0, r);
704
712
  e > 0 && (a = a.slice(0, e));
705
- const p = o.slice(r + 1), m = p === "" && o.endsWith(".");
713
+ const f = o.slice(r + 1), m = f === "" && o.endsWith(".");
706
714
  if (n <= 0)
707
715
  return t ? "-" + a : a;
708
716
  if (m)
709
717
  return (t ? "-" : "") + a + ".";
710
- const h = p.slice(0, n);
711
- return (t ? "-" : "") + a + "." + h;
718
+ const _ = f.slice(0, n);
719
+ return (t ? "-" : "") + a + "." + _;
712
720
  }
713
721
  function wt(s, e) {
714
722
  const n = Math.pow(10, s) - 1;
@@ -718,7 +726,7 @@ function We(s, e, n) {
718
726
  const t = wt(e, n), o = s < 0 ? -1 : 1;
719
727
  return Math.abs(s) <= t ? s : o * t;
720
728
  }
721
- function Ct(s, e, n) {
729
+ function xt(s, e, n) {
722
730
  if (e <= 0)
723
731
  switch (n) {
724
732
  case "floor":
@@ -744,16 +752,16 @@ function Ct(s, e, n) {
744
752
  }
745
753
  function ke(s, e, n, t) {
746
754
  let o = We(s, e, n);
747
- return o = Ct(o, n, t), o = We(o, e, n), o;
755
+ return o = xt(o, n, t), o = We(o, e, n), o;
748
756
  }
749
- function xt(s, e) {
757
+ function Ct(s, e) {
750
758
  return Number.isNaN(s) || !Number.isFinite(s) ? "" : s.toFixed(Math.max(0, e));
751
759
  }
752
760
  function Ke(s, e) {
753
761
  if (Number.isNaN(s) || !Number.isFinite(s))
754
762
  return "";
755
- const n = s.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), p = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
756
- return e <= 0 || a === void 0 ? (t ? "-" : "") + p : (t ? "-" : "") + p + "." + a;
763
+ const n = s.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), f = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
764
+ return e <= 0 || a === void 0 ? (t ? "-" : "") + f : (t ? "-" : "") + f + "." + a;
757
765
  }
758
766
  function Pt(s, e) {
759
767
  if (Number.isNaN(s) || !Number.isFinite(s))
@@ -774,83 +782,83 @@ const St = /* @__PURE__ */ ne({
774
782
  },
775
783
  emits: ["input"],
776
784
  setup(s, { emit: e }) {
777
- const n = s, t = z(!1), o = z(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
778
- function p(c) {
779
- if (c == null || c === "")
785
+ const n = s, t = D(!1), o = D(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
786
+ function f(p) {
787
+ if (p == null || p === "")
780
788
  return null;
781
- if (typeof c == "number")
782
- return Number.isFinite(c) ? c : null;
783
- const x = Ae(String(c));
784
- if (x === "" || x === "-")
789
+ if (typeof p == "number")
790
+ return Number.isFinite(p) ? p : null;
791
+ const v = Ae(String(p));
792
+ if (v === "" || v === "-")
785
793
  return null;
786
- const B = Number(x);
794
+ const B = Number(v);
787
795
  return Number.isFinite(B) ? B : null;
788
796
  }
789
797
  function m() {
790
798
  if (t.value)
791
799
  return;
792
- const c = p(n.value);
793
- if (c === null) {
800
+ const p = f(n.value);
801
+ if (p === null) {
794
802
  o.value = "";
795
803
  return;
796
804
  }
797
805
  o.value = Ke(
798
- ke(c, r(), a(), n.rounding),
806
+ ke(p, r(), a(), n.rounding),
799
807
  a()
800
808
  );
801
809
  }
802
- X(
810
+ U(
803
811
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
804
812
  () => m(),
805
813
  { immediate: !0, deep: !0 }
806
814
  );
807
- function h(c) {
808
- e("input", xt(c, a()));
815
+ function _(p) {
816
+ e("input", Ct(p, a()));
809
817
  }
810
- function O(c) {
811
- let x = Ve(c);
812
- if (n.inputLimit !== !1 && (x = yt(x, r(), a())), o.value = x, x === "" || x === "-")
818
+ function z(p) {
819
+ let v = Ve(p);
820
+ if (n.inputLimit !== !1 && (v = yt(v, r(), a())), o.value = v, v === "" || v === "-")
813
821
  return;
814
- const B = Number(x);
822
+ const B = Number(v);
815
823
  if (!Number.isFinite(B))
816
824
  return;
817
- const F = ke(B, r(), a(), n.rounding);
818
- h(F);
825
+ const V = ke(B, r(), a(), n.rounding);
826
+ _(V);
819
827
  }
820
- function b() {
828
+ function S() {
821
829
  t.value = !0;
822
- const c = Ae(o.value), x = p(c === "" ? n.value : c);
823
- if (x === null) {
830
+ const p = Ae(o.value), v = f(p === "" ? n.value : p);
831
+ if (v === null) {
824
832
  o.value = "";
825
833
  return;
826
834
  }
827
835
  o.value = Pt(
828
- ke(x, r(), a(), n.rounding),
836
+ ke(v, r(), a(), n.rounding),
829
837
  a()
830
838
  );
831
839
  }
832
- function C() {
840
+ function x() {
833
841
  t.value = !1;
834
- const c = Ae(o.value);
835
- if (c === "" || c === "-") {
842
+ const p = Ae(o.value);
843
+ if (p === "" || p === "-") {
836
844
  o.value = "", e("input", void 0);
837
845
  return;
838
846
  }
839
- const x = Number(Ve(c));
840
- if (!Number.isFinite(x)) {
847
+ const v = Number(Ve(p));
848
+ if (!Number.isFinite(v)) {
841
849
  o.value = "", e("input", void 0);
842
850
  return;
843
851
  }
844
- const B = ke(x, r(), a(), n.rounding);
845
- o.value = Ke(B, a()), h(B);
852
+ const B = ke(v, r(), a(), n.rounding);
853
+ o.value = Ke(B, a()), _(B);
846
854
  }
847
- return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber: p, syncDisplayFromValue: m, emitStoredValue: h, onInput: O, onFocus: b, onBlur: C };
855
+ return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber: f, syncDisplayFromValue: m, emitStoredValue: _, onInput: z, onFocus: S, onBlur: x };
848
856
  }
849
857
  });
850
858
  var Ft = function() {
851
859
  var e = this, n = e._self._c, t = e._self._setupProxy;
852
860
  return n("el-input", e._b({ attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled }, on: { input: t.onInput, focus: t.onFocus, blur: t.onBlur } }, "el-input", e.$attrs, !1));
853
- }, kt = [], Bt = /* @__PURE__ */ ae(
861
+ }, kt = [], Bt = /* @__PURE__ */ se(
854
862
  St,
855
863
  Ft,
856
864
  kt,
@@ -878,86 +886,86 @@ const Me = Bt.exports, Rt = /* @__PURE__ */ ne({
878
886
  },
879
887
  emits: ["input"],
880
888
  setup(s, { emit: e }) {
881
- const n = s, t = z(), o = z(), r = z(!1), a = z(!1), p = z(""), m = z([]), h = z({}), O = y(() => ({
889
+ const n = s, t = D(), o = D(), r = D(!1), a = D(!1), f = D(""), m = D([]), _ = D({}), z = w(() => ({
882
890
  label: n.labelField,
883
891
  children: n.childrenField
884
892
  }));
885
- function b(R) {
886
- const j = n.labelField ?? "label", L = n.valueField ?? "value", Z = n.childrenField ?? "children", J = R[Z], Y = {};
887
- return Y[n.labelField ?? "label"] = R[j] ?? R.label, Y[n.valueField ?? "value"] = R[L] ?? R.value, Array.isArray(J) && J.length && (Y[n.childrenField ?? "children"] = J.map((Q) => b(Q))), Y;
893
+ function S(y) {
894
+ const j = n.labelField ?? "label", q = n.valueField ?? "value", X = n.childrenField ?? "children", G = y[X], ee = {};
895
+ return ee[n.labelField ?? "label"] = y[j] ?? y.label, ee[n.valueField ?? "value"] = y[q] ?? y.value, Array.isArray(G) && G.length && (ee[n.childrenField ?? "children"] = G.map((Z) => S(Z))), ee;
888
896
  }
889
- function C(R, j = "") {
890
- const L = {}, Z = n.labelField ?? "label", J = n.valueField ?? "value", Y = n.childrenField ?? "children";
891
- for (const Q of R) {
892
- const ee = String(Q[Z] ?? Q.label ?? ""), U = Q[J] ?? Q.value;
893
- U != null && (L[String(U)] = j ? j + " / " + ee : ee);
894
- const te = Q[Y] ?? Q.children;
895
- Array.isArray(te) && te.length && Object.assign(L, C(te, ee));
897
+ function x(y, j = "") {
898
+ const q = {}, X = n.labelField ?? "label", G = n.valueField ?? "value", ee = n.childrenField ?? "children";
899
+ for (const Z of y) {
900
+ const Y = String(Z[X] ?? Z.label ?? ""), te = Z[G] ?? Z.value;
901
+ te != null && (q[String(te)] = j ? j + " / " + Y : Y);
902
+ const J = Z[ee] ?? Z.children;
903
+ Array.isArray(J) && J.length && Object.assign(q, x(J, Y));
896
904
  }
897
- return L;
905
+ return q;
898
906
  }
899
- function c() {
900
- const R = n.treeData;
901
- return Array.isArray(R) && R.length > 0;
907
+ function p() {
908
+ const y = n.treeData;
909
+ return Array.isArray(y) && y.length > 0;
902
910
  }
903
- function x(R) {
904
- m.value = R, h.value = C(R);
911
+ function v(y) {
912
+ m.value = y, _.value = x(y);
905
913
  }
906
914
  function B() {
907
- const R = n.treeData;
908
- if (!Array.isArray(R) || R.length === 0)
915
+ const y = n.treeData;
916
+ if (!Array.isArray(y) || y.length === 0)
909
917
  return;
910
- const j = R.map((L) => b(L));
911
- x(j);
918
+ const j = y.map((q) => S(q));
919
+ v(j);
912
920
  }
913
- const F = y(() => n.value == null || n.value === "" ? "" : h.value[String(n.value)] ?? String(n.value)), N = (R, j) => {
914
- if (!R)
921
+ const V = w(() => n.value == null || n.value === "" ? "" : _.value[String(n.value)] ?? String(n.value)), F = (y, j) => {
922
+ if (!y)
915
923
  return !0;
916
- const L = n.labelField ?? "label";
917
- return String(j[L] ?? j.label ?? "").toLowerCase().includes(R.toLowerCase());
924
+ const q = n.labelField ?? "label";
925
+ return String(j[q] ?? j.label ?? "").toLowerCase().includes(y.toLowerCase());
918
926
  };
919
- X(p, (R) => {
927
+ U(f, (y) => {
920
928
  var j;
921
- (j = o.value) == null || j.filter(R);
929
+ (j = o.value) == null || j.filter(y);
922
930
  });
923
- let P = null;
924
- function G() {
925
- n.disabled || (r.value = !0, n.lazy && !c() && $(), Le(() => {
926
- P = (R) => {
927
- t.value && !t.value.contains(R.target) && I();
928
- }, document.addEventListener("click", P);
931
+ let A = null;
932
+ function E() {
933
+ n.disabled || (r.value = !0, n.lazy && !p() && W(), Le(() => {
934
+ A = (y) => {
935
+ t.value && !t.value.contains(y.target) && N();
936
+ }, document.addEventListener("click", A);
929
937
  }));
930
938
  }
931
- function I() {
932
- r.value = !1, p.value = "", P && (document.removeEventListener("click", P), P = null);
939
+ function N() {
940
+ r.value = !1, f.value = "", A && (document.removeEventListener("click", A), A = null);
933
941
  }
934
- function S() {
942
+ function k() {
935
943
  e("input", void 0);
936
944
  }
937
- function d(R) {
938
- const j = n.valueField ?? "value", L = R[j] ?? R.value;
939
- e("input", L), I();
945
+ function u(y) {
946
+ const j = n.valueField ?? "value", q = y[j] ?? y.value;
947
+ e("input", q), N();
940
948
  }
941
- async function $() {
942
- if (!(!n.api || c())) {
949
+ async function W() {
950
+ if (!(!n.api || p())) {
943
951
  a.value = !0;
944
952
  try {
945
- const R = await n.api(n.params), j = Array.isArray(R) ? R : (R == null ? void 0 : R.list) ?? (R == null ? void 0 : R.data) ?? [];
946
- m.value = j.map((L) => b(L)), h.value = C(m.value);
953
+ const y = await n.api(n.params), j = Array.isArray(y) ? y : (y == null ? void 0 : y.list) ?? (y == null ? void 0 : y.data) ?? [];
954
+ m.value = j.map((q) => S(q)), _.value = x(m.value);
947
955
  } finally {
948
956
  a.value = !1;
949
957
  }
950
958
  }
951
959
  }
952
- return ve(() => {
953
- c() ? B() : n.lazy || $();
954
- }), X(() => n.treeData, () => {
955
- c() ? B() : (m.value = [], h.value = {}, !n.lazy && n.api && $());
956
- }, { deep: !0 }), X(() => n.api, () => {
957
- c() || (n.lazy ? (m.value = [], h.value = {}) : $());
958
- }, { deep: !0 }), X(() => n.params, () => {
959
- c() || (n.lazy ? (m.value = [], h.value = {}) : $());
960
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: p, treeData: m, flatLabelMap: h, treeProps: O, normalizeNode: b, buildFlatLabelMap: C, hasTreeDataProp: c, applyTreeData: x, syncFromTreeDataProp: B, displayText: F, filterNodeMethod: N, clickOutsideHandler: P, openDropdown: G, closeDropdown: I, clearValue: S, onNodeClick: d, fetchData: $ };
960
+ return me(() => {
961
+ p() ? B() : n.lazy || W();
962
+ }), U(() => n.treeData, () => {
963
+ p() ? B() : (m.value = [], _.value = {}, !n.lazy && n.api && W());
964
+ }, { deep: !0 }), U(() => n.api, () => {
965
+ p() || (n.lazy ? (m.value = [], _.value = {}) : W());
966
+ }, { deep: !0 }), U(() => n.params, () => {
967
+ p() || (n.lazy ? (m.value = [], _.value = {}) : W());
968
+ }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: f, treeData: m, flatLabelMap: _, treeProps: z, normalizeNode: S, buildFlatLabelMap: x, hasTreeDataProp: p, applyTreeData: v, syncFromTreeDataProp: B, displayText: V, filterNodeMethod: F, clickOutsideHandler: A, openDropdown: E, closeDropdown: N, clearValue: k, onNodeClick: u, fetchData: W };
961
969
  }
962
970
  });
963
971
  var Mt = function() {
@@ -967,7 +975,7 @@ var Mt = function() {
967
975
  } }, model: { value: t.filterText, callback: function(o) {
968
976
  t.filterText = o;
969
977
  }, expression: "filterText" } })], 1) : e._e(), n("el-tree", { directives: [{ name: "show", rawName: "v-show", value: !t.loading, expression: "!loading" }], ref: "treeRef", attrs: { data: t.treeData, props: t.treeProps, "node-key": e.valueField, "filter-node-method": e.filterable ? t.filterNodeMethod : void 0, "highlight-current": !0, "default-expand-all": "" }, on: { "node-click": t.onNodeClick } }), t.loading ? n("div", { staticClass: "ecp-tree-select__loading" }, [n("i", { staticClass: "el-icon-loading" }), e._v(" 加载中... ")]) : e._e()], 1)])], 1);
970
- }, $t = [], At = /* @__PURE__ */ ae(
978
+ }, $t = [], At = /* @__PURE__ */ se(
971
979
  Rt,
972
980
  Mt,
973
981
  $t,
@@ -1004,73 +1012,73 @@ const Tt = At.exports, Dt = /* @__PURE__ */ ne({
1004
1012
  "cascader",
1005
1013
  "checkbox",
1006
1014
  "radio"
1007
- ]), t = z(null);
1008
- ve(() => {
1009
- var d;
1010
- e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, t.value));
1015
+ ]), t = D(null);
1016
+ me(() => {
1017
+ var u;
1018
+ e.schema.component === "api-select" && ((u = e.registerFieldInstance) == null || u.call(e, e.schema.field, t.value));
1011
1019
  }), Be(() => {
1012
- var d;
1013
- e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, null));
1020
+ var u;
1021
+ e.schema.component === "api-select" && ((u = e.registerFieldInstance) == null || u.call(e, e.schema.field, null));
1014
1022
  });
1015
- const o = he(), r = y(() => ({
1023
+ const o = he(), r = w(() => ({
1016
1024
  schema: e.schema,
1017
1025
  values: e.formModel,
1018
1026
  model: e.formModel,
1019
1027
  field: e.schema.field
1020
- })), a = y(() => {
1021
- const d = e.schema.ifShow;
1022
- return d === void 0 ? !0 : typeof d == "boolean" ? d : d(r.value);
1023
- }), p = y(() => {
1024
- const d = e.schema.show;
1025
- return d === void 0 ? !0 : typeof d == "boolean" ? d : d(r.value);
1026
- }), m = y(() => {
1028
+ })), a = w(() => {
1029
+ const u = e.schema.ifShow;
1030
+ return u === void 0 ? !0 : typeof u == "boolean" ? u : u(r.value);
1031
+ }), f = w(() => {
1032
+ const u = e.schema.show;
1033
+ return u === void 0 ? !0 : typeof u == "boolean" ? u : u(r.value);
1034
+ }), m = w(() => {
1027
1035
  if (e.formDisabled)
1028
1036
  return !0;
1029
- const d = e.schema.dynamicDisabled;
1030
- return d === void 0 ? !1 : typeof d == "boolean" ? d : d(r.value);
1031
- }), h = y(() => {
1032
- const d = e.schema.dynamicRules;
1033
- return d ? Array.isArray(d) ? d : d(r.value) : e.schema.rules;
1034
- }), O = y(() => {
1035
- const d = e.schema.componentProps;
1036
- if (!d)
1037
+ const u = e.schema.dynamicDisabled;
1038
+ return u === void 0 ? !1 : typeof u == "boolean" ? u : u(r.value);
1039
+ }), _ = w(() => {
1040
+ const u = e.schema.dynamicRules;
1041
+ return u ? Array.isArray(u) ? u : u(r.value) : e.schema.rules;
1042
+ }), z = w(() => {
1043
+ const u = e.schema.componentProps;
1044
+ if (!u)
1037
1045
  return { props: {}, listeners: {} };
1038
- const $ = typeof d == "function" ? d({
1046
+ const W = typeof u == "function" ? u({
1039
1047
  ...r.value,
1040
1048
  formActionType: e.formActionType
1041
- }) : { ...d }, R = {}, j = {};
1042
- for (const [L, Z] of Object.entries($))
1043
- if (L.length > 2 && /^on[A-Za-z]/.test(L) && typeof Z == "function") {
1044
- const J = L.slice(2).charAt(0).toLowerCase() + L.slice(3);
1045
- j[J] = Z;
1049
+ }) : { ...u }, y = {}, j = {};
1050
+ for (const [q, X] of Object.entries(W))
1051
+ if (q.length > 2 && /^on[A-Za-z]/.test(q) && typeof X == "function") {
1052
+ const G = q.slice(2).charAt(0).toLowerCase() + q.slice(3);
1053
+ j[G] = X;
1046
1054
  } else
1047
- R[L] = Z;
1048
- return { props: R, listeners: j };
1049
- }), b = y(() => O.value.props), C = y(() => O.value.listeners), c = y(() => e.schema.colon ?? e.colon ?? !1), x = y(() => {
1050
- const d = e.schema.tooltip;
1051
- if (!d)
1055
+ y[q] = X;
1056
+ return { props: y, listeners: j };
1057
+ }), S = w(() => z.value.props), x = w(() => z.value.listeners), p = w(() => e.schema.colon ?? e.colon ?? !1), v = w(() => {
1058
+ const u = e.schema.tooltip;
1059
+ if (!u)
1052
1060
  return null;
1053
- const $ = typeof d == "function" ? d(r.value) : d;
1054
- return De($, e.formModel[e.schema.field]);
1055
- }), B = y(() => x.value ? "el-tooltip" : "span"), F = y(() => x.value || {}), N = y(() => !!o.default), P = (d) => {
1056
- const $ = d == null ? void 0 : d.options;
1057
- return Array.isArray($) ? $ : void 0;
1058
- }, G = y(() => {
1059
- const d = e.schema.component;
1060
- return d == null ? null : typeof d == "string" ? n.has(d) ? null : e.customComponents && e.customComponents[d] || d : d;
1061
- }), I = (d) => {
1062
- var $;
1063
- ($ = e.onFieldChange) == null || $.call(e, e.schema.field, d);
1064
- }, S = y(() => {
1065
- const d = e.schema.render;
1066
- return d ? {
1061
+ const W = typeof u == "function" ? u(r.value) : u;
1062
+ return De(W, e.formModel[e.schema.field]);
1063
+ }), B = w(() => v.value ? "el-tooltip" : "span"), V = w(() => v.value || {}), F = w(() => !!o.default), A = (u) => {
1064
+ const W = u == null ? void 0 : u.options;
1065
+ return Array.isArray(W) ? W : void 0;
1066
+ }, E = w(() => {
1067
+ const u = e.schema.component;
1068
+ return u == null ? null : typeof u == "string" ? n.has(u) ? null : e.customComponents && e.customComponents[u] || u : u;
1069
+ }), N = (u) => {
1070
+ var W;
1071
+ (W = e.onFieldChange) == null || W.call(e, e.schema.field, u);
1072
+ }, k = w(() => {
1073
+ const u = e.schema.render;
1074
+ return u ? {
1067
1075
  render() {
1068
- const $ = d(r.value);
1069
- return Array.isArray($) ? de("span", $) : $;
1076
+ const W = u(r.value);
1077
+ return Array.isArray(W) ? de("span", W) : W;
1070
1078
  }
1071
1079
  } : null;
1072
1080
  });
1073
- return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow: p, effectiveDisabled: m, effectiveRules: h, effectiveComponentPropsAndListeners: O, effectiveComponentProps: b, effectiveComponentListeners: C, showColon: c, normalizedTooltip: x, fieldWrapperComponent: B, fieldWrapperProps: F, hasSlot: N, getOptions: P, resolvedCustomComponent: G, setFieldValue: I, renderComponent: S, ApiSelect: bt, FormattedNumberInput: Me, TreeSelect: Tt };
1081
+ return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow: f, effectiveDisabled: m, effectiveRules: _, effectiveComponentPropsAndListeners: z, effectiveComponentProps: S, effectiveComponentListeners: x, showColon: p, normalizedTooltip: v, fieldWrapperComponent: B, fieldWrapperProps: V, hasSlot: F, getOptions: A, resolvedCustomComponent: E, setFieldValue: N, renderComponent: k, ApiSelect: bt, FormattedNumberInput: Me, TreeSelect: Tt };
1074
1082
  }
1075
1083
  });
1076
1084
  var zt = function() {
@@ -1102,7 +1110,7 @@ var zt = function() {
1102
1110
  }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1103
1111
  return n("el-radio", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
1104
1112
  }), 1) : e._e()], 1)]], 2) : e._e();
1105
- }, Et = [], Ot = /* @__PURE__ */ ae(
1113
+ }, Et = [], Ot = /* @__PURE__ */ se(
1106
1114
  Dt,
1107
1115
  zt,
1108
1116
  Et,
@@ -1112,7 +1120,7 @@ var zt = function() {
1112
1120
  null,
1113
1121
  null
1114
1122
  );
1115
- const Je = Ot.exports, Nt = /* @__PURE__ */ ne({
1123
+ const Je = Ot.exports, It = /* @__PURE__ */ ne({
1116
1124
  __name: "FormActions",
1117
1125
  props: {
1118
1126
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -1133,16 +1141,16 @@ const Je = Ot.exports, Nt = /* @__PURE__ */ ne({
1133
1141
  return { __sfc: !0 };
1134
1142
  }
1135
1143
  });
1136
- var It = function() {
1144
+ var Nt = function() {
1137
1145
  var e = this, n = e._self._c;
1138
1146
  return e._self._setupProxy, n("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? n("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
1139
1147
  return e.$emit("submit");
1140
1148
  } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? n("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
1141
1149
  return e.$emit("reset");
1142
1150
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
1143
- }, Vt = [], Wt = /* @__PURE__ */ ae(
1144
- Nt,
1151
+ }, Vt = [], Wt = /* @__PURE__ */ se(
1145
1152
  It,
1153
+ Nt,
1146
1154
  Vt,
1147
1155
  !1,
1148
1156
  null,
@@ -1184,177 +1192,177 @@ const Ue = Wt.exports, Kt = /* @__PURE__ */ ne({
1184
1192
  },
1185
1193
  emits: ["submit", "reset", "register", "update:modelValue"],
1186
1194
  setup(s, { expose: e, emit: n }) {
1187
- const t = s, o = he(), r = z(), a = z(), p = z(!1), m = z(!0), h = z({}), O = z({}), b = z([]), C = z({}), c = z(/* @__PURE__ */ new Map()), x = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (f, w, M) => {
1188
- const T = M ?? (typeof window < "u" ? window.innerWidth : 1920), l = f ?? {}, u = w ?? {}, g = u.span ?? 8;
1189
- return T >= x.xl ? l.xl ?? u.xl ?? l.lg ?? u.lg ?? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.lg ? l.lg ?? u.lg ?? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.md ? l.md ?? u.md ?? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : T >= x.sm ? l.sm ?? u.sm ?? l.xs ?? u.xs ?? l.span ?? g : l.xs ?? u.xs ?? l.span ?? g;
1190
- }, { getSetting: F } = Re(), N = y(() => ({ ...F("ProForm"), ...t, ...C.value })), P = y(() => N.value.modelValue), G = y(() => P.value !== void 0), I = y(() => G.value ? P.value ?? {} : h.value), S = y(() => ({
1191
- ...F("ProForm").components ?? {},
1192
- ...N.value.components ?? {},
1193
- ...C.value.components ?? {}
1194
- })), d = y(() => N.value.actionColOptions ?? { span: 24 }), $ = z(typeof window < "u" ? window.innerWidth : 1920), R = (f, w, M, T) => {
1195
- let l = 24, u = 1, g = 0;
1196
- for (const k of f) {
1197
- const q = B(k.colProps, w, T);
1198
- if (q > l) {
1199
- if (u++, u > M)
1195
+ const t = s, o = he(), r = D(), a = D(), f = D(!1), m = D(!0), _ = D({}), z = D({}), S = D([]), x = D({}), p = D(/* @__PURE__ */ new Map()), v = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (d, P, R) => {
1196
+ const T = R ?? (typeof window < "u" ? window.innerWidth : 1920), l = d ?? {}, c = P ?? {}, b = c.span ?? 8;
1197
+ return T >= v.xl ? l.xl ?? c.xl ?? l.lg ?? c.lg ?? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.lg ? l.lg ?? c.lg ?? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.md ? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.sm ? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : l.xs ?? c.xs ?? l.span ?? b;
1198
+ }, { getSetting: V } = Re(), F = w(() => ({ ...V("ProForm"), ...t, ...x.value })), A = w(() => F.value.modelValue), E = w(() => A.value !== void 0), N = w(() => E.value ? A.value ?? {} : _.value), k = w(() => ({
1199
+ ...V("ProForm").components ?? {},
1200
+ ...F.value.components ?? {},
1201
+ ...x.value.components ?? {}
1202
+ })), u = w(() => F.value.actionColOptions ?? { span: 24 }), W = D(typeof window < "u" ? window.innerWidth : 1920), y = (d, P, R, T) => {
1203
+ let l = 24, c = 1, b = 0;
1204
+ for (const C of d) {
1205
+ const H = B(C.colProps, P, T);
1206
+ if (H > l) {
1207
+ if (c++, c > R)
1200
1208
  break;
1201
- l = 24 - q;
1209
+ l = 24 - H;
1202
1210
  } else
1203
- l -= q;
1204
- g++;
1211
+ l -= H;
1212
+ b++;
1205
1213
  }
1206
- return g;
1207
- }, j = y(() => {
1208
- const f = b.value.filter((l) => J(l));
1209
- if (!N.value.showAdvancedButton)
1214
+ return b;
1215
+ }, j = w(() => {
1216
+ const d = S.value.filter((l) => G(l));
1217
+ if (!F.value.showAdvancedButton)
1210
1218
  return !1;
1211
- const w = N.value.alwaysShowLines ?? 1, M = N.value.baseColProps, T = R(f, M, w, $.value);
1212
- return f.length > T;
1213
- }), L = y(() => N.value.formListeners ?? {}), Z = y(() => {
1214
- const f = b.value.filter((l) => J(l));
1215
- if (!N.value.showAdvancedButton || !m.value)
1216
- return f;
1217
- const w = N.value.alwaysShowLines ?? 1, M = N.value.baseColProps, T = R(f, M, w, $.value);
1218
- return f.slice(0, T);
1219
- }), J = (f) => {
1220
- let w = !0, M = !0;
1221
- return typeof f.ifShow == "function" && (w = f.ifShow({ schema: f, values: I.value, model: I.value, field: f.field })), typeof f.ifShow == "boolean" && (w = f.ifShow), typeof f.show == "function" && (M = f.show({ schema: f, values: I.value, model: I.value, field: f.field })), typeof f.show == "boolean" && (M = f.show), w && M;
1222
- }, Y = (f) => f.colProps ?? N.value.baseColProps ?? {}, Q = (f) => f.slot || f.field, ee = (f, w = !0) => {
1223
- const M = w ? { ...f ?? {} } : {}, T = N.value.initialValues ?? t.initialValues;
1224
- return b.value.forEach((l) => {
1225
- if (!(w && Object.prototype.hasOwnProperty.call(M, l.field))) {
1219
+ const P = F.value.alwaysShowLines ?? 1, R = F.value.baseColProps, T = y(d, R, P, W.value);
1220
+ return d.length > T;
1221
+ }), q = w(() => F.value.formListeners ?? {}), X = w(() => {
1222
+ const d = S.value.filter((l) => G(l));
1223
+ if (!F.value.showAdvancedButton || !m.value)
1224
+ return d;
1225
+ const P = F.value.alwaysShowLines ?? 1, R = F.value.baseColProps, T = y(d, R, P, W.value);
1226
+ return d.slice(0, T);
1227
+ }), G = (d) => {
1228
+ let P = !0, R = !0;
1229
+ return typeof d.ifShow == "function" && (P = d.ifShow({ schema: d, values: N.value, model: N.value, field: d.field })), typeof d.ifShow == "boolean" && (P = d.ifShow), typeof d.show == "function" && (R = d.show({ schema: d, values: N.value, model: N.value, field: d.field })), typeof d.show == "boolean" && (R = d.show), P && R;
1230
+ }, ee = (d) => d.colProps ?? F.value.baseColProps ?? {}, Z = (d) => d.slot || d.field, Y = (d, P = !0) => {
1231
+ const R = P ? { ...d ?? {} } : {}, T = F.value.initialValues ?? t.initialValues;
1232
+ return S.value.forEach((l) => {
1233
+ if (!(P && Object.prototype.hasOwnProperty.call(R, l.field))) {
1226
1234
  if (l.defaultValue !== void 0) {
1227
- M[l.field] = l.defaultValue;
1235
+ R[l.field] = l.defaultValue;
1228
1236
  return;
1229
1237
  }
1230
- T && Object.prototype.hasOwnProperty.call(T, l.field) && (M[l.field] = T[l.field]);
1238
+ T && Object.prototype.hasOwnProperty.call(T, l.field) && (R[l.field] = T[l.field]);
1231
1239
  }
1232
- }), M;
1233
- }, U = (f, w = !0) => {
1234
- h.value = f, w && n("update:modelValue", f);
1235
- }, te = (f) => {
1236
- const w = ee({ ...I.value, ...f });
1237
- return U(w), w;
1238
- }, oe = () => {
1239
- const f = {};
1240
- b.value.forEach((w) => {
1241
- var M;
1242
- (M = w.rules) != null && M.length && (f[w.field] = w.rules);
1243
- }), U(ee(I.value), !1), O.value = f;
1244
- }, _ = (f) => {
1245
- const w = { ...f };
1246
- return b.value.forEach((M) => {
1247
- const T = M.ifShow;
1240
+ }), R;
1241
+ }, te = (d, P = !0) => {
1242
+ _.value = d, P && n("update:modelValue", d);
1243
+ }, J = (d) => {
1244
+ const P = Y({ ...N.value, ...d });
1245
+ return te(P), P;
1246
+ }, le = () => {
1247
+ const d = {};
1248
+ S.value.forEach((P) => {
1249
+ var R;
1250
+ (R = P.rules) != null && R.length && (d[P.field] = P.rules);
1251
+ }), te(Y(N.value), !1), z.value = d;
1252
+ }, g = (d) => {
1253
+ const P = { ...d };
1254
+ return S.value.forEach((R) => {
1255
+ const T = R.ifShow;
1248
1256
  if (T === void 0)
1249
1257
  return;
1250
- (typeof T == "boolean" ? T : T({ schema: M, values: f, model: f, field: M.field })) || delete w[M.field];
1251
- }), w;
1252
- }, E = (f) => {
1253
- const w = _(f), M = C.value.fieldMapToTime;
1254
- if (!(M != null && M.length))
1255
- return w;
1256
- const T = { ...w };
1257
- return M.forEach(([l, [u, g]]) => {
1258
- const k = T[l];
1259
- Array.isArray(k) && k.length === 2 && (delete T[l], T[u] = k[0], T[g] = k[1]);
1258
+ (typeof T == "boolean" ? T : T({ schema: R, values: d, model: d, field: R.field })) || delete P[R.field];
1259
+ }), P;
1260
+ }, O = (d) => {
1261
+ const P = g(d), R = x.value.fieldMapToTime;
1262
+ if (!(R != null && R.length))
1263
+ return P;
1264
+ const T = { ...P };
1265
+ return R.forEach(([l, [c, b]]) => {
1266
+ const C = T[l];
1267
+ Array.isArray(C) && C.length === 2 && (delete T[l], T[c] = C[0], T[b] = C[1]);
1260
1268
  }), T;
1261
- }, D = async () => {
1262
- var f;
1269
+ }, $ = async () => {
1270
+ var d;
1263
1271
  try {
1264
- await ((f = r.value) == null ? void 0 : f.validate()), N.value.submitFunc ? await N.value.submitFunc() : (p.value = !0, n("submit", E({ ...I.value })));
1265
- } catch (w) {
1266
- console.error("Form validation failed:", w);
1272
+ await ((d = r.value) == null ? void 0 : d.validate()), F.value.submitFunc ? await F.value.submitFunc() : (f.value = !0, n("submit", O({ ...N.value })));
1273
+ } catch (P) {
1274
+ console.error("Form validation failed:", P);
1267
1275
  } finally {
1268
- p.value = !1;
1276
+ f.value = !1;
1269
1277
  }
1270
1278
  }, i = async () => {
1271
- var f;
1272
- N.value.resetFunc ? await N.value.resetFunc() : ((f = r.value) == null || f.resetFields(), oe(), n("reset"), N.value.submitOnReset && await D());
1273
- }, v = (f) => (te(f), Promise.resolve()), A = () => E({ ...I.value }), V = async () => {
1274
- var f;
1275
- (f = r.value) == null || f.resetFields(), U(ee(void 0, !1));
1276
- }, W = (f, w) => {
1277
- te({ [f]: w });
1278
- }, H = (f) => {
1279
- var w;
1280
- return ((w = r.value) == null ? void 0 : w.validate(f)) ?? Promise.resolve();
1281
- }, ie = (f) => r.value ? f != null && f.length ? Promise.all(f.map((w) => new Promise((M, T) => {
1282
- r.value.validateField(w, (l) => l ? M(void 0) : T(new Error("Validation failed")));
1283
- }))) : r.value.validate() : Promise.resolve(), _e = async (f, w) => {
1279
+ var d;
1280
+ F.value.resetFunc ? await F.value.resetFunc() : ((d = r.value) == null || d.resetFields(), le(), n("reset"), F.value.submitOnReset && await $());
1281
+ }, h = (d) => (J(d), Promise.resolve()), M = () => O({ ...N.value }), K = async () => {
1282
+ var d;
1283
+ (d = r.value) == null || d.resetFields(), te(Y(void 0, !1));
1284
+ }, L = (d, P) => {
1285
+ J({ [d]: P });
1286
+ }, Q = (d) => {
1287
+ var P;
1288
+ return ((P = r.value) == null ? void 0 : P.validate(d)) ?? Promise.resolve();
1289
+ }, ae = (d) => r.value ? d != null && d.length ? Promise.all(d.map((P) => new Promise((R, T) => {
1290
+ r.value.validateField(P, (l) => l ? R(void 0) : T(new Error("Validation failed")));
1291
+ }))) : r.value.validate() : Promise.resolve(), _e = async (d, P) => {
1284
1292
  var T;
1285
- const M = (T = a.value) == null ? void 0 : T.querySelector(`[data-field="${f}"]`);
1286
- return M && M.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
1287
- }, ge = (f) => {
1288
- var w;
1289
- (w = r.value) == null || w.clearValidate(f);
1290
- }, se = async (f) => {
1291
- (Array.isArray(f) ? f : [f]).forEach((M) => {
1292
- const T = b.value.findIndex((l) => l.field === M.field);
1293
- T >= 0 && (b.value[T] = { ...b.value[T], ...M });
1293
+ const R = (T = a.value) == null ? void 0 : T.querySelector(`[data-field="${d}"]`);
1294
+ return R && R.scrollIntoView({ behavior: (P == null ? void 0 : P.behavior) ?? "smooth", block: (P == null ? void 0 : P.block) ?? "nearest" }), Promise.resolve();
1295
+ }, ge = (d) => {
1296
+ var P;
1297
+ (P = r.value) == null || P.clearValidate(d);
1298
+ }, be = async (d) => {
1299
+ (Array.isArray(d) ? d : [d]).forEach((R) => {
1300
+ const T = S.value.findIndex((l) => l.field === R.field);
1301
+ T >= 0 && (S.value[T] = { ...S.value[T], ...R });
1294
1302
  });
1295
- }, be = async (f, w, M) => {
1296
- if (M)
1297
- b.value.unshift(f);
1298
- else if (w) {
1299
- const T = b.value.findIndex((l) => l.field === w);
1300
- b.value.splice(T + 1, 0, f);
1303
+ }, re = async (d, P, R) => {
1304
+ if (R)
1305
+ S.value.unshift(d);
1306
+ else if (P) {
1307
+ const T = S.value.findIndex((l) => l.field === P);
1308
+ S.value.splice(T + 1, 0, d);
1301
1309
  } else
1302
- b.value.push(f);
1303
- oe();
1304
- }, ye = async (f) => {
1305
- const w = Array.isArray(f) ? f : [f];
1306
- b.value = b.value.filter((M) => !w.includes(M.field));
1307
- }, we = async (f) => {
1308
- C.value = { ...C.value, ...f }, f.schemas && (b.value = [...f.schemas], oe());
1309
- }, Ce = (f, w) => {
1310
- w ? c.value.set(f, w) : c.value.delete(f);
1311
- }, xe = (f) => c.value.get(f) ?? null;
1312
- function Pe(f, w = !1) {
1313
- const M = c.value.get(f);
1314
- if (!M)
1310
+ S.value.push(d);
1311
+ le();
1312
+ }, ye = async (d) => {
1313
+ const P = Array.isArray(d) ? d : [d];
1314
+ S.value = S.value.filter((R) => !P.includes(R.field));
1315
+ }, we = async (d) => {
1316
+ x.value = { ...x.value, ...d }, d.schemas && (S.value = [...d.schemas], le());
1317
+ }, xe = (d, P) => {
1318
+ P ? p.value.set(d, P) : p.value.delete(d);
1319
+ }, Ce = (d) => p.value.get(d) ?? null;
1320
+ function Pe(d, P = !1) {
1321
+ const R = p.value.get(d);
1322
+ if (!R)
1315
1323
  return [];
1316
- const T = M;
1317
- return w ? (T == null ? void 0 : T.rawOptions) ?? [] : (T == null ? void 0 : T.options) ?? [];
1324
+ const T = R;
1325
+ return P ? (T == null ? void 0 : T.rawOptions) ?? [] : (T == null ? void 0 : T.options) ?? [];
1318
1326
  }
1319
- const Se = (f) => {
1320
- const w = c.value.get(f);
1321
- if (!w)
1327
+ const Se = (d) => {
1328
+ const P = p.value.get(d);
1329
+ if (!P)
1322
1330
  return !1;
1323
- const M = w;
1324
- return (M == null ? void 0 : M.loading) ?? !1;
1325
- }, fe = {
1326
- getFieldsValue: A,
1327
- setFieldsValue: v,
1328
- resetFields: V,
1329
- validate: H,
1330
- validateFields: ie,
1331
- submit: D,
1331
+ const R = P;
1332
+ return (R == null ? void 0 : R.loading) ?? !1;
1333
+ }, ve = {
1334
+ getFieldsValue: M,
1335
+ setFieldsValue: h,
1336
+ resetFields: K,
1337
+ validate: Q,
1338
+ validateFields: ae,
1339
+ submit: $,
1332
1340
  scrollToField: _e,
1333
1341
  clearValidate: ge,
1334
- updateSchema: se,
1335
- appendSchemaByField: be,
1342
+ updateSchema: be,
1343
+ appendSchemaByField: re,
1336
1344
  removeSchemaByField: ye,
1337
1345
  setProps: we,
1338
- getComponentInstance: xe,
1346
+ getComponentInstance: Ce,
1339
1347
  getFieldOptions: Pe,
1340
1348
  isFieldLoading: Se
1341
1349
  };
1342
1350
  e({
1343
- ...fe,
1344
- registerFieldInstance: Ce
1351
+ ...ve,
1352
+ registerFieldInstance: xe
1345
1353
  });
1346
1354
  const ce = () => {
1347
- b.value = [...t.schemas ?? []], oe();
1355
+ S.value = [...t.schemas ?? []], le();
1348
1356
  }, ue = () => {
1349
- typeof window < "u" && ($.value = window.innerWidth);
1357
+ typeof window < "u" && (W.value = window.innerWidth);
1350
1358
  };
1351
- return ve(() => {
1352
- ce(), n("register", fe), typeof window < "u" && window.addEventListener("resize", ue);
1359
+ return me(() => {
1360
+ ce(), n("register", ve), typeof window < "u" && window.addEventListener("resize", ue);
1353
1361
  }), Be(() => {
1354
1362
  typeof window < "u" && window.removeEventListener("resize", ue);
1355
- }), X(() => P.value, (f) => {
1356
- !G.value || f === void 0 || U(ee(f), !1);
1357
- }, { deep: !0, immediate: !0 }), X(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: p, collapsed: m, formModel: h, formRules: O, innerSchemas: b, innerProps: C, fieldInstanceMap: c, BREAKPOINTS: x, getEffectiveSpan: B, getComponentSetting: F, effectiveProps: N, controlledModelValue: P, isControlled: G, currentFormModel: I, formCustomComponents: S, effectiveActionColOptions: d, windowWidth: $, getVisibleSchemaCount: R, hasMoreFields: j, formListeners: L, displaySchemas: Z, shouldShow: J, getColProps: Y, getSlotName: Q, resolveSchemaModel: ee, applyFormModel: U, updateFormModel: te, initForm: oe, filterByIfShow: _, processFieldMapToTime: E, handleSubmit: D, handleReset: i, setFieldsValue: v, getFieldsValue: A, resetFields: V, handleFieldChange: W, validate: H, validateFields: ie, scrollToField: _e, clearValidate: ge, updateSchema: se, appendSchemaByField: be, removeSchemaByField: ye, setProps: we, registerFieldInstance: Ce, getComponentInstance: xe, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: fe, syncSchemas: ce, handleResize: ue, ProFormItem: Je, FormActions: Ue };
1363
+ }), U(() => A.value, (d) => {
1364
+ !E.value || d === void 0 || te(Y(d), !1);
1365
+ }, { deep: !0, immediate: !0 }), U(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: f, collapsed: m, formModel: _, formRules: z, innerSchemas: S, innerProps: x, fieldInstanceMap: p, BREAKPOINTS: v, getEffectiveSpan: B, getComponentSetting: V, effectiveProps: F, controlledModelValue: A, isControlled: E, currentFormModel: N, formCustomComponents: k, effectiveActionColOptions: u, windowWidth: W, getVisibleSchemaCount: y, hasMoreFields: j, formListeners: q, displaySchemas: X, shouldShow: G, getColProps: ee, getSlotName: Z, resolveSchemaModel: Y, applyFormModel: te, updateFormModel: J, initForm: le, filterByIfShow: g, processFieldMapToTime: O, handleSubmit: $, handleReset: i, setFieldsValue: h, getFieldsValue: M, resetFields: K, handleFieldChange: L, validate: Q, validateFields: ae, scrollToField: _e, clearValidate: ge, updateSchema: be, appendSchemaByField: re, removeSchemaByField: ye, setProps: we, registerFieldInstance: xe, getComponentInstance: Ce, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: ve, syncSchemas: ce, handleResize: ue, ProFormItem: Je, FormActions: Ue };
1358
1366
  }
1359
1367
  });
1360
1368
  var Lt = function() {
@@ -1367,7 +1375,7 @@ var Lt = function() {
1367
1375
  } } }, [n("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), n("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), n("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), n("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), n("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? n("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(o) {
1368
1376
  t.collapsed = !t.collapsed;
1369
1377
  } } }, [n("i", { staticClass: "el-icon-d-arrow-left", class: t.collapsed ? "down" : "up" }), e._v(" " + e._s(t.collapsed ? "展开" : "收起") + " ")]) : e._e(), e._t("formFooter")], 2)], 1);
1370
- }, jt = [], qt = /* @__PURE__ */ ae(
1378
+ }, jt = [], qt = /* @__PURE__ */ se(
1371
1379
  Kt,
1372
1380
  Lt,
1373
1381
  jt,
@@ -1379,81 +1387,81 @@ var Lt = function() {
1379
1387
  );
1380
1388
  const Xe = qt.exports;
1381
1389
  function dn(s) {
1382
- const e = z(null), n = z(s ? me(s) : void 0), t = () => s ? me(s) : void 0, o = (S) => {
1383
- e.value = S;
1384
- const d = t();
1385
- d && Object.keys(d).length > 0 && S.setProps(d);
1390
+ const e = D(null), n = D(s ? pe(s) : void 0), t = () => s ? pe(s) : void 0, o = (k) => {
1391
+ e.value = k;
1392
+ const u = t();
1393
+ u && Object.keys(u).length > 0 && k.setProps(u);
1386
1394
  };
1387
- s && X(
1395
+ s && U(
1388
1396
  () => t(),
1389
- (S) => {
1390
- n.value = S, S && e.value && e.value.setProps(S);
1397
+ (k) => {
1398
+ n.value = k, k && e.value && e.value.setProps(k);
1391
1399
  },
1392
1400
  { deep: !0 }
1393
1401
  );
1394
1402
  const r = () => {
1395
- var S;
1396
- return ((S = e.value) == null ? void 0 : S.getFieldsValue()) ?? {};
1397
- }, a = async (S) => {
1398
- var d;
1399
- await ((d = e.value) == null ? void 0 : d.setFieldsValue(S));
1400
- }, p = async () => {
1401
- var S;
1402
- await ((S = e.value) == null ? void 0 : S.resetFields());
1403
- }, m = (S) => {
1404
- var d;
1405
- return ((d = e.value) == null ? void 0 : d.validate(S)) ?? Promise.resolve();
1406
- }, h = (S) => {
1407
- var d;
1408
- return ((d = e.value) == null ? void 0 : d.validateFields(S)) ?? Promise.resolve();
1409
- }, O = () => {
1410
- var S;
1411
- return ((S = e.value) == null ? void 0 : S.submit()) ?? Promise.resolve();
1412
- }, b = (S, d) => {
1413
- var $;
1414
- return (($ = e.value) == null ? void 0 : $.scrollToField(S, d)) ?? Promise.resolve();
1415
- }, C = (S) => {
1416
- var d;
1417
- (d = e.value) == null || d.clearValidate(S);
1418
- }, c = (S) => {
1419
- var d;
1420
- return ((d = e.value) == null ? void 0 : d.updateSchema(S)) ?? Promise.resolve();
1421
- }, x = (S, d, $) => {
1422
- var R;
1423
- return ((R = e.value) == null ? void 0 : R.appendSchemaByField(S, d, $)) ?? Promise.resolve();
1424
- }, B = (S) => {
1425
- var d;
1426
- return ((d = e.value) == null ? void 0 : d.removeSchemaByField(S)) ?? Promise.resolve();
1427
- }, F = async (S) => {
1428
- var d;
1429
- n.value = { ...n.value, ...S }, await ((d = e.value) == null ? void 0 : d.setProps(S));
1430
- }, N = (S) => {
1431
- var d;
1432
- return ((d = e.value) == null ? void 0 : d.getComponentInstance(S)) ?? null;
1403
+ var k;
1404
+ return ((k = e.value) == null ? void 0 : k.getFieldsValue()) ?? {};
1405
+ }, a = async (k) => {
1406
+ var u;
1407
+ await ((u = e.value) == null ? void 0 : u.setFieldsValue(k));
1408
+ }, f = async () => {
1409
+ var k;
1410
+ await ((k = e.value) == null ? void 0 : k.resetFields());
1411
+ }, m = (k) => {
1412
+ var u;
1413
+ return ((u = e.value) == null ? void 0 : u.validate(k)) ?? Promise.resolve();
1414
+ }, _ = (k) => {
1415
+ var u;
1416
+ return ((u = e.value) == null ? void 0 : u.validateFields(k)) ?? Promise.resolve();
1417
+ }, z = () => {
1418
+ var k;
1419
+ return ((k = e.value) == null ? void 0 : k.submit()) ?? Promise.resolve();
1420
+ }, S = (k, u) => {
1421
+ var W;
1422
+ return ((W = e.value) == null ? void 0 : W.scrollToField(k, u)) ?? Promise.resolve();
1423
+ }, x = (k) => {
1424
+ var u;
1425
+ (u = e.value) == null || u.clearValidate(k);
1426
+ }, p = (k) => {
1427
+ var u;
1428
+ return ((u = e.value) == null ? void 0 : u.updateSchema(k)) ?? Promise.resolve();
1429
+ }, v = (k, u, W) => {
1430
+ var y;
1431
+ return ((y = e.value) == null ? void 0 : y.appendSchemaByField(k, u, W)) ?? Promise.resolve();
1432
+ }, B = (k) => {
1433
+ var u;
1434
+ return ((u = e.value) == null ? void 0 : u.removeSchemaByField(k)) ?? Promise.resolve();
1435
+ }, V = async (k) => {
1436
+ var u;
1437
+ n.value = { ...n.value, ...k }, await ((u = e.value) == null ? void 0 : u.setProps(k));
1438
+ }, F = (k) => {
1439
+ var u;
1440
+ return ((u = e.value) == null ? void 0 : u.getComponentInstance(k)) ?? null;
1433
1441
  };
1434
- function P(S, d = !1) {
1435
- return e.value ? d ? e.value.getFieldOptions(S, !0) : e.value.getFieldOptions(S) : [];
1442
+ function A(k, u = !1) {
1443
+ return e.value ? u ? e.value.getFieldOptions(k, !0) : e.value.getFieldOptions(k) : [];
1436
1444
  }
1437
1445
  return [o, {
1438
1446
  register: o,
1439
1447
  formAction: e,
1440
1448
  getFieldsValue: r,
1441
1449
  setFieldsValue: a,
1442
- resetFields: p,
1450
+ resetFields: f,
1443
1451
  validate: m,
1444
- validateFields: h,
1445
- submit: O,
1446
- scrollToField: b,
1447
- clearValidate: C,
1448
- updateSchema: c,
1449
- appendSchemaByField: x,
1452
+ validateFields: _,
1453
+ submit: z,
1454
+ scrollToField: S,
1455
+ clearValidate: x,
1456
+ updateSchema: p,
1457
+ appendSchemaByField: v,
1450
1458
  removeSchemaByField: B,
1451
- setProps: F,
1452
- getComponentInstance: N,
1453
- getFieldOptions: P,
1454
- isFieldLoading: (S) => {
1455
- var d;
1456
- return ((d = e.value) == null ? void 0 : d.isFieldLoading(S)) ?? !1;
1459
+ setProps: V,
1460
+ getComponentInstance: F,
1461
+ getFieldOptions: A,
1462
+ isFieldLoading: (k) => {
1463
+ var u;
1464
+ return ((u = e.value) == null ? void 0 : u.isFieldLoading(k)) ?? !1;
1457
1465
  }
1458
1466
  }];
1459
1467
  }
@@ -1473,7 +1481,7 @@ const Ht = /* @__PURE__ */ ne({
1473
1481
  },
1474
1482
  emits: ["register"],
1475
1483
  setup(s, { expose: e, emit: n }) {
1476
- const t = s, o = z({}), r = z({}), a = z([]), p = z(typeof window < "u" ? window.innerWidth : 1920), m = z(!0), h = ne({
1484
+ const t = s, o = D({}), r = D({}), a = D([]), f = D(typeof window < "u" ? window.innerWidth : 1920), m = D(!0), _ = ne({
1477
1485
  name: "EcpDescriptionValueRenderer",
1478
1486
  props: {
1479
1487
  schema: { type: Object, required: !0 },
@@ -1481,97 +1489,97 @@ const Ht = /* @__PURE__ */ ne({
1481
1489
  record: { type: Object, required: !0 },
1482
1490
  emptyText: { type: String, default: "-" }
1483
1491
  },
1484
- setup(_) {
1492
+ setup(g) {
1485
1493
  return () => {
1486
- const E = _.schema, D = _.record, i = _.value, v = (A) => {
1487
- const V = O(E, A === _.emptyText ? i : A, D), W = de("span", A);
1488
- return V ? de("el-tooltip", { props: V }, [W]) : W;
1494
+ const O = g.schema, $ = g.record, i = g.value, h = (M) => {
1495
+ const K = z(O, M === g.emptyText ? i : M, $), L = de("span", M);
1496
+ return K ? de("el-tooltip", { props: K }, [L]) : L;
1489
1497
  };
1490
- if (E.render) {
1491
- const A = E.render(i, D);
1492
- return A == null || A === "" ? v(_.emptyText) : typeof A == "string" || typeof A == "number" ? v(String(A)) : A;
1498
+ if (O.render) {
1499
+ const M = O.render(i, $);
1500
+ return M == null || M === "" ? h(g.emptyText) : typeof M == "string" || typeof M == "number" ? h(String(M)) : M;
1493
1501
  }
1494
- return Array.isArray(i) ? v(i.length ? i.join(", ") : _.emptyText) : i == null || i === "" ? v(_.emptyText) : v(typeof i == "object" ? JSON.stringify(i) : String(i));
1502
+ return Array.isArray(i) ? h(i.length ? i.join(", ") : g.emptyText) : i == null || i === "" ? h(g.emptyText) : h(typeof i == "object" ? JSON.stringify(i) : String(i));
1495
1503
  };
1496
1504
  }
1497
- }), O = (_, E, D) => {
1498
- const i = _.tooltip;
1505
+ }), z = (g, O, $) => {
1506
+ const i = g.tooltip;
1499
1507
  if (!i)
1500
1508
  return null;
1501
- const v = typeof i == "function" ? i({ value: E, record: D, schema: _ }) : i;
1502
- return De(v, E);
1503
- }, { mergeSettings: b } = Re(), C = y(() => b("ProDescriptions", { ...t, ...o.value })), c = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, x = (_, E) => {
1504
- if (typeof _ == "number")
1505
- return Math.max(1, _);
1506
- const D = _ ?? {};
1507
- return E >= c.xxl ? D.xxl ?? D.xl ?? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.xl ? D.xl ?? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.lg ? D.lg ?? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.md ? D.md ?? D.sm ?? D.xs ?? 3 : E >= c.sm ? D.sm ?? D.xs ?? 2 : D.xs ?? 1;
1508
- }, B = y(() => x(C.value.column, p.value)), F = y(() => C.value.data ?? r.value ?? {}), N = y(() => (a.value.length ? a.value : C.value.schema ?? []).filter((_) => _.dataIndex || _.field ? typeof _.show == "function" ? _.show(F.value) : _.show !== !1 : !1).map((_) => ({
1509
- ..._,
1510
- dataIndex: _.dataIndex || _.field || ""
1511
- }))), P = y(() => {
1512
- const _ = [];
1513
- let E = { items: [] }, D = 0;
1509
+ const h = typeof i == "function" ? i({ value: O, record: $, schema: g }) : i;
1510
+ return De(h, O);
1511
+ }, { mergeSettings: S } = Re(), x = w(() => S("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, v = (g, O) => {
1512
+ if (typeof g == "number")
1513
+ return Math.max(1, g);
1514
+ const $ = g ?? {};
1515
+ return O >= p.xxl ? $.xxl ?? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.xl ? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.lg ? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.md ? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.sm ? $.sm ?? $.xs ?? 2 : $.xs ?? 1;
1516
+ }, B = w(() => v(x.value.column, f.value)), V = w(() => x.value.data ?? r.value ?? {}), F = w(() => (a.value.length ? a.value : x.value.schema ?? []).filter((g) => g.dataIndex || g.field ? typeof g.show == "function" ? g.show(V.value) : g.show !== !1 : !1).map((g) => ({
1517
+ ...g,
1518
+ dataIndex: g.dataIndex || g.field || ""
1519
+ }))), A = w(() => {
1520
+ const g = [];
1521
+ let O = { items: [] }, $ = 0;
1514
1522
  const i = B.value;
1515
- return N.value.forEach((v, A) => {
1516
- const V = N.value.length - A, W = Math.max(1, Math.min(v.span ?? 1, i)), H = V === 1 ? i - D || i : W;
1517
- D + H > i && (_.push(E), E = { items: [] }, D = 0);
1518
- const ie = V === 1 && D < i ? Math.max(1, i - D) : H;
1519
- E.items.push({ ...v, _span: ie }), D += ie, D >= i && (_.push(E), E = { items: [] }, D = 0);
1520
- }), E.items.length > 0 && _.push(E), _;
1521
- }), G = y(() => {
1522
- var E;
1523
- if (!I.value || m.value)
1524
- return P.value;
1525
- const _ = Math.max(1, ((E = C.value.collapseOptions) == null ? void 0 : E.visibleRows) ?? 1);
1526
- return P.value.slice(0, _);
1527
- }), I = y(() => {
1528
- var E, D;
1529
- const _ = Math.max(1, ((E = C.value.collapseOptions) == null ? void 0 : E.visibleRows) ?? 1);
1530
- return !!C.value.useCollapse && !!((D = C.value.collapseOptions) != null && D.canExpand) && P.value.length > _;
1531
- }), S = y(() => !!C.value.title || !!C.value.helpMessage || I.value), d = y(() => {
1532
- var _, E;
1523
+ return F.value.forEach((h, M) => {
1524
+ const K = F.value.length - M, L = Math.max(1, Math.min(h.span ?? 1, i)), Q = K === 1 ? i - $ || i : L;
1525
+ $ + Q > i && (g.push(O), O = { items: [] }, $ = 0);
1526
+ const ae = K === 1 && $ < i ? Math.max(1, i - $) : Q;
1527
+ O.items.push({ ...h, _span: ae }), $ += ae, $ >= i && (g.push(O), O = { items: [] }, $ = 0);
1528
+ }), O.items.length > 0 && g.push(O), g;
1529
+ }), E = w(() => {
1530
+ var O;
1531
+ if (!N.value || m.value)
1532
+ return A.value;
1533
+ const g = Math.max(1, ((O = x.value.collapseOptions) == null ? void 0 : O.visibleRows) ?? 1);
1534
+ return A.value.slice(0, g);
1535
+ }), N = w(() => {
1536
+ var O, $;
1537
+ const g = Math.max(1, ((O = x.value.collapseOptions) == null ? void 0 : O.visibleRows) ?? 1);
1538
+ return !!x.value.useCollapse && !!(($ = x.value.collapseOptions) != null && $.canExpand) && A.value.length > g;
1539
+ }), k = w(() => !!x.value.title || !!x.value.helpMessage || N.value), u = w(() => {
1540
+ var g, O;
1533
1541
  return {
1534
- expand: ((_ = C.value.collapseOptions) == null ? void 0 : _.expandButtonText) ?? "展开",
1535
- collapse: ((E = C.value.collapseOptions) == null ? void 0 : E.collapseButtonText) ?? "收起"
1542
+ expand: ((g = x.value.collapseOptions) == null ? void 0 : g.expandButtonText) ?? "展开",
1543
+ collapse: ((O = x.value.collapseOptions) == null ? void 0 : O.collapseButtonText) ?? "收起"
1536
1544
  };
1537
- }), $ = y(() => ({
1545
+ }), W = w(() => ({
1538
1546
  gridTemplateColumns: `repeat(${B.value}, minmax(0, 1fr))`
1539
- })), R = (_) => ({
1540
- gridColumn: `span ${_._span}`
1541
- }), j = (_) => ({
1542
- minWidth: _.labelMinWidth ? `${_.labelMinWidth}px` : void 0,
1543
- ..._.labelStyle ?? {}
1544
- }), L = (_) => ({
1545
- minWidth: _.contentMinWidth ? `${_.contentMinWidth}px` : void 0,
1546
- ..._.contentStyle ?? {}
1547
- }), Z = (_) => F.value[_.dataIndex], J = () => {
1548
- a.value = [...C.value.schema ?? []];
1549
- }, Y = () => {
1550
- r.value = { ...C.value.data ?? {} };
1551
- }, Q = async (_) => {
1552
- o.value = { ...o.value, ..._ }, _.schema && (a.value = [..._.schema]), _.data && (r.value = { ..._.data });
1553
- }, ee = async (_) => {
1554
- r.value = { ...r.value, ..._ }, o.value = { ...o.value, data: r.value };
1555
- }, U = () => ({ ...C.value.data ?? r.value ?? {} }), te = {
1556
- setProps: Q,
1557
- setData: ee,
1558
- getData: U
1547
+ })), y = (g) => ({
1548
+ gridColumn: `span ${g._span}`
1549
+ }), j = (g) => ({
1550
+ minWidth: g.labelMinWidth ? `${g.labelMinWidth}px` : void 0,
1551
+ ...g.labelStyle ?? {}
1552
+ }), q = (g) => ({
1553
+ minWidth: g.contentMinWidth ? `${g.contentMinWidth}px` : void 0,
1554
+ ...g.contentStyle ?? {}
1555
+ }), X = (g) => V.value[g.dataIndex], G = () => {
1556
+ a.value = [...x.value.schema ?? []];
1557
+ }, ee = () => {
1558
+ r.value = { ...x.value.data ?? {} };
1559
+ }, Z = async (g) => {
1560
+ o.value = { ...o.value, ...g }, g.schema && (a.value = [...g.schema]), g.data && (r.value = { ...g.data });
1561
+ }, Y = async (g) => {
1562
+ r.value = { ...r.value, ...g }, o.value = { ...o.value, data: r.value };
1563
+ }, te = () => ({ ...x.value.data ?? r.value ?? {} }), J = {
1564
+ setProps: Z,
1565
+ setData: Y,
1566
+ getData: te
1559
1567
  };
1560
- e(te);
1561
- const oe = () => {
1562
- typeof window < "u" && (p.value = window.innerWidth);
1568
+ e(J);
1569
+ const le = () => {
1570
+ typeof window < "u" && (f.value = window.innerWidth);
1563
1571
  };
1564
- return ve(() => {
1565
- var _;
1566
- J(), Y(), m.value = ((_ = C.value.collapseOptions) == null ? void 0 : _.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", oe);
1572
+ return me(() => {
1573
+ var g;
1574
+ G(), ee(), m.value = ((g = x.value.collapseOptions) == null ? void 0 : g.defaultExpand) !== !1, n("register", J), typeof window < "u" && window.addEventListener("resize", le);
1567
1575
  }), Be(() => {
1568
- typeof window < "u" && window.removeEventListener("resize", oe);
1569
- }), X(() => C.value.schema, J, { deep: !0 }), X(() => C.value.data, Y, { deep: !0 }), X(() => {
1570
- var _;
1571
- return (_ = C.value.collapseOptions) == null ? void 0 : _.defaultExpand;
1572
- }, (_) => {
1573
- _ !== void 0 && (m.value = _);
1574
- }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: p, expanded: m, DescriptionValueRenderer: h, normalizeTooltip: O, mergeSettings: b, effectiveProps: C, breakpoints: c, resolveColumn: x, currentColumn: B, effectiveData: F, visibleSchema: N, normalizedRows: P, renderedRows: G, showCollapseButton: I, showHeader: S, collapseButtonText: d, bodyStyle: $, getItemStyle: R, getLabelStyle: j, getContentStyle: L, getItemValue: Z, syncSchema: J, syncData: Y, setProps: Q, setData: ee, getData: U, descriptionAction: te, updateWindowWidth: oe };
1576
+ typeof window < "u" && window.removeEventListener("resize", le);
1577
+ }), U(() => x.value.schema, G, { deep: !0 }), U(() => x.value.data, ee, { deep: !0 }), U(() => {
1578
+ var g;
1579
+ return (g = x.value.collapseOptions) == null ? void 0 : g.defaultExpand;
1580
+ }, (g) => {
1581
+ g !== void 0 && (m.value = g);
1582
+ }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: f, expanded: m, DescriptionValueRenderer: _, normalizeTooltip: z, mergeSettings: S, effectiveProps: x, breakpoints: p, resolveColumn: v, currentColumn: B, effectiveData: V, visibleSchema: F, normalizedRows: A, renderedRows: E, showCollapseButton: N, showHeader: k, collapseButtonText: u, bodyStyle: W, getItemStyle: y, getLabelStyle: j, getContentStyle: q, getItemValue: X, syncSchema: G, syncData: ee, setProps: Z, setData: Y, getData: te, descriptionAction: J, updateWindowWidth: le };
1575
1583
  }
1576
1584
  });
1577
1585
  var Gt = function() {
@@ -1587,11 +1595,11 @@ var Gt = function() {
1587
1595
  `is-${t.effectiveProps.size}`,
1588
1596
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1589
1597
  ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(r, a) {
1590
- return [e._l(r.items, function(p) {
1591
- return [n("div", { key: `${a}-${p.dataIndex || p.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(p) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(p) }, [e._v(" " + e._s(p.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(p) }, [e.$scopedSlots[p.slot || p.dataIndex] ? e._t(p.slot || p.dataIndex, null, { value: t.getItemValue(p), record: t.effectiveData, schema: p }) : n(t.DescriptionValueRenderer, { attrs: { schema: p, value: t.getItemValue(p), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1598
+ return [e._l(r.items, function(f) {
1599
+ return [n("div", { key: `${a}-${f.dataIndex || f.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(f) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(f) }, [e._v(" " + e._s(f.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(f) }, [e.$scopedSlots[f.slot || f.dataIndex] ? e._t(f.slot || f.dataIndex, null, { value: t.getItemValue(f), record: t.effectiveData, schema: f }) : n(t.DescriptionValueRenderer, { attrs: { schema: f, value: t.getItemValue(f), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1592
1600
  })];
1593
1601
  })], 2)]);
1594
- }, Jt = [], Ut = /* @__PURE__ */ ae(
1602
+ }, Jt = [], Ut = /* @__PURE__ */ se(
1595
1603
  Ht,
1596
1604
  Gt,
1597
1605
  Jt,
@@ -1603,17 +1611,17 @@ var Gt = function() {
1603
1611
  );
1604
1612
  const Ze = Ut.exports;
1605
1613
  function fn(s) {
1606
- const e = z(null), n = () => s ? me(s) : void 0, t = () => {
1607
- const a = me(e);
1614
+ const e = D(null), n = () => s ? pe(s) : void 0, t = () => {
1615
+ const a = pe(e);
1608
1616
  if (!a)
1609
1617
  throw new Error("ProDescriptions instance has not been registered");
1610
1618
  return a;
1611
1619
  }, o = (a) => {
1612
1620
  e.value = a;
1613
- const p = n();
1614
- p && Object.keys(p).length > 0 && a.setProps(p);
1621
+ const f = n();
1622
+ f && Object.keys(f).length > 0 && a.setProps(f);
1615
1623
  };
1616
- return s && X(
1624
+ return s && U(
1617
1625
  () => n(),
1618
1626
  (a) => {
1619
1627
  a && e.value && e.value.setProps(a);
@@ -1647,32 +1655,32 @@ const Xt = /* @__PURE__ */ ne({
1647
1655
  },
1648
1656
  emits: ["update:expanded", "change", "collapse", "expand"],
1649
1657
  setup(s, { expose: e, emit: n }) {
1650
- const t = s, o = he(), { mergeSettings: r } = Re(), a = z(t.expanded ?? t.defaultExpand), p = y(() => r("CollapseContainer", { ...t })), m = y(() => p.value.canExpand ?? p.value.canExpan ?? !0), h = y(() => p.value.expanded !== void 0), O = y(() => h.value ? !!p.value.expanded : a.value), b = y(() => !!o.title || !!o.action || !!p.value.title || !!p.value.helpMessage || m.value), C = y(() => m.value), c = y(() => {
1651
- const P = p.value.wrapperProps ?? {}, G = P.class, I = P.style, S = { ...P };
1652
- return delete S.class, delete S.style, {
1653
- ...S,
1654
- class: G,
1655
- style: I
1658
+ const t = s, o = he(), { mergeSettings: r } = Re(), a = D(t.expanded ?? t.defaultExpand), f = w(() => r("CollapseContainer", { ...t })), m = w(() => f.value.canExpand ?? f.value.canExpan ?? !0), _ = w(() => f.value.expanded !== void 0), z = w(() => _.value ? !!f.value.expanded : a.value), S = w(() => !!o.title || !!o.action || !!f.value.title || !!f.value.helpMessage || m.value), x = w(() => m.value), p = w(() => {
1659
+ const A = f.value.wrapperProps ?? {}, E = A.class, N = A.style, k = { ...A };
1660
+ return delete k.class, delete k.style, {
1661
+ ...k,
1662
+ class: E,
1663
+ style: N
1656
1664
  };
1657
- }), x = () => {
1658
- !p.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1665
+ }), v = () => {
1666
+ !f.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1659
1667
  window.dispatchEvent(new Event("resize"));
1660
1668
  }, 220);
1661
- }, B = (P) => {
1662
- h.value || (a.value = P), n("update:expanded", P), n("change", P), n(P ? "expand" : "collapse"), x();
1669
+ }, B = (A) => {
1670
+ _.value || (a.value = A), n("update:expanded", A), n("change", A), n(A ? "expand" : "collapse"), v();
1671
+ }, V = () => {
1672
+ m.value && B(!z.value);
1663
1673
  }, F = () => {
1664
- m.value && B(!O.value);
1665
- }, N = () => {
1666
- C.value && F();
1674
+ x.value && V();
1667
1675
  };
1668
- return X(() => t.expanded, (P) => {
1669
- P !== void 0 && (a.value = P);
1670
- }), X(() => t.defaultExpand, (P) => {
1671
- t.expanded === void 0 && (a.value = P);
1676
+ return U(() => t.expanded, (A) => {
1677
+ A !== void 0 && (a.value = A);
1678
+ }), U(() => t.defaultExpand, (A) => {
1679
+ t.expanded === void 0 && (a.value = A);
1672
1680
  }), e({
1673
1681
  setExpanded: B,
1674
- toggleExpand: F
1675
- }), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: p, resolvedCanExpan: m, isControlled: h, mergedExpanded: O, showHeader: b, canToggleByHeader: C, wrapperProps: c, triggerWindowResize: x, setExpanded: B, toggleExpand: F, handleHeaderClick: N };
1682
+ toggleExpand: V
1683
+ }), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: f, resolvedCanExpan: m, isControlled: _, mergedExpanded: z, showHeader: S, canToggleByHeader: x, wrapperProps: p, triggerWindowResize: v, setExpanded: B, toggleExpand: V, handleHeaderClick: F };
1676
1684
  }
1677
1685
  });
1678
1686
  var Zt = function() {
@@ -1690,7 +1698,7 @@ var Zt = function() {
1690
1698
  } } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(o) {
1691
1699
  return o.stopPropagation(), t.toggleExpand.apply(null, arguments);
1692
1700
  } } }, [e._v(" " + e._s(t.mergedExpanded ? t.effectiveProps.collapseButtonText : t.effectiveProps.expandButtonText) + " "), n("i", { staticClass: "el-icon-arrow-down", class: { "is-expanded": t.mergedExpanded } })]) : e._e()], 2) : e._e()]) : e._e(), n("el-collapse-transition", [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.mergedExpanded, expression: "mergedExpanded" }], staticClass: "ecp-collapse-container__body", class: t.effectiveProps.contentClass, style: t.effectiveProps.contentStyle }, [e._t("default")], 2)])], 1);
1693
- }, Qt = [], Yt = /* @__PURE__ */ ae(
1701
+ }, Qt = [], Yt = /* @__PURE__ */ se(
1694
1702
  Xt,
1695
1703
  Zt,
1696
1704
  Qt,
@@ -1730,7 +1738,7 @@ const Qe = Yt.exports, en = {
1730
1738
  },
1731
1739
  emits: ["update:modelValue"],
1732
1740
  setup(s, { expose: e, emit: n }) {
1733
- const t = s, o = z(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", p = y(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), m = y(() => "left"), h = y(() => {
1741
+ const t = s, o = D(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", f = w(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), m = w(() => "left"), _ = w(() => {
1734
1742
  const i = t.actionColumn;
1735
1743
  return {
1736
1744
  width: (i == null ? void 0 : i.width) ?? t.actionWidth,
@@ -1739,177 +1747,177 @@ const Qe = Yt.exports, en = {
1739
1747
  fixed: (i == null ? void 0 : i.fixed) === void 0 ? "right" : i.fixed
1740
1748
  };
1741
1749
  });
1742
- function O(i) {
1750
+ function z(i) {
1743
1751
  return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
1744
1752
  }
1745
- const b = y(() => {
1753
+ const S = w(() => {
1746
1754
  const i = [];
1747
- t.fixedRows.forEach((V) => {
1755
+ t.fixedRows.forEach((K) => {
1748
1756
  i.push({
1749
1757
  _type: "fixed",
1750
- rowKey: V.rowKey,
1751
- rowLabel: V.label
1758
+ rowKey: K.rowKey,
1759
+ rowLabel: K.label
1752
1760
  });
1753
1761
  });
1754
- const v = t.modelValue;
1755
- return ((v && typeof v == "object" ? v[r()] : void 0) ?? []).forEach((V, W) => {
1756
- i.push({ _type: "competitor", _index: W });
1762
+ const h = t.modelValue;
1763
+ return ((h && typeof h == "object" ? h[r()] : void 0) ?? []).forEach((K, L) => {
1764
+ i.push({ _type: "competitor", _index: L });
1757
1765
  }), i;
1758
- }), C = y(() => {
1766
+ }), x = w(() => {
1759
1767
  const i = t.modelValue;
1760
1768
  return ((i && typeof i == "object" ? i[r()] : void 0) ?? []).length > t.minCompetitors;
1761
1769
  });
1762
- function c() {
1770
+ function p() {
1763
1771
  const i = t.modelValue;
1764
1772
  return !i || typeof i != "object" ? {} : JSON.parse(JSON.stringify(i));
1765
1773
  }
1766
- function x(i) {
1767
- const v = t.modelValue;
1768
- if (!v || typeof v != "object") {
1769
- const W = {};
1770
- for (const H of t.columns)
1771
- W[H.key] = "";
1772
- return W;
1774
+ function v(i) {
1775
+ const h = t.modelValue;
1776
+ if (!h || typeof h != "object") {
1777
+ const L = {};
1778
+ for (const Q of t.columns)
1779
+ L[Q.key] = "";
1780
+ return L;
1773
1781
  }
1774
- const A = v[i];
1775
- if (A && typeof A == "object" && !Array.isArray(A))
1776
- return A;
1777
- const V = {};
1778
- for (const W of t.columns)
1779
- V[W.key] = "";
1780
- return V;
1782
+ const M = h[i];
1783
+ if (M && typeof M == "object" && !Array.isArray(M))
1784
+ return M;
1785
+ const K = {};
1786
+ for (const L of t.columns)
1787
+ K[L.key] = "";
1788
+ return K;
1781
1789
  }
1782
1790
  function B(i) {
1783
1791
  n("update:modelValue", i);
1784
1792
  }
1785
- function F(i, v) {
1786
- return x(i)[v] ?? "";
1793
+ function V(i, h) {
1794
+ return v(i)[h] ?? "";
1787
1795
  }
1788
- function N(i, v, A) {
1789
- const V = c(), W = { ...V[i] || {} };
1790
- W[v] = A, V[i] = W, B(V);
1796
+ function F(i, h, M) {
1797
+ const K = p(), L = { ...K[i] || {} };
1798
+ L[h] = M, K[i] = L, B(K);
1791
1799
  }
1792
- function P() {
1800
+ function A() {
1793
1801
  const i = t.modelValue;
1794
1802
  if (!i || typeof i != "object")
1795
1803
  return [];
1796
- const v = i[r()];
1797
- return Array.isArray(v) ? v : [];
1804
+ const h = i[r()];
1805
+ return Array.isArray(h) ? h : [];
1798
1806
  }
1799
- function G(i) {
1800
- const v = P()[i], A = a();
1801
- return v ? String(v[A] ?? "") : "";
1807
+ function E(i) {
1808
+ const h = A()[i], M = a();
1809
+ return h ? String(h[M] ?? "") : "";
1802
1810
  }
1803
- function I(i, v) {
1804
- const A = c(), V = [...P()], W = { ...V[i] || {} };
1805
- W[a()] = v, V[i] = W, A[r()] = V, B(A);
1811
+ function N(i, h) {
1812
+ const M = p(), K = [...A()], L = { ...K[i] || {} };
1813
+ L[a()] = h, K[i] = L, M[r()] = K, B(M);
1806
1814
  }
1807
- function S(i, v) {
1808
- const A = P()[i];
1809
- return A ? A[v] ?? "" : "";
1815
+ function k(i, h) {
1816
+ const M = A()[i];
1817
+ return M ? M[h] ?? "" : "";
1810
1818
  }
1811
- function d(i, v, A) {
1812
- const V = c(), W = [...P()], H = { ...W[i] || {} };
1813
- H[v] = A, W[i] = H, V[r()] = W, B(V);
1819
+ function u(i, h, M) {
1820
+ const K = p(), L = [...A()], Q = { ...L[i] || {} };
1821
+ Q[h] = M, L[i] = Q, K[r()] = L, B(K);
1814
1822
  }
1815
- function $(i, v) {
1816
- return i._type === "fixed" ? F(i.rowKey, v.key) : S(i._index, v.key);
1823
+ function W(i, h) {
1824
+ return i._type === "fixed" ? V(i.rowKey, h.key) : k(i._index, h.key);
1817
1825
  }
1818
- function R(i, v, A) {
1819
- i._type === "fixed" ? N(i.rowKey, v.key, A) : d(i._index, v.key, A);
1826
+ function y(i, h, M) {
1827
+ i._type === "fixed" ? F(i.rowKey, h.key, M) : u(i._index, h.key, M);
1820
1828
  }
1821
- function j(i, v) {
1822
- return (A) => R(i.row, v, A);
1829
+ function j(i, h) {
1830
+ return (M) => y(i.row, h, M);
1823
1831
  }
1824
- function L() {
1832
+ function q() {
1825
1833
  const i = { [a()]: "" };
1826
- for (const v of t.columns)
1827
- i[v.key] = "";
1834
+ for (const h of t.columns)
1835
+ i[h.key] = "";
1828
1836
  return i;
1829
1837
  }
1830
- function Z() {
1831
- const i = c(), v = [...P()];
1832
- v.push(L()), i[r()] = v, B(i);
1838
+ function X() {
1839
+ const i = p(), h = [...A()];
1840
+ h.push(q()), i[r()] = h, B(i);
1833
1841
  }
1834
- function J(i) {
1835
- if (!C.value)
1842
+ function G(i) {
1843
+ if (!x.value)
1836
1844
  return;
1837
- const v = c(), A = [...P()];
1838
- A.splice(i, 1), v[r()] = A, B(v);
1845
+ const h = p(), M = [...A()];
1846
+ M.splice(i, 1), h[r()] = M, B(h);
1839
1847
  }
1840
- function Y(i, v) {
1841
- return `${i}.${v}`;
1848
+ function ee(i, h) {
1849
+ return `${i}.${h}`;
1842
1850
  }
1843
- function Q(i) {
1851
+ function Z(i) {
1844
1852
  return `${r()}.${i}.${a()}`;
1845
1853
  }
1846
- function ee(i, v) {
1847
- return `${r()}.${i}.${v}`;
1854
+ function Y(i, h) {
1855
+ return `${r()}.${i}.${h}`;
1848
1856
  }
1849
- function U(i) {
1857
+ function te(i) {
1850
1858
  return i.component === "formatted-number" ? Me : "el-input";
1851
1859
  }
1852
- function te(i) {
1853
- const v = i.componentProps || {};
1860
+ function J(i) {
1861
+ const h = i.componentProps || {};
1854
1862
  return i.component === "formatted-number" ? {
1855
1863
  integerDigits: 5,
1856
1864
  decimalPlaces: 6,
1857
1865
  rounding: "round",
1858
1866
  inputLimit: !0,
1859
- ...v
1860
- } : { ...v };
1867
+ ...h
1868
+ } : { ...h };
1861
1869
  }
1862
- function oe(i) {
1863
- const v = i.row;
1864
- if (v._type === "fixed")
1870
+ function le(i) {
1871
+ const h = i.row;
1872
+ if (h._type === "fixed")
1865
1873
  return {
1866
- row: v,
1874
+ row: h,
1867
1875
  rowType: "fixed",
1868
- rowKey: v.rowKey,
1869
- rowLabel: v.rowLabel
1876
+ rowKey: h.rowKey,
1877
+ rowLabel: h.rowLabel
1870
1878
  };
1871
- const A = v._index;
1879
+ const M = h._index;
1872
1880
  return {
1873
- row: v,
1881
+ row: h,
1874
1882
  rowType: "competitor",
1875
- rowIndex: A,
1876
- value: G(A),
1877
- updateValue: (V) => I(A, V)
1883
+ rowIndex: M,
1884
+ value: E(M),
1885
+ updateValue: (K) => N(M, K)
1878
1886
  };
1879
1887
  }
1880
- const _ = y(() => {
1881
- const i = {}, v = (V) => [{ required: !0, message: `请输入${V}`, trigger: "blur" }];
1882
- for (const V of t.fixedRows)
1883
- for (const W of t.columns)
1884
- W.rules ? i[`${V.rowKey}.${W.key}`] = W.rules : W.required && (i[`${V.rowKey}.${W.key}`] = v(W.title));
1885
- return P().forEach((V, W) => {
1886
- i[`${r()}.${W}.${a()}`] = v("友商名称");
1887
- for (const H of t.columns)
1888
- H.rules ? i[`${r()}.${W}.${H.key}`] = H.rules : H.required && (i[`${r()}.${W}.${H.key}`] = v(H.title));
1888
+ const g = w(() => {
1889
+ const i = {}, h = (K) => [{ required: !0, message: `请输入${K}`, trigger: "blur" }];
1890
+ for (const K of t.fixedRows)
1891
+ for (const L of t.columns)
1892
+ L.rules ? i[`${K.rowKey}.${L.key}`] = L.rules : L.required && (i[`${K.rowKey}.${L.key}`] = h(L.title));
1893
+ return A().forEach((K, L) => {
1894
+ i[`${r()}.${L}.${a()}`] = h("友商名称");
1895
+ for (const Q of t.columns)
1896
+ Q.rules ? i[`${r()}.${L}.${Q.key}`] = Q.rules : Q.required && (i[`${r()}.${L}.${Q.key}`] = h(Q.title));
1889
1897
  }), { ...i, ...t.rules || {} };
1890
1898
  });
1891
- function E() {
1899
+ function O() {
1892
1900
  return new Promise((i) => {
1893
- const v = o.value;
1894
- if (!v || typeof v.validate != "function") {
1901
+ const h = o.value;
1902
+ if (!h || typeof h.validate != "function") {
1895
1903
  i(!0);
1896
1904
  return;
1897
1905
  }
1898
- v.validate((A) => {
1899
- i(A);
1906
+ h.validate((M) => {
1907
+ i(M);
1900
1908
  });
1901
1909
  });
1902
1910
  }
1903
- function D(i) {
1904
- var v, A;
1905
- (A = (v = o.value) == null ? void 0 : v.clearValidate) == null || A.call(v, i);
1911
+ function $(i) {
1912
+ var h, M;
1913
+ (M = (h = o.value) == null ? void 0 : h.clearValidate) == null || M.call(h, i);
1906
1914
  }
1907
1915
  return e({
1908
- validate: E,
1909
- clearValidate: D,
1910
- addCompetitor: Z,
1911
- removeCompetitor: J
1912
- }), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: p, firstColumnFixed: m, actionColumnBind: h, rowKeyFn: O, tableRows: b, canDeleteCompetitor: C, cloneModel: c, ensureFixedBlock: x, emitNext: B, getFixedMetric: F, setFixedMetric: N, competitorList: P, getCompetitorName: G, setCompetitorName: I, getCompetitorMetric: S, setCompetitorMetric: d, getCellValue: $, setCellValue: R, slotUpdateHandler: j, emptyCompetitorRow: L, addCompetitor: Z, removeCompetitor: J, fixedMetricProp: Y, competitorNameProp: Q, competitorMetricProp: ee, cellComponent: U, cellBind: te, firstColumnScope: oe, mergedRules: _, validate: E, clearValidate: D };
1916
+ validate: O,
1917
+ clearValidate: $,
1918
+ addCompetitor: X,
1919
+ removeCompetitor: G
1920
+ }), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: f, firstColumnFixed: m, actionColumnBind: _, rowKeyFn: z, tableRows: S, canDeleteCompetitor: x, cloneModel: p, ensureFixedBlock: v, emitNext: B, getFixedMetric: V, setFixedMetric: F, competitorList: A, getCompetitorName: E, setCompetitorName: N, getCompetitorMetric: k, setCompetitorMetric: u, getCellValue: W, setCellValue: y, slotUpdateHandler: j, emptyCompetitorRow: q, addCompetitor: X, removeCompetitor: G, fixedMetricProp: ee, competitorNameProp: Z, competitorMetricProp: Y, cellComponent: te, cellBind: J, firstColumnScope: le, mergedRules: g, validate: O, clearValidate: $ };
1913
1921
  }
1914
1922
  });
1915
1923
  var nn = function() {
@@ -1948,7 +1956,7 @@ var nn = function() {
1948
1956
  } } }, [e._v(" 删除 ")]) : n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: "" } }, [e._v(" 删除 ")])];
1949
1957
  }, { row: o.row, canDelete: t.canDeleteCompetitor, addCompetitor: t.addCompetitor, removeCompetitor: t.removeCompetitor })];
1950
1958
  } }], null, !0) }, "el-table-column", t.actionColumnBind, !1)) : e._e()], 2)], 1)], 1);
1951
- }, on = [], ln = /* @__PURE__ */ ae(
1959
+ }, on = [], ln = /* @__PURE__ */ se(
1952
1960
  tn,
1953
1961
  nn,
1954
1962
  on,
@@ -2001,10 +2009,10 @@ export {
2001
2009
  sn as install,
2002
2010
  ke as normalizeNumericValue,
2003
2011
  Pt as numberToEditString,
2004
- Ct as roundToDecimals,
2012
+ xt as roundToDecimals,
2005
2013
  Ve as sanitizeNumericInput,
2006
2014
  Ae as stripNumberGrouping,
2007
- xt as toFixedDecimalString,
2015
+ Ct as toFixedDecimalString,
2008
2016
  Re as useComponentSetting,
2009
2017
  fn as useDescription,
2010
2018
  dn as useForm,