@aspire-ui/element-component-pro 1.0.27 → 1.0.29

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,39 +1,39 @@
1
- import { reactive as nt, defineComponent as te, h as ve, useSlots as we, ref as D, computed as w, onMounted as ge, nextTick as Ke, onUnmounted as Fe, watch as ee, unref as _e } from "vue";
1
+ import { reactive as nt, defineComponent as oe, h as he, useSlots as Ce, ref as D, computed as x, onMounted as ye, nextTick as De, onUnmounted as ke, watch as te, unref as be } from "vue";
2
2
  import { MessageBox as lt } from "element-ui";
3
- const he = nt({});
4
- function $e(r, e) {
3
+ const ge = nt({});
4
+ function $e(s, e) {
5
5
  if (!e)
6
- return r;
6
+ return s;
7
7
  for (const n in e)
8
8
  if (Object.prototype.hasOwnProperty.call(e, n)) {
9
- const t = r[n], l = e[n];
10
- n === "components" ? r[n] = { ...t, ...l } : Ie(l) ? Ie(t) ? r[n] = $e(
9
+ const t = s[n], l = e[n];
10
+ n === "components" ? s[n] = { ...t, ...l } : Ve(l) ? Ve(t) ? s[n] = $e(
11
11
  t,
12
12
  l
13
- ) : r[n] = { ...l } : r[n] = l;
13
+ ) : s[n] = { ...l } : s[n] = l;
14
14
  }
15
- return r;
15
+ return s;
16
16
  }
17
- function Ie(r) {
18
- if (!r || typeof r != "object")
17
+ function Ve(s) {
18
+ if (!s || typeof s != "object")
19
19
  return !1;
20
- const e = Object.getPrototypeOf(r);
20
+ const e = Object.getPrototypeOf(s);
21
21
  return e === Object.prototype || e === null;
22
22
  }
23
23
  function Be() {
24
24
  return {
25
- getSetting: (t) => t === void 0 ? { ...he } : { ...he[t] ?? {} },
25
+ getSetting: (t) => t === void 0 ? { ...ge } : { ...ge[t] ?? {} },
26
26
  setSetting: (t, l) => {
27
- const a = he[t];
28
- a ? he[t] = $e({ ...a }, l) : he[t] = { ...l };
27
+ const a = ge[t];
28
+ a ? ge[t] = $e({ ...a }, l) : ge[t] = { ...l };
29
29
  },
30
30
  mergeSettings: (t, l) => {
31
- const a = he[t] ?? {};
31
+ const a = ge[t] ?? {};
32
32
  return $e({ ...a }, l);
33
33
  }
34
34
  };
35
35
  }
36
- const je = te({
36
+ const je = oe({
37
37
  name: "EcpProTableDefaultCellRenderer",
38
38
  props: {
39
39
  column: { type: Object, required: !0 },
@@ -41,22 +41,22 @@ const je = te({
41
41
  index: { type: Number, required: !0 },
42
42
  value: { required: !1 }
43
43
  },
44
- setup(r) {
44
+ setup(s) {
45
45
  return () => {
46
46
  var n, t;
47
- const e = r.column;
47
+ const e = s.column;
48
48
  if (e != null && e.customRender) {
49
- const l = e.customRender({ text: r.value, record: r.record, index: r.index });
50
- return typeof l == "string" || typeof l == "number" ? ve("span", String(l)) : l;
49
+ const l = e.customRender({ text: s.value, record: s.record, index: s.index });
50
+ return typeof l == "string" || typeof l == "number" ? he("span", String(l)) : l;
51
51
  }
52
52
  if (e != null && e.valueEnum) {
53
- const l = ((t = (n = e.valueEnum) == null ? void 0 : n[r.value]) == null ? void 0 : t.text) ?? r.value;
54
- return ve("span", l == null ? "" : String(l));
53
+ const l = ((t = (n = e.valueEnum) == null ? void 0 : n[s.value]) == null ? void 0 : t.text) ?? s.value;
54
+ return he("span", l == null ? "" : String(l));
55
55
  }
56
- return ve("span", r.value == null ? "" : String(r.value));
56
+ return he("span", s.value == null ? "" : String(s.value));
57
57
  };
58
58
  }
59
- }), qe = te({
59
+ }), qe = oe({
60
60
  name: "EcpProTableBodyCellRenderer",
61
61
  props: {
62
62
  slotRender: { type: Function, required: !0 },
@@ -67,54 +67,54 @@ const je = te({
67
67
  customRender: { type: Function, required: !1 },
68
68
  valueEnum: { type: Object, required: !1 }
69
69
  },
70
- setup(r) {
70
+ setup(s) {
71
71
  return () => {
72
- const e = r.slotRender, n = e == null ? void 0 : e({ column: r.column, record: r.record, index: r.index, value: r.value });
73
- if (((s) => s == null ? [] : Array.isArray(s) ? s.filter((c) => c != null && c !== !1 && !c.isComment) : [s])(n).length > 0)
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 (((r) => r == null ? [] : Array.isArray(r) ? r.filter((d) => d != null && d !== !1 && !d.isComment) : [r])(n).length > 0)
74
74
  return n;
75
- const a = { ...r.column };
76
- return r.customRender && (a.customRender = r.customRender), r.valueEnum && (a.valueEnum = r.valueEnum), ve(je, { props: { column: a, record: r.record, index: r.index, value: r.value } });
75
+ const a = { ...s.column };
76
+ return s.customRender && (a.customRender = s.customRender), s.valueEnum && (a.valueEnum = s.valueEnum), he(je, { props: { column: a, record: s.record, index: s.index, value: s.value } });
77
77
  };
78
78
  }
79
- }), ot = /* @__PURE__ */ te({
79
+ }), ot = /* @__PURE__ */ oe({
80
80
  __name: "TableColumnGroup",
81
81
  props: {
82
82
  column: null,
83
83
  effectiveProps: null,
84
84
  getColumnWidth: null
85
85
  },
86
- setup(r) {
87
- const e = r, n = we();
86
+ setup(s) {
87
+ const e = s, n = Ce();
88
88
  return { __sfc: !0, props: e, $scopedSlots: n, shouldShowColumn: (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, DefaultCellRenderer: je, BodyCellRenderer: qe };
89
89
  }
90
90
  });
91
- function re(r, e, n, t, l, a, s, c) {
92
- var f = typeof r == "function" ? r.options : r;
93
- e && (f.render = e, f.staticRenderFns = n, f._compiled = !0), t && (f.functional = !0), a && (f._scopeId = "data-v-" + a);
91
+ function ie(s, e, n, t, l, a, r, d) {
92
+ var h = typeof s == "function" ? s.options : s;
93
+ e && (h.render = e, h.staticRenderFns = n, h._compiled = !0), t && (h.functional = !0), a && (h._scopeId = "data-v-" + a);
94
94
  var v;
95
- if (s ? (v = function(b) {
96
- b = b || // cached call
95
+ if (r ? (v = function(y) {
96
+ y = y || // cached call
97
97
  this.$vnode && this.$vnode.ssrContext || // stateful
98
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !b && typeof __VUE_SSR_CONTEXT__ < "u" && (b = __VUE_SSR_CONTEXT__), l && l.call(this, b), b && b._registeredComponents && b._registeredComponents.add(s);
99
- }, f._ssrRegister = v) : l && (v = c ? function() {
98
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !y && typeof __VUE_SSR_CONTEXT__ < "u" && (y = __VUE_SSR_CONTEXT__), l && l.call(this, y), y && y._registeredComponents && y._registeredComponents.add(r);
99
+ }, h._ssrRegister = v) : l && (v = d ? function() {
100
100
  l.call(
101
101
  this,
102
- (f.functional ? this.parent : this).$root.$options.shadowRoot
102
+ (h.functional ? this.parent : this).$root.$options.shadowRoot
103
103
  );
104
104
  } : l), v)
105
- if (f.functional) {
106
- f._injectStyles = v;
107
- var F = f.render;
108
- f.render = function(p, _) {
109
- return v.call(_), F(p, _);
105
+ if (h.functional) {
106
+ h._injectStyles = v;
107
+ var k = h.render;
108
+ h.render = function(p, _) {
109
+ return v.call(_), k(p, _);
110
110
  };
111
111
  } else {
112
- var g = f.beforeCreate;
113
- f.beforeCreate = g ? [].concat(g, v) : [v];
112
+ var w = h.beforeCreate;
113
+ h.beforeCreate = w ? [].concat(w, v) : [v];
114
114
  }
115
115
  return {
116
- exports: r,
117
- options: f
116
+ exports: s,
117
+ options: h
118
118
  };
119
119
  }
120
120
  var at = function() {
@@ -130,17 +130,17 @@ var at = 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
- }, st = [], rt = /* @__PURE__ */ re(
133
+ }, rt = [], st = /* @__PURE__ */ ie(
134
134
  ot,
135
135
  at,
136
- st,
136
+ rt,
137
137
  !1,
138
138
  null,
139
139
  null,
140
140
  null,
141
141
  null
142
142
  );
143
- const it = rt.exports, ut = /* @__PURE__ */ te({
143
+ const it = st.exports, ut = /* @__PURE__ */ oe({
144
144
  __name: "ProTable",
145
145
  props: {
146
146
  columns: null,
@@ -184,272 +184,272 @@ const it = rt.exports, ut = /* @__PURE__ */ te({
184
184
  load: null
185
185
  },
186
186
  emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
187
- setup(r, { expose: e, emit: n }) {
188
- const t = r, l = we(), a = D(), s = D(), c = D(0), f = D(t.loading ?? !1), v = D([]), F = w(() => {
187
+ setup(s, { expose: e, emit: n }) {
188
+ const t = s, l = Ce(), a = D(), r = D(), d = D(0), h = D(t.loading ?? !1), v = D([]), k = x(() => {
189
189
  const o = v.value;
190
- if (!S.value || !o.length)
190
+ if (!R.value || !o.length)
191
191
  return o;
192
- const { page: u, pageSize: x } = E.value, k = (u - 1) * x;
193
- return o.slice(k, k + x);
194
- }), g = D({}), b = D([]), p = D({}), _ = D([]), A = D(null), { mergeSettings: O } = Be(), P = w(() => O("ProTable", { ...t, ...p.value })), T = w(() => {
195
- const o = P.value.pagination;
192
+ const { page: i, pageSize: P } = z.value, F = (i - 1) * P;
193
+ return o.slice(F, F + P);
194
+ }), w = D({}), y = D([]), p = D({}), _ = D([]), A = D(null), { mergeSettings: I } = Be(), S = x(() => I("ProTable", { ...t, ...p.value })), M = x(() => {
195
+ const o = S.value.pagination;
196
196
  return o && typeof o == "object" ? {
197
197
  pageSize: o.pageSize ?? 10,
198
198
  pageSizes: o.pageSizes ?? [10, 20, 50, 100]
199
199
  } : { pageSize: 10, pageSizes: [10, 20, 50, 100] };
200
- }), E = D({
200
+ }), z = D({
201
201
  page: 1,
202
- pageSize: T.value.pageSize,
203
- pageSizes: T.value.pageSizes,
202
+ pageSize: M.value.pageSize,
203
+ pageSizes: M.value.pageSizes,
204
204
  total: 0
205
- }), N = w(() => !!P.value.title || !!l.tableTitle || !!l.toolbar), S = w(() => A.value !== null ? A.value : !!t.pagination && typeof t.pagination == "object"), d = w(() => P.value.pagination && typeof P.value.pagination == "object" ? !!P.value.pagination.small : !1), W = w(() => P.value.pagination && typeof P.value.pagination == "object" ? !!P.value.pagination.background : !1), y = w(() => P.value.rowKey || "id"), K = w(() => new Set(_.value.map((o) => o[y.value]))), q = w(() => b.value.filter((o) => !o.hideInTable && !o.defaultHidden)), Q = w(() => {
206
- const o = /* @__PURE__ */ new Map(), u = (x) => {
207
- for (const k of x)
208
- k.children && k.children.length > 0 ? u(k.children) : k.dataIndex && o.set(k.dataIndex, k);
205
+ }), V = x(() => !!S.value.title || !!l.tableTitle || !!l.toolbar), R = x(() => A.value !== null ? A.value : !!t.pagination && typeof t.pagination == "object"), f = x(() => S.value.pagination && typeof S.value.pagination == "object" ? !!S.value.pagination.small : !1), O = x(() => S.value.pagination && typeof S.value.pagination == "object" ? !!S.value.pagination.background : !1), C = x(() => S.value.rowKey || "id"), q = x(() => new Set(_.value.map((o) => o[C.value]))), L = x(() => y.value.filter((o) => !o.hideInTable && !o.defaultHidden)), Y = x(() => {
206
+ const o = /* @__PURE__ */ new Map(), i = (P) => {
207
+ for (const F of P)
208
+ F.children && F.children.length > 0 ? i(F.children) : F.dataIndex && o.set(F.dataIndex, F);
209
209
  };
210
- return u(q.value), o;
211
- }), J = w(() => Array.from(Q.value.values())), Y = w(() => {
212
- var u, x;
210
+ return i(L.value), o;
211
+ }), G = x(() => Array.from(Y.value.values())), ne = x(() => {
212
+ var i, P;
213
213
  let o = 0;
214
- return P.value.rowSelection && (o += Number(P.value.rowSelection.width) || 48), P.value.showIndexColumn && (o += Number((u = P.value.indexColumnProps) == null ? void 0 : u.width) || 60), P.value.actionColumn && (o += Number((x = P.value.actionColumn) == null ? void 0 : x.width) || 150), o;
215
- }), Z = (o) => typeof o == "number" && o > 0, I = w(() => J.value.filter((u) => h(u) && Z(u.width)).reduce((u, x) => u + (typeof x.width == "number" ? x.width : 0), 0)), V = w(() => J.value.filter((u) => h(u) && typeof u.width == "string").reduce((u, x) => u + (Number(i(x)) || 80), 0)), j = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, C = (o) => {
216
- if (!P.value.spanMethod)
214
+ return S.value.rowSelection && (o += Number(S.value.rowSelection.width) || 48), S.value.showIndexColumn && (o += Number((i = S.value.indexColumnProps) == null ? void 0 : i.width) || 60), S.value.actionColumn && (o += Number((P = S.value.actionColumn) == null ? void 0 : P.width) || 150), o;
215
+ }), J = (o) => typeof o == "number" && o > 0, Z = x(() => G.value.filter((i) => u(i) && J(i.width)).reduce((i, P) => i + (typeof P.width == "number" ? P.width : 0), 0)), X = x(() => G.value.filter((i) => u(i) && typeof i.width == "string").reduce((i, P) => i + (Number(g(P)) || 80), 0)), E = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, W = (o) => {
216
+ if (!S.value.spanMethod)
217
217
  return [1, 1];
218
- const u = Q.value.get(o.column.property);
219
- return P.value.spanMethod({
218
+ const i = Y.value.get(o.column.property);
219
+ return S.value.spanMethod({
220
220
  ...o,
221
- column: u ? { ...u, ...o.column } : { ...o.column, dataIndex: o.column.property, title: o.column.label }
221
+ column: i ? { ...i, ...o.column } : { ...o.column, dataIndex: o.column.property, title: o.column.label }
222
222
  });
223
- }, i = (o) => {
224
- const u = o.width;
225
- if (Z(u) && I.value > 0 && c.value > 0 && typeof u == "number") {
226
- const x = c.value - Y.value - V.value;
227
- let k = Math.floor(x * u / I.value);
228
- const U = j(o.minWidth) ?? 60, L = j(o.maxWidth);
229
- return k = Math.max(U, k), L != null && (k = Math.min(L, k)), k;
223
+ }, g = (o) => {
224
+ const i = o.width;
225
+ if (J(i) && Z.value > 0 && d.value > 0 && typeof i == "number") {
226
+ const P = d.value - ne.value - X.value;
227
+ let F = Math.floor(P * i / Z.value);
228
+ const H = E(o.minWidth) ?? 60, N = E(o.maxWidth);
229
+ return F = Math.max(H, F), N != null && (F = Math.min(N, F)), F;
230
230
  }
231
- if (typeof u == "string") {
232
- const x = j(u) ?? 80, k = j(o.minWidth), U = j(o.maxWidth);
233
- let L = x;
234
- return k != null && (L = Math.max(k, L)), U != null && (L = Math.min(U, L)), L;
231
+ if (typeof i == "string") {
232
+ const P = E(i) ?? 80, F = E(o.minWidth), H = E(o.maxWidth);
233
+ let N = P;
234
+ return F != null && (N = Math.max(F, N)), H != null && (N = Math.min(H, N)), N;
235
235
  }
236
236
  return o.minWidth;
237
- }, h = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, R = w(() => {
238
- var u;
239
- const o = (u = P.value.rowSelection) == null ? void 0 : u.getCheckboxProps;
240
- return o ? F.value.filter((x) => {
241
- var k;
242
- return !((k = o(x)) != null && k.disabled);
243
- }) : F.value;
244
- }), z = w(() => R.value.length > 0), H = w(() => R.value.length === 0 ? !1 : R.value.every((o) => K.value.has(o[y.value]))), G = w(() => {
245
- const o = R.value.filter((u) => K.value.has(u[y.value])).length;
246
- return o > 0 && o < R.value.length;
247
- }), ne = (o) => K.value.has(o[y.value]), le = (o) => {
248
- var u, x, k;
249
- return ((k = (x = (u = P.value.rowSelection) == null ? void 0 : u.getCheckboxProps) == null ? void 0 : x.call(u, o)) == null ? void 0 : k.disabled) ?? !1;
250
- }, X = (o) => {
251
- var u, x, k;
252
- return ((k = (x = (u = P.value.rowSelection) == null ? void 0 : u.getRadioProps) == null ? void 0 : x.call(u, o)) == null ? void 0 : k.disabled) ?? !1;
253
- }, ae = () => {
254
- const o = _.value.map((u) => u[y.value]);
237
+ }, u = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, c = x(() => {
238
+ var i;
239
+ const o = (i = S.value.rowSelection) == null ? void 0 : i.getCheckboxProps;
240
+ return o ? k.value.filter((P) => {
241
+ var F;
242
+ return !((F = o(P)) != null && F.disabled);
243
+ }) : k.value;
244
+ }), b = x(() => c.value.length > 0), j = x(() => c.value.length === 0 ? !1 : c.value.every((o) => q.value.has(o[C.value]))), K = x(() => {
245
+ const o = c.value.filter((i) => q.value.has(i[C.value])).length;
246
+ return o > 0 && o < c.value.length;
247
+ }), U = (o) => q.value.has(o[C.value]), ee = (o) => {
248
+ var i, P, F;
249
+ return ((F = (P = (i = S.value.rowSelection) == null ? void 0 : i.getCheckboxProps) == null ? void 0 : P.call(i, o)) == null ? void 0 : F.disabled) ?? !1;
250
+ }, se = (o) => {
251
+ var i, P, F;
252
+ return ((F = (P = (i = S.value.rowSelection) == null ? void 0 : i.getRadioProps) == null ? void 0 : P.call(i, o)) == null ? void 0 : F.disabled) ?? !1;
253
+ }, Q = () => {
254
+ const o = _.value.map((i) => i[C.value]);
255
255
  n("selection-change", { keys: o, rows: _.value });
256
- }, de = (o, u) => {
257
- const x = o[y.value];
258
- u ? _.value = [..._.value.filter((k) => k[y.value] !== x), o] : _.value = _.value.filter((k) => k[y.value] !== x), ae();
259
- }, ie = (o) => {
260
- _.value = [o], ae();
256
+ }, le = (o, i) => {
257
+ const P = o[C.value];
258
+ i ? _.value = [..._.value.filter((F) => F[C.value] !== P), o] : _.value = _.value.filter((F) => F[C.value] !== P), Q();
259
+ }, _e = (o) => {
260
+ _.value = [o], Q();
261
261
  }, fe = (o) => {
262
262
  if (o) {
263
- const u = new Set(_.value.map((k) => k[y.value])), x = R.value.filter((k) => !u.has(k[y.value]));
264
- _.value = [..._.value, ...x];
263
+ const i = new Set(_.value.map((F) => F[C.value])), P = c.value.filter((F) => !i.has(F[C.value]));
264
+ _.value = [..._.value, ...P];
265
265
  } else {
266
- const u = new Set(F.value.map((x) => x[y.value]));
267
- _.value = _.value.filter((x) => !u.has(x[y.value]));
266
+ const i = new Set(k.value.map((P) => P[C.value]));
267
+ _.value = _.value.filter((P) => !i.has(P[C.value]));
268
268
  }
269
- ae();
270
- }, oe = async (o) => {
269
+ Q();
270
+ }, ae = async (o) => {
271
271
  if (!t.api) {
272
272
  if (t.dataSource)
273
273
  return;
274
274
  v.value = [];
275
275
  return;
276
276
  }
277
- f.value = !0;
277
+ h.value = !0;
278
278
  try {
279
- const u = P.value.fetchSetting ?? {}, x = u.pageField ?? "page", k = u.sizeField ?? "pageSize", U = u.listField ?? "list", L = u.totalField ?? "total", se = {
280
- [x]: (o == null ? void 0 : o.page) ?? E.value.page,
281
- [k]: (o == null ? void 0 : o.pageSize) ?? E.value.pageSize,
279
+ const i = S.value.fetchSetting ?? {}, P = i.pageField ?? "page", F = i.sizeField ?? "pageSize", H = i.listField ?? "list", N = i.totalField ?? "total", re = {
280
+ [P]: (o == null ? void 0 : o.page) ?? z.value.page,
281
+ [F]: (o == null ? void 0 : o.pageSize) ?? z.value.pageSize,
282
282
  ...t.searchInfo,
283
283
  ...o == null ? void 0 : o.searchInfo
284
284
  };
285
- (o == null ? void 0 : o.page) != null && (E.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (E.value.pageSize = o.pageSize);
286
- const ue = t.beforeFetch ? t.beforeFetch(se) : se, Me = await t.api(ue);
287
- g.value = Me || {};
288
- const Re = t.afterFetch ? t.afterFetch(Me) : Me, ze = Re[U] ?? Re.items ?? Re.list ?? [], Ee = Re[L] ?? 0;
289
- v.value = ze, E.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
290
- } catch (u) {
291
- v.value = [], n("fetch-error", u);
285
+ (o == null ? void 0 : o.page) != null && (z.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (z.value.pageSize = o.pageSize);
286
+ const ce = t.beforeFetch ? t.beforeFetch(re) : re, Te = await t.api(ce);
287
+ w.value = Te || {};
288
+ const Re = t.afterFetch ? t.afterFetch(Te) : Te, ze = Re[H] ?? Re.items ?? Re.list ?? [], Ie = Re[N] ?? 0;
289
+ v.value = ze, z.value.total = Ie, n("fetch-success", { items: ze, total: Ie });
290
+ } catch (i) {
291
+ v.value = [], n("fetch-error", i);
292
292
  } finally {
293
- f.value = !1;
293
+ h.value = !1;
294
294
  }
295
- }, be = () => oe(void 0), ce = (o) => {
296
- P.value.clearSelectOnPageChange && (_.value = []), E.value.pageSize = o, E.value.page = 1, oe(void 0);
297
- }, Ce = (o) => {
298
- P.value.clearSelectOnPageChange && (_.value = []), E.value.page = o, oe(void 0);
299
- }, xe = (o, u, x) => n("row-click", o, x), Pe = (o, u, x) => n("row-dblclick", o, x), Se = ({ prop: o, order: u }) => n("sort-change", { prop: o, order: u }), ye = (o, u) => n("expand-change", o, u), pe = {
295
+ }, pe = () => ae(void 0), ue = (o) => {
296
+ S.value.clearSelectOnPageChange && (_.value = []), z.value.pageSize = o, z.value.page = 1, ae(void 0);
297
+ }, we = (o) => {
298
+ S.value.clearSelectOnPageChange && (_.value = []), z.value.page = o, ae(void 0);
299
+ }, de = (o, i, P) => n("row-click", o, P), Pe = (o, i, P) => n("row-dblclick", o, P), Se = ({ prop: o, order: i }) => n("sort-change", { prop: o, order: i }), xe = (o, i) => n("expand-change", o, i), me = {
300
300
  setProps: (o) => {
301
301
  p.value = { ...p.value, ...o };
302
302
  },
303
- reload: (o) => oe(o),
303
+ reload: (o) => ae(o),
304
304
  redoHeight: () => {
305
- var o, u;
306
- (u = (o = a.value) == null ? void 0 : o.doLayout) == null || u.call(o);
305
+ var o, i;
306
+ (i = (o = a.value) == null ? void 0 : o.doLayout) == null || i.call(o);
307
307
  },
308
308
  setLoading: (o) => {
309
- f.value = o;
309
+ h.value = o;
310
310
  },
311
311
  /** 返回全量数据(API 模式为服务端返回的当前页数据,本地模式为原始全量数据) */
312
312
  getDataSource: () => v.value,
313
- getRawDataSource: () => g.value,
313
+ getRawDataSource: () => w.value,
314
314
  /** 设置本地全量数据,同时同步 total */
315
315
  setTableData: (o) => {
316
- v.value = o ?? [], t.pagination !== !1 && (E.value.total = (o ?? []).length);
316
+ v.value = o ?? [], t.pagination !== !1 && (z.value.total = (o ?? []).length);
317
317
  },
318
- getColumns: () => b.value,
318
+ getColumns: () => y.value,
319
319
  setColumns: (o) => {
320
320
  if (Array.isArray(o) && o.length > 0 && typeof o[0] == "string") {
321
- const u = o, x = (t.columns ?? []).filter((U) => u.includes(U.key ?? U.dataIndex)), k = u.map((U) => x.find((L) => (L.key ?? L.dataIndex) === U)).filter(Boolean);
322
- k.length && (b.value = k);
321
+ const i = o, P = (t.columns ?? []).filter((H) => i.includes(H.key ?? H.dataIndex)), F = i.map((H) => P.find((N) => (N.key ?? N.dataIndex) === H)).filter(Boolean);
322
+ F.length && (y.value = F);
323
323
  } else
324
- b.value = o ?? [];
324
+ y.value = o ?? [];
325
325
  },
326
326
  setPagination: (o) => {
327
- o != null && o.page && (E.value.page = o.page), o != null && o.pageSize && (E.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (E.value.total = o.total);
327
+ o != null && o.page && (z.value.page = o.page), o != null && o.pageSize && (z.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (z.value.total = o.total);
328
328
  },
329
- getSelectRowKeys: () => _.value.map((o) => o[y.value]),
329
+ getSelectRowKeys: () => _.value.map((o) => o[C.value]),
330
330
  getSelectRows: () => _.value,
331
331
  clearSelectedRowKeys: () => {
332
- _.value = [], ae();
332
+ _.value = [], Q();
333
333
  },
334
334
  setSelectedRowKeys: (o) => {
335
- const u = new Set(o), x = v.value.filter((k) => u.has(k[y.value]));
336
- o.forEach((k) => {
337
- x.some((U) => U[y.value] === k) || x.push({ [y.value]: k });
338
- }), _.value = x, ae();
335
+ const i = new Set(o), P = v.value.filter((F) => i.has(F[C.value]));
336
+ o.forEach((F) => {
337
+ P.some((H) => H[C.value] === F) || P.push({ [C.value]: F });
338
+ }), _.value = P, Q();
339
339
  },
340
340
  deleteSelectRowByKey: (o) => {
341
- _.value = _.value.filter((u) => u[y.value] !== o), ae();
341
+ _.value = _.value.filter((i) => i[C.value] !== o), Q();
342
342
  },
343
343
  /** index 为当前页索引,自动转换为全量索引 */
344
- updateTableData: (o, u, x) => {
345
- const { page: k, pageSize: U } = E.value, L = (k - 1) * U + o;
346
- L < 0 || L >= v.value.length || (v.value = [...v.value], v.value[L] = { ...v.value[L], [u]: x });
344
+ updateTableData: (o, i, P) => {
345
+ const { page: F, pageSize: H } = z.value, N = (F - 1) * H + o;
346
+ N < 0 || N >= v.value.length || (v.value = [...v.value], v.value[N] = { ...v.value[N], [i]: P });
347
347
  },
348
- updateTableDataRecord: (o, u) => {
349
- const x = v.value.findIndex((k) => k[y.value] === o);
350
- if (!(x < 0))
351
- return v.value = [...v.value], v.value[x] = { ...v.value[x], ...u }, v.value[x];
348
+ updateTableDataRecord: (o, i) => {
349
+ const P = v.value.findIndex((F) => F[C.value] === o);
350
+ if (!(P < 0))
351
+ return v.value = [...v.value], v.value[P] = { ...v.value[P], ...i }, v.value[P];
352
352
  },
353
353
  deleteTableDataRecord: (o) => {
354
- const u = Array.isArray(o) ? o : [o], x = new Set(u);
355
- v.value = v.value.filter((k) => !x.has(k[y.value])), t.pagination !== !1 && (E.value.total = v.value.length);
354
+ const i = Array.isArray(o) ? o : [o], P = new Set(i);
355
+ v.value = v.value.filter((F) => !P.has(F[C.value])), t.pagination !== !1 && (z.value.total = v.value.length);
356
356
  },
357
- insertTableDataRecord: (o, u) => {
358
- const x = [...v.value];
359
- return u == null || u >= x.length ? x.push(o) : x.splice(u, 0, o), v.value = x, t.pagination !== !1 && (E.value.total = v.value.length), o;
357
+ insertTableDataRecord: (o, i) => {
358
+ const P = [...v.value];
359
+ return i == null || i >= P.length ? P.push(o) : P.splice(i, 0, o), v.value = P, t.pagination !== !1 && (z.value.total = v.value.length), o;
360
360
  },
361
- getPaginationRef: () => S.value ? { page: E.value.page, pageSize: Number(E.value.pageSize) || 10, total: E.value.total } : !1,
362
- getShowPagination: () => S.value,
361
+ getPaginationRef: () => R.value ? { page: z.value.page, pageSize: Number(z.value.pageSize) || 10, total: z.value.total } : !1,
362
+ getShowPagination: () => R.value,
363
363
  setShowPagination: (o) => {
364
364
  A.value = o;
365
365
  },
366
- getRowSelection: () => P.value.rowSelection,
366
+ getRowSelection: () => S.value.rowSelection,
367
367
  expandAll: () => {
368
- var k;
369
- const o = ((k = P.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (U) => {
370
- const L = [];
371
- return U.forEach((se) => {
372
- L.push(se);
373
- const ue = se[o];
374
- Array.isArray(ue) && ue.length > 0 && L.push(...u(ue));
375
- }), L;
368
+ var F;
369
+ const o = ((F = S.value.treeProps) == null ? void 0 : F.children) ?? "children", i = (H) => {
370
+ const N = [];
371
+ return H.forEach((re) => {
372
+ N.push(re);
373
+ const ce = re[o];
374
+ Array.isArray(ce) && ce.length > 0 && N.push(...i(ce));
375
+ }), N;
376
376
  };
377
- u(v.value).forEach((U) => {
378
- var L, se;
379
- return (se = (L = a.value) == null ? void 0 : L.toggleRowExpansion) == null ? void 0 : se.call(L, U, !0);
377
+ i(v.value).forEach((H) => {
378
+ var N, re;
379
+ return (re = (N = a.value) == null ? void 0 : N.toggleRowExpansion) == null ? void 0 : re.call(N, H, !0);
380
380
  });
381
381
  },
382
382
  collapseAll: () => {
383
- var k;
384
- const o = ((k = P.value.treeProps) == null ? void 0 : k.children) ?? "children", u = (U) => {
385
- const L = [];
386
- return U.forEach((se) => {
387
- L.push(se);
388
- const ue = se[o];
389
- Array.isArray(ue) && ue.length > 0 && L.push(...u(ue));
390
- }), L;
383
+ var F;
384
+ const o = ((F = S.value.treeProps) == null ? void 0 : F.children) ?? "children", i = (H) => {
385
+ const N = [];
386
+ return H.forEach((re) => {
387
+ N.push(re);
388
+ const ce = re[o];
389
+ Array.isArray(ce) && ce.length > 0 && N.push(...i(ce));
390
+ }), N;
391
391
  };
392
- u(v.value).forEach((U) => {
393
- var L, se;
394
- return (se = (L = a.value) == null ? void 0 : L.toggleRowExpansion) == null ? void 0 : se.call(L, U, !1);
392
+ i(v.value).forEach((H) => {
393
+ var N, re;
394
+ return (re = (N = a.value) == null ? void 0 : N.toggleRowExpansion) == null ? void 0 : re.call(N, H, !1);
395
395
  });
396
396
  }
397
397
  };
398
- e(pe);
399
- const me = () => {
400
- const o = (u, x = "") => u.map((k, U) => {
401
- const L = `${k.dataIndex}`;
398
+ e(me);
399
+ const ve = () => {
400
+ const o = (i, P = "") => i.map((F, H) => {
401
+ const N = `${F.dataIndex}`;
402
402
  return {
403
- ...k,
404
- dataIndex: L,
405
- children: k.children ? o(k.children, L) : void 0
403
+ ...F,
404
+ dataIndex: N,
405
+ children: F.children ? o(F.children, N) : void 0
406
406
  };
407
407
  });
408
- b.value = o(t.columns ?? []);
408
+ y.value = o(t.columns ?? []);
409
409
  }, m = () => {
410
- t.api && P.value.immediate !== !1 ? oe(void 0) : t.dataSource && (v.value = [...t.dataSource], !t.api && t.pagination !== !1 && (E.value.total = t.dataSource.length));
410
+ t.api && S.value.immediate !== !1 ? ae(void 0) : t.dataSource && (v.value = [...t.dataSource], !t.api && t.pagination !== !1 && (z.value.total = t.dataSource.length));
411
411
  }, B = () => {
412
- s.value && (c.value = s.value.offsetWidth || 0);
412
+ r.value && (d.value = r.value.offsetWidth || 0);
413
413
  };
414
- let M = null, $ = null;
415
- return ge(() => {
416
- me(), n("register", pe), m(), typeof window < "u" && (window.addEventListener("resize", B), M = new ResizeObserver(B), Ke(() => {
417
- B(), $ = s.value, $ && (M == null || M.observe($));
414
+ let T = null, $ = null;
415
+ return ye(() => {
416
+ ve(), n("register", me), m(), typeof window < "u" && (window.addEventListener("resize", B), T = new ResizeObserver(B), De(() => {
417
+ B(), $ = r.value, $ && (T == null || T.observe($));
418
418
  }));
419
- }), Fe(() => {
420
- typeof window < "u" && (window.removeEventListener("resize", B), M && $ && (M.unobserve($), $ = null));
421
- }), ee(() => t.columns, me, { deep: !0 }), ee(() => t.dataSource, () => {
422
- !t.api && t.dataSource && (v.value = [...t.dataSource], t.pagination !== !1 && (E.value.total = t.dataSource.length));
423
- }, { deep: !0 }), ee(() => t.loading, (o) => {
424
- f.value = o ?? !1;
425
- }), { __sfc: !0, props: t, emit: n, slots: l, tableRef: a, tableWrapRef: s, containerWidth: c, loading: f, localFullData: v, innerData: F, rawDataSource: g, innerColumns: b, innerProps: p, selectedRows: _, showPaginationRef: A, mergeSettings: O, effectiveProps: P, defaultPagination: T, pagination: E, showTitleBar: N, showPagination: S, paginationSmall: d, paginationBackground: W, rowKeyField: y, selectedKeysSet: K, displayColumns: q, flatColumnsMap: Q, allFlatColumns: J, fixedColumnsWidth: Y, isRatioWidth: Z, totalRatio: I, fixedDataColumnsWidth: V, parseWidthPx: j, spanMethodAdapter: C, getColumnWidth: i, shouldShowColumn: h, selectableRows: R, hasSelectableRows: z, isAllCurrentPageSelected: H, isIndeterminate: G, isRowSelected: ne, getCheckboxDisabled: le, getRadioDisabled: X, emitSelectionChange: ae, handleCheckboxChange: de, handleRadioSelect: ie, handleSelectAll: fe, fetchData: oe, handleReload: be, handleSizeChange: ce, handleCurrentChange: Ce, handleRowClick: xe, handleRowDblclick: Pe, handleSortChange: Se, handleExpandChange: ye, tableAction: pe, syncColumns: me, loadData: m, updateContainerWidth: B, resizeObserver: M, observedEl: $, TableColumnGroup: it, BodyCellRenderer: qe };
419
+ }), ke(() => {
420
+ typeof window < "u" && (window.removeEventListener("resize", B), T && $ && (T.unobserve($), $ = null));
421
+ }), te(() => t.columns, ve, { deep: !0 }), te(() => t.dataSource, () => {
422
+ !t.api && t.dataSource && (v.value = [...t.dataSource], t.pagination !== !1 && (z.value.total = t.dataSource.length));
423
+ }, { deep: !0 }), te(() => t.loading, (o) => {
424
+ h.value = o ?? !1;
425
+ }), { __sfc: !0, props: t, emit: n, slots: l, tableRef: a, tableWrapRef: r, containerWidth: d, loading: h, localFullData: v, innerData: k, rawDataSource: w, innerColumns: y, innerProps: p, selectedRows: _, showPaginationRef: A, mergeSettings: I, effectiveProps: S, defaultPagination: M, pagination: z, showTitleBar: V, showPagination: R, paginationSmall: f, paginationBackground: O, rowKeyField: C, selectedKeysSet: q, displayColumns: L, flatColumnsMap: Y, allFlatColumns: G, fixedColumnsWidth: ne, isRatioWidth: J, totalRatio: Z, fixedDataColumnsWidth: X, parseWidthPx: E, spanMethodAdapter: W, getColumnWidth: g, shouldShowColumn: u, selectableRows: c, hasSelectableRows: b, isAllCurrentPageSelected: j, isIndeterminate: K, isRowSelected: U, getCheckboxDisabled: ee, getRadioDisabled: se, emitSelectionChange: Q, handleCheckboxChange: le, handleRadioSelect: _e, handleSelectAll: fe, fetchData: ae, handleReload: pe, handleSizeChange: ue, handleCurrentChange: we, handleRowClick: de, handleRowDblclick: Pe, handleSortChange: Se, handleExpandChange: xe, tableAction: me, syncColumns: ve, loadData: m, updateContainerWidth: B, resizeObserver: T, observedEl: $, TableColumnGroup: it, BodyCellRenderer: qe };
426
426
  }
427
427
  });
428
428
  var ct = function() {
429
- var l, a, s, c;
429
+ var l, a, r, d;
430
430
  var e = this, n = e._self._c, t = e._self._setupProxy;
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(f, v) {
432
- return n("div", { key: v }, [e._v(e._s(f))]);
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(h, v) {
432
+ return n("div", { key: v }, [e._v(e._s(h))]);
433
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() {
434
- var f;
435
- return [((f = t.effectiveProps.tableSetting) == null ? void 0 : f.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
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(f) {
434
+ var h;
435
+ return [((h = t.effectiveProps.tableSetting) == null ? void 0 : h.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
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(h) {
437
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")];
438
- } }, { key: "default", fn: function(f) {
438
+ } }, { key: "default", fn: function(h) {
439
439
  var v;
440
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(f.row), disabled: t.getCheckboxDisabled(f.row) }, on: { change: (F) => t.handleCheckboxChange(f.row, F) }, nativeOn: { click: function(F) {
441
- F.stopPropagation();
442
- } } }) : n("el-radio", { attrs: { value: (v = t.selectedRows[0]) == null ? void 0 : v[t.rowKeyField], label: f.row[t.rowKeyField], disabled: t.getRadioDisabled(f.row) }, on: { change: function(F) {
443
- return t.handleRadioSelect(f.row);
444
- } }, nativeOn: { click: function(F) {
445
- F.stopPropagation();
440
+ return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(h.row), disabled: t.getCheckboxDisabled(h.row) }, on: { change: (k) => t.handleCheckboxChange(h.row, k) }, nativeOn: { click: function(k) {
441
+ k.stopPropagation();
442
+ } } }) : n("el-radio", { attrs: { value: (v = t.selectedRows[0]) == null ? void 0 : v[t.rowKeyField], label: h.row[t.rowKeyField], disabled: t.getRadioDisabled(h.row) }, on: { change: function(k) {
443
+ return t.handleRadioSelect(h.row);
444
+ } }, nativeOn: { click: function(k) {
445
+ k.stopPropagation();
446
446
  } } }, [n("span")])];
447
- } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((l = t.effectiveProps.indexColumnProps) == null ? void 0 : l.title) || "序号", width: ((a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.width) || 60, fixed: (s = t.effectiveProps.indexColumnProps) == null ? void 0 : s.fixed, align: ((c = t.effectiveProps.indexColumnProps) == null ? void 0 : c.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(f) {
448
- return [t.shouldShowColumn(f) ? n(t.TableColumnGroup, { key: f.key || f.dataIndex || f.title, attrs: { column: f, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
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(f) {
450
- return [e.$scopedSlots.action ? e._t("action", null, { record: f.row, column: t.effectiveProps.actionColumn, index: f.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: f.row, index: f.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
447
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((l = t.effectiveProps.indexColumnProps) == null ? void 0 : l.title) || "序号", width: ((a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.width) || 60, fixed: (r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.fixed, align: ((d = t.effectiveProps.indexColumnProps) == null ? void 0 : d.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(h) {
448
+ return [t.shouldShowColumn(h) ? n(t.TableColumnGroup, { key: h.key || h.dataIndex || h.title, attrs: { column: h, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
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(h) {
450
+ return [e.$scopedSlots.action ? e._t("action", null, { record: h.row, column: t.effectiveProps.actionColumn, index: h.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: h.row, index: h.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
451
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()]);
452
- }, dt = [], ft = /* @__PURE__ */ re(
452
+ }, dt = [], ft = /* @__PURE__ */ ie(
453
453
  ut,
454
454
  ct,
455
455
  dt,
@@ -459,68 +459,68 @@ var ct = function() {
459
459
  null,
460
460
  null
461
461
  );
462
- const He = ft.exports, Ve = (r) => Array.isArray(r) ? r.length > 0 : r != null && String(r).trim() !== "", Oe = (r) => Array.isArray(r) ? r.map((e) => String(e)).join(", ") : r == null ? "" : typeof r == "object" ? JSON.stringify(r) : String(r), De = (r, e) => {
463
- if (!r)
462
+ const He = ft.exports, Oe = (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), Ee = (s, e) => {
463
+ if (!s)
464
464
  return null;
465
- if (r === !0)
465
+ if (s === !0)
466
466
  return {
467
- content: Oe(e),
467
+ content: Ne(e),
468
468
  placement: "top",
469
469
  effect: "dark",
470
- disabled: !Ve(e)
470
+ disabled: !Oe(e)
471
471
  };
472
- if (typeof r == "string")
472
+ if (typeof s == "string")
473
473
  return {
474
- content: r,
474
+ content: s,
475
475
  placement: "top",
476
476
  effect: "dark"
477
477
  };
478
- const n = { ...r };
479
- return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Oe(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 = !Ve(n.content)), n;
480
- }, pt = /* @__PURE__ */ te({
478
+ const n = { ...s };
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 = !Oe(n.content)), n;
480
+ }, pt = /* @__PURE__ */ oe({
481
481
  __name: "TableAction",
482
482
  props: {
483
483
  actions: { default: () => [] },
484
484
  dropDownActions: { default: () => [] },
485
485
  stopButtonPropagation: { type: Boolean, default: !1 }
486
486
  },
487
- setup(r) {
488
- const e = r, n = (p) => De(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", l = (p) => p.filter((_) => {
487
+ setup(s) {
488
+ const e = s, n = (p) => Ee(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", l = (p) => p.filter((_) => {
489
489
  const { ifShow: A } = _;
490
490
  return typeof A == "boolean" ? A : typeof A == "function" ? A(_) : !0;
491
- }), a = w(() => l(e.actions || [])), s = w(() => l(e.dropDownActions || [])), c = (p, _) => {
491
+ }), a = x(() => l(e.actions || [])), r = x(() => l(e.dropDownActions || [])), d = (p, _) => {
492
492
  var A;
493
493
  e.stopButtonPropagation && _.stopPropagation(), (A = p.onClick) == null || A.call(p, _);
494
- }, f = (p, _) => {
495
- c(p, _);
494
+ }, h = (p, _) => {
495
+ d(p, _);
496
496
  }, v = (p, _, A) => {
497
- var O, P, T, E;
498
- e.stopButtonPropagation && A.stopPropagation(), p.popConfirm && (_ === "confirm" ? (P = (O = p.popConfirm).confirm) == null || P.call(O) : (E = (T = p.popConfirm).cancel) == null || E.call(T));
497
+ var I, S, M, z;
498
+ e.stopButtonPropagation && A.stopPropagation(), p.popConfirm && (_ === "confirm" ? (S = (I = p.popConfirm).confirm) == null || S.call(I) : (z = (M = p.popConfirm).cancel) == null || z.call(M));
499
499
  };
500
- return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: l, visibleActions: a, visibleDropDownActions: s, handleClick: c, handleActionClick: f, handlePopConfirm: v, handlePopConfirmConfirm: (p, _) => {
500
+ return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: l, visibleActions: a, visibleDropDownActions: r, handleClick: d, handleActionClick: h, handlePopConfirm: v, handlePopConfirmConfirm: (p, _) => {
501
501
  v(p, "confirm", _);
502
502
  }, handlePopConfirmCancel: (p, _) => {
503
503
  v(p, "cancel", _);
504
504
  }, handleDropdownCommand: (p) => {
505
- var O;
506
- const _ = Number(p), A = s.value[_];
505
+ var I;
506
+ const _ = Number(p), A = r.value[_];
507
507
  if (!(!A || A.disabled)) {
508
508
  if (A.popConfirm) {
509
- const P = A.popConfirm.title, T = A.popConfirm.okText || "确定", E = A.popConfirm.cancelText || "取消";
510
- lt.confirm(P, "提示", {
511
- confirmButtonText: T,
512
- cancelButtonText: E,
509
+ const S = A.popConfirm.title, M = A.popConfirm.okText || "确定", z = A.popConfirm.cancelText || "取消";
510
+ lt.confirm(S, "提示", {
511
+ confirmButtonText: M,
512
+ cancelButtonText: z,
513
513
  type: "warning"
514
514
  }).then(() => {
515
- var N, S;
516
- return (S = (N = A.popConfirm) == null ? void 0 : N.confirm) == null ? void 0 : S.call(N);
515
+ var V, R;
516
+ return (R = (V = A.popConfirm) == null ? void 0 : V.confirm) == null ? void 0 : R.call(V);
517
517
  }).catch(() => {
518
- var N, S;
519
- return (S = (N = A.popConfirm) == null ? void 0 : N.cancel) == null ? void 0 : S.call(N);
518
+ var V, R;
519
+ return (R = (V = A.popConfirm) == null ? void 0 : V.cancel) == null ? void 0 : R.call(V);
520
520
  });
521
521
  return;
522
522
  }
523
- (O = A.onClick) == null || O.call(A, {});
523
+ (I = A.onClick) == null || I.call(A, {});
524
524
  }
525
525
  } };
526
526
  }
@@ -528,19 +528,19 @@ const He = ft.exports, Ve = (r) => Array.isArray(r) ? r.length > 0 : r != null &
528
528
  var mt = function() {
529
529
  var e = this, n = e._self._c, t = e._self._setupProxy;
530
530
  return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(l, a) {
531
- return n("span", { key: `action-${a}`, staticClass: "ecp-table-action__item" }, [l.popConfirm ? n("el-popconfirm", { attrs: { title: l.popConfirm.title, "confirm-button-text": l.popConfirm.okText || "确定", "cancel-button-text": l.popConfirm.cancelText || "取消" }, on: { confirm: function(s) {
532
- return t.handlePopConfirmConfirm(l, s);
533
- }, cancel: function(s) {
534
- return t.handlePopConfirmCancel(l, s);
535
- } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(s) {
536
- return t.handleActionClick(l, s);
537
- } } }, "el-button", l.props, !1), [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])], 1)], 1)]) : n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(s) {
538
- return t.handleActionClick(l, s);
531
+ return n("span", { key: `action-${a}`, staticClass: "ecp-table-action__item" }, [l.popConfirm ? n("el-popconfirm", { attrs: { title: l.popConfirm.title, "confirm-button-text": l.popConfirm.okText || "确定", "cancel-button-text": l.popConfirm.cancelText || "取消" }, on: { confirm: function(r) {
532
+ return t.handlePopConfirmConfirm(l, r);
533
+ }, cancel: function(r) {
534
+ return t.handlePopConfirmCancel(l, r);
535
+ } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(r) {
536
+ return t.handleActionClick(l, r);
537
+ } } }, "el-button", l.props, !1), [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])], 1)], 1)]) : n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(r) {
538
+ return t.handleActionClick(l, r);
539
539
  } } }, "el-button", l.props, !1), [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])], 1), l.divider ? n("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
540
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(l, a) {
541
541
  return n("el-dropdown-item", { key: `dropdown-${a}`, attrs: { command: a, disabled: l.disabled, divided: !!l.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])]);
542
542
  }), 1)], 1) : e._e()], 2);
543
- }, vt = [], ht = /* @__PURE__ */ re(
543
+ }, vt = [], ht = /* @__PURE__ */ ie(
544
544
  pt,
545
545
  mt,
546
546
  vt,
@@ -551,58 +551,58 @@ var mt = function() {
551
551
  null
552
552
  );
553
553
  const Ge = ht.exports;
554
- function hn(r) {
555
- const e = D(null), n = () => r ? _e(r) : void 0, t = () => {
556
- const s = _e(e);
557
- if (!s)
554
+ function hn(s) {
555
+ const e = D(null), n = () => s ? be(s) : void 0, t = () => {
556
+ const r = be(e);
557
+ if (!r)
558
558
  throw new Error("ProTable instance has not been registered");
559
- return s;
560
- }, l = (s) => {
561
- e.value = s;
562
- const c = n();
563
- c && Object.keys(c).length > 0 && s.setProps(c);
559
+ return r;
560
+ }, l = (r) => {
561
+ e.value = r;
562
+ const d = n();
563
+ d && Object.keys(d).length > 0 && r.setProps(d);
564
564
  };
565
- return r && ee(
565
+ return s && te(
566
566
  () => n(),
567
- (s) => {
568
- s && e.value && e.value.setProps(s);
567
+ (r) => {
568
+ r && e.value && e.value.setProps(r);
569
569
  },
570
570
  { deep: !0 }
571
571
  ), [l, {
572
- setProps: (s) => t().setProps(s),
573
- reload: (s) => t().reload(s),
572
+ setProps: (r) => t().setProps(r),
573
+ reload: (r) => t().reload(r),
574
574
  redoHeight: () => t().redoHeight(),
575
- setLoading: (s) => t().setLoading(s),
575
+ setLoading: (r) => t().setLoading(r),
576
576
  getDataSource: () => t().getDataSource(),
577
577
  getRawDataSource: () => t().getRawDataSource(),
578
- setTableData: (s) => t().setTableData(s),
578
+ setTableData: (r) => t().setTableData(r),
579
579
  getColumns: () => t().getColumns(),
580
- setColumns: (s) => t().setColumns(s),
581
- setPagination: (s) => t().setPagination(s),
580
+ setColumns: (r) => t().setColumns(r),
581
+ setPagination: (r) => t().setPagination(r),
582
582
  getSelectRowKeys: () => t().getSelectRowKeys(),
583
583
  getSelectRows: () => t().getSelectRows(),
584
584
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
585
- setSelectedRowKeys: (s) => t().setSelectedRowKeys(s),
586
- deleteSelectRowByKey: (s) => t().deleteSelectRowByKey(s),
587
- updateTableData: (s, c, f) => t().updateTableData(s, c, f),
588
- updateTableDataRecord: (s, c) => t().updateTableDataRecord(s, c),
589
- deleteTableDataRecord: (s) => t().deleteTableDataRecord(s),
590
- insertTableDataRecord: (s, c) => t().insertTableDataRecord(s, c),
585
+ setSelectedRowKeys: (r) => t().setSelectedRowKeys(r),
586
+ deleteSelectRowByKey: (r) => t().deleteSelectRowByKey(r),
587
+ updateTableData: (r, d, h) => t().updateTableData(r, d, h),
588
+ updateTableDataRecord: (r, d) => t().updateTableDataRecord(r, d),
589
+ deleteTableDataRecord: (r) => t().deleteTableDataRecord(r),
590
+ insertTableDataRecord: (r, d) => t().insertTableDataRecord(r, d),
591
591
  getPaginationRef: () => t().getPaginationRef(),
592
592
  getShowPagination: () => t().getShowPagination(),
593
- setShowPagination: (s) => t().setShowPagination(s),
593
+ setShowPagination: (r) => t().setShowPagination(r),
594
594
  getRowSelection: () => t().getRowSelection(),
595
595
  expandAll: () => {
596
- var s, c;
597
- return (c = (s = t()).expandAll) == null ? void 0 : c.call(s);
596
+ var r, d;
597
+ return (d = (r = t()).expandAll) == null ? void 0 : d.call(r);
598
598
  },
599
599
  collapseAll: () => {
600
- var s, c;
601
- return (c = (s = t()).collapseAll) == null ? void 0 : c.call(s);
600
+ var r, d;
601
+ return (d = (r = t()).collapseAll) == null ? void 0 : d.call(r);
602
602
  }
603
603
  }];
604
604
  }
605
- const _t = /* @__PURE__ */ te({
605
+ const _t = /* @__PURE__ */ oe({
606
606
  __name: "ApiSelect",
607
607
  props: {
608
608
  value: null,
@@ -618,23 +618,23 @@ const _t = /* @__PURE__ */ te({
618
618
  multiple: { type: Boolean }
619
619
  },
620
620
  emits: ["input", "change"],
621
- setup(r, { expose: e }) {
622
- const n = r, t = D(!1), l = D([]), a = D([]), s = (g) => g == null ? "null" : JSON.stringify(c(g)), c = (g) => Array.isArray(g) ? g.map(c) : g !== null && typeof g == "object" ? Object.keys(g).sort().reduce((b, p) => (b[p] = c(g[p]), b), {}) : g, f = D(s(n.params ?? null)), v = (g) => {
623
- n.lazy && g && (s(n.params ?? null) !== f.value || l.value.length === 0) && F();
624
- }, F = async () => {
621
+ setup(s, { expose: e }) {
622
+ const n = s, t = D(!1), l = D([]), a = D([]), r = (w) => w == null ? "null" : JSON.stringify(d(w)), d = (w) => Array.isArray(w) ? w.map(d) : w !== null && typeof w == "object" ? Object.keys(w).sort().reduce((y, p) => (y[p] = d(w[p]), y), {}) : w, h = D(r(n.params ?? null)), v = (w) => {
623
+ n.lazy && w && (r(n.params ?? null) !== h.value || l.value.length === 0) && k();
624
+ }, k = async () => {
625
625
  if (n.api) {
626
626
  t.value = !0;
627
627
  try {
628
- const g = await n.api(n.params), b = Array.isArray(g) ? g : (g == null ? void 0 : g.list) ?? (g == null ? void 0 : g.data) ?? [];
629
- a.value = b;
628
+ const w = await n.api(n.params), y = Array.isArray(w) ? w : (w == null ? void 0 : w.list) ?? (w == null ? void 0 : w.data) ?? [];
629
+ a.value = y;
630
630
  const p = n.labelField ?? "label", _ = n.valueField ?? "value";
631
- l.value = b.map((A) => {
632
- const O = A;
631
+ l.value = y.map((A) => {
632
+ const I = A;
633
633
  return {
634
- label: String(O[p] ?? O.label ?? ""),
635
- value: O[_] ?? O.value
634
+ label: String(I[p] ?? I.label ?? ""),
635
+ value: I[_] ?? I.value
636
636
  };
637
- }), f.value = s(n.params ?? null);
637
+ }), h.value = r(n.params ?? null);
638
638
  } finally {
639
639
  t.value = !1;
640
640
  }
@@ -644,18 +644,18 @@ const _t = /* @__PURE__ */ te({
644
644
  options: l,
645
645
  rawOptions: a,
646
646
  loading: t,
647
- fetchOptions: F
648
- }), ge(() => {
649
- n.lazy || F();
650
- }), ee(
647
+ fetchOptions: k
648
+ }), ye(() => {
649
+ n.lazy || k();
650
+ }), te(
651
651
  () => n.api,
652
652
  () => {
653
- n.lazy ? (l.value = [], a.value = []) : F();
653
+ n.lazy ? (l.value = [], a.value = []) : k();
654
654
  },
655
655
  { deep: !0 }
656
- ), ee(() => n.params, () => {
657
- s(n.params ?? null) !== f.value && (n.lazy ? (l.value = [], a.value = []) : F());
658
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: l, rawOptions: a, sortStringify: s, sortKeys: c, lastFetchedParamsKey: f, onVisibleChange: v, fetchOptions: F };
656
+ ), te(() => n.params, () => {
657
+ r(n.params ?? null) !== h.value && (n.lazy ? (l.value = [], a.value = []) : k());
658
+ }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: l, rawOptions: a, sortStringify: r, sortKeys: d, lastFetchedParamsKey: h, onVisibleChange: v, fetchOptions: k };
659
659
  }
660
660
  });
661
661
  var gt = function() {
@@ -667,7 +667,7 @@ var gt = function() {
667
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(l) {
668
668
  return n("el-option", { key: String(l.value), attrs: { label: l.label, value: l.value } });
669
669
  }), 1);
670
- }, bt = [], yt = /* @__PURE__ */ re(
670
+ }, bt = [], yt = /* @__PURE__ */ ie(
671
671
  _t,
672
672
  gt,
673
673
  bt,
@@ -678,8 +678,8 @@ var gt = function() {
678
678
  null
679
679
  );
680
680
  const Ue = yt.exports;
681
- function Ne(r) {
682
- const e = r.trim();
681
+ function We(s) {
682
+ const e = s.trim();
683
683
  if (!e)
684
684
  return "";
685
685
  let n = 0, t = "";
@@ -695,48 +695,48 @@ function Ne(r) {
695
695
  }
696
696
  return t;
697
697
  }
698
- function Te(r) {
699
- return r.replace(/,/g, "").trim();
698
+ function Me(s) {
699
+ return s.replace(/,/g, "").trim();
700
700
  }
701
- function wt(r, e, n) {
702
- if (!r || r === "-")
703
- return r;
704
- const t = r[0] === "-";
705
- let l = t ? r.slice(1) : r;
701
+ function wt(s, e, n) {
702
+ if (!s || s === "-")
703
+ return s;
704
+ const t = s[0] === "-";
705
+ let l = t ? s.slice(1) : s;
706
706
  const a = l.indexOf(".");
707
707
  if (a === -1) {
708
- const F = Math.max(0, e);
709
- return l = F > 0 ? l.slice(0, F) : l, t ? "-" + l : l;
708
+ const k = Math.max(0, e);
709
+ return l = k > 0 ? l.slice(0, k) : l, t ? "-" + l : l;
710
710
  }
711
- let s = l.slice(0, a);
712
- e > 0 && (s = s.slice(0, e));
713
- const c = l.slice(a + 1), f = c === "" && l.endsWith(".");
711
+ let r = l.slice(0, a);
712
+ e > 0 && (r = r.slice(0, e));
713
+ const d = l.slice(a + 1), h = d === "" && l.endsWith(".");
714
714
  if (n <= 0)
715
- return t ? "-" + s : s;
716
- if (f)
717
- return (t ? "-" : "") + s + ".";
718
- const v = c.slice(0, n);
719
- return (t ? "-" : "") + s + "." + v;
715
+ return t ? "-" + r : r;
716
+ if (h)
717
+ return (t ? "-" : "") + r + ".";
718
+ const v = d.slice(0, n);
719
+ return (t ? "-" : "") + r + "." + v;
720
720
  }
721
- function Ct(r, e) {
722
- const n = Math.pow(10, r) - 1;
721
+ function xt(s, e) {
722
+ const n = Math.pow(10, s) - 1;
723
723
  return e <= 0 ? n : n + (1 - Math.pow(10, -e));
724
724
  }
725
- function We(r, e, n) {
726
- const t = Ct(e, n), l = r < 0 ? -1 : 1;
727
- return Math.abs(r) <= t ? r : l * t;
725
+ function Le(s, e, n) {
726
+ const t = xt(e, n), l = s < 0 ? -1 : 1;
727
+ return Math.abs(s) <= t ? s : l * t;
728
728
  }
729
- function xt(r, e, n) {
729
+ function Ct(s, e, n) {
730
730
  if (e <= 0)
731
731
  switch (n) {
732
732
  case "floor":
733
- return Math.floor(r);
733
+ return Math.floor(s);
734
734
  case "ceil":
735
- return Math.ceil(r);
735
+ return Math.ceil(s);
736
736
  default:
737
- return Math.round(r);
737
+ return Math.round(s);
738
738
  }
739
- const t = Math.pow(10, e), l = r * t;
739
+ const t = Math.pow(10, e), l = s * t;
740
740
  let a;
741
741
  switch (n) {
742
742
  case "floor":
@@ -750,26 +750,26 @@ function xt(r, e, n) {
750
750
  }
751
751
  return a / t;
752
752
  }
753
- function ke(r, e, n, t) {
754
- let l = We(r, e, n);
755
- return l = xt(l, n, t), l = We(l, e, n), l;
753
+ function Fe(s, e, n, t) {
754
+ let l = Le(s, e, n);
755
+ return l = Ct(l, n, t), l = Le(l, e, n), l;
756
756
  }
757
- function Pt(r, e) {
758
- return Number.isNaN(r) || !Number.isFinite(r) ? "" : r.toFixed(Math.max(0, e));
757
+ function Pt(s, e) {
758
+ return Number.isNaN(s) || !Number.isFinite(s) ? "" : s.toFixed(Math.max(0, e));
759
759
  }
760
- function Le(r, e) {
761
- if (Number.isNaN(r) || !Number.isFinite(r))
760
+ function Ke(s, e) {
761
+ if (Number.isNaN(s) || !Number.isFinite(s))
762
762
  return "";
763
- const n = r.toFixed(Math.max(0, e)), t = n.startsWith("-"), l = t ? n.slice(1) : n, [a, s] = l.split("."), c = a.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
764
- return e <= 0 || s === void 0 ? (t ? "-" : "") + c : (t ? "-" : "") + c + "." + s;
763
+ const n = s.toFixed(Math.max(0, e)), t = n.startsWith("-"), l = t ? n.slice(1) : n, [a, r] = l.split("."), d = a.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
764
+ return e <= 0 || r === void 0 ? (t ? "-" : "") + d : (t ? "-" : "") + d + "." + r;
765
765
  }
766
- function St(r, e) {
767
- if (Number.isNaN(r) || !Number.isFinite(r))
766
+ function St(s, e) {
767
+ if (Number.isNaN(s) || !Number.isFinite(s))
768
768
  return "";
769
- let n = r.toFixed(Math.max(0, e));
769
+ let n = s.toFixed(Math.max(0, e));
770
770
  return n = n.replace(/(\.\d*?)0+$/, "$1"), n = n.replace(/\.$/, ""), n;
771
771
  }
772
- const Rt = /* @__PURE__ */ te({
772
+ const Rt = /* @__PURE__ */ oe({
773
773
  __name: "FormattedNumberInput",
774
774
  props: {
775
775
  value: null,
@@ -781,94 +781,94 @@ const Rt = /* @__PURE__ */ te({
781
781
  inputLimit: { type: Boolean, default: !0 }
782
782
  },
783
783
  emits: ["input"],
784
- setup(r, { emit: e }) {
785
- const n = r, t = D(!1), l = D(""), a = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), s = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
786
- function c(p) {
784
+ setup(s, { emit: e }) {
785
+ const n = s, t = D(!1), l = D(""), a = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), r = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
786
+ function d(p) {
787
787
  if (p == null || p === "")
788
788
  return null;
789
789
  if (typeof p == "number")
790
790
  return Number.isFinite(p) ? p : null;
791
- const _ = Te(String(p));
791
+ const _ = Me(String(p));
792
792
  if (_ === "" || _ === "-")
793
793
  return null;
794
794
  const A = Number(_);
795
795
  return Number.isFinite(A) ? A : null;
796
796
  }
797
- function f() {
797
+ function h() {
798
798
  if (t.value)
799
799
  return;
800
- const p = c(n.value);
800
+ const p = d(n.value);
801
801
  if (p === null) {
802
802
  l.value = "";
803
803
  return;
804
804
  }
805
- l.value = Le(
806
- ke(p, a(), s(), n.rounding),
807
- s()
805
+ l.value = Ke(
806
+ Fe(p, a(), r(), n.rounding),
807
+ r()
808
808
  );
809
809
  }
810
- ee(
810
+ te(
811
811
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
812
- () => f(),
812
+ () => h(),
813
813
  { immediate: !0, deep: !0 }
814
814
  );
815
815
  function v(p) {
816
- e("input", Pt(p, s()));
816
+ e("input", Pt(p, r()));
817
817
  }
818
- function F(p) {
819
- let _ = Ne(p);
820
- if (n.inputLimit !== !1 && (_ = wt(_, a(), s())), l.value = _, _ === "" || _ === "-")
818
+ function k(p) {
819
+ let _ = We(p);
820
+ if (n.inputLimit !== !1 && (_ = wt(_, a(), r())), l.value = _, _ === "" || _ === "-")
821
821
  return;
822
822
  const A = Number(_);
823
823
  if (!Number.isFinite(A))
824
824
  return;
825
- const O = ke(A, a(), s(), n.rounding);
826
- v(O);
825
+ const I = Fe(A, a(), r(), n.rounding);
826
+ v(I);
827
827
  }
828
- function g() {
828
+ function w() {
829
829
  t.value = !0;
830
- const p = Te(l.value), _ = c(p === "" ? n.value : p);
830
+ const p = Me(l.value), _ = d(p === "" ? n.value : p);
831
831
  if (_ === null) {
832
832
  l.value = "";
833
833
  return;
834
834
  }
835
835
  l.value = St(
836
- ke(_, a(), s(), n.rounding),
837
- s()
836
+ Fe(_, a(), r(), n.rounding),
837
+ r()
838
838
  );
839
839
  }
840
- function b() {
840
+ function y() {
841
841
  t.value = !1;
842
- const p = Te(l.value);
842
+ const p = Me(l.value);
843
843
  if (p === "" || p === "-") {
844
844
  l.value = "", e("input", void 0);
845
845
  return;
846
846
  }
847
- const _ = Number(Ne(p));
847
+ const _ = Number(We(p));
848
848
  if (!Number.isFinite(_)) {
849
849
  l.value = "", e("input", void 0);
850
850
  return;
851
851
  }
852
- const A = ke(_, a(), s(), n.rounding);
853
- l.value = Le(A, s()), v(A);
852
+ const A = Fe(_, a(), r(), n.rounding);
853
+ l.value = Ke(A, r()), v(A);
854
854
  }
855
- return { __sfc: !0, props: n, emit: e, focused: t, displayText: l, intN: a, decM: s, parseExternalToNumber: c, syncDisplayFromValue: f, emitStoredValue: v, onInput: F, onFocus: g, onBlur: b };
855
+ return { __sfc: !0, props: n, emit: e, focused: t, displayText: l, intN: a, decM: r, parseExternalToNumber: d, syncDisplayFromValue: h, emitStoredValue: v, onInput: k, onFocus: w, onBlur: y };
856
856
  }
857
857
  });
858
- var kt = function() {
858
+ var Ft = function() {
859
859
  var e = this, n = e._self._c, t = e._self._setupProxy;
860
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));
861
- }, Ft = [], Bt = /* @__PURE__ */ re(
861
+ }, kt = [], Bt = /* @__PURE__ */ ie(
862
862
  Rt,
863
- kt,
864
863
  Ft,
864
+ kt,
865
865
  !1,
866
866
  null,
867
867
  null,
868
868
  null,
869
869
  null
870
870
  );
871
- const Ae = Bt.exports, At = /* @__PURE__ */ te({
871
+ const Ae = Bt.exports, At = /* @__PURE__ */ oe({
872
872
  __name: "TreeSelect",
873
873
  props: {
874
874
  value: null,
@@ -885,107 +885,107 @@ const Ae = Bt.exports, At = /* @__PURE__ */ te({
885
885
  clearable: { type: Boolean }
886
886
  },
887
887
  emits: ["input"],
888
- setup(r, { emit: e }) {
889
- const n = r, t = D(), l = D(), a = D(!1), s = D(!1), c = D(""), f = D([]), v = D({}), F = w(() => ({
888
+ setup(s, { emit: e }) {
889
+ const n = s, t = D(), l = D(), a = D(!1), r = D(!1), d = D(""), h = D([]), v = D({}), k = x(() => ({
890
890
  label: n.labelField,
891
891
  children: n.childrenField
892
892
  }));
893
- function g(y) {
894
- const K = n.labelField ?? "label", q = n.valueField ?? "value", Q = n.childrenField ?? "children", J = y[Q], Y = {};
895
- return Y[n.labelField ?? "label"] = y[K] ?? y.label, Y[n.valueField ?? "value"] = y[q] ?? y.value, Array.isArray(J) && J.length && (Y[n.childrenField ?? "children"] = J.map((Z) => g(Z))), Y;
893
+ function w(C) {
894
+ const q = n.labelField ?? "label", L = n.valueField ?? "value", Y = n.childrenField ?? "children", G = C[Y], ne = {};
895
+ return ne[n.labelField ?? "label"] = C[q] ?? C.label, ne[n.valueField ?? "value"] = C[L] ?? C.value, Array.isArray(G) && G.length && (ne[n.childrenField ?? "children"] = G.map((J) => w(J))), ne;
896
896
  }
897
- function b(y, K = "") {
898
- const q = {}, Q = n.labelField ?? "label", J = n.valueField ?? "value", Y = n.childrenField ?? "children";
899
- for (const Z of y) {
900
- const I = String(Z[Q] ?? Z.label ?? ""), V = Z[J] ?? Z.value;
901
- V != null && (q[String(V)] = K ? K + " / " + I : I);
902
- const j = Z[Y] ?? Z.children;
903
- Array.isArray(j) && j.length && Object.assign(q, b(j, I));
897
+ function y(C, q = "") {
898
+ const L = {}, Y = n.labelField ?? "label", G = n.valueField ?? "value", ne = n.childrenField ?? "children";
899
+ for (const J of C) {
900
+ const Z = String(J[Y] ?? J.label ?? ""), X = J[G] ?? J.value;
901
+ X != null && (L[String(X)] = q ? q + " / " + Z : Z);
902
+ const E = J[ne] ?? J.children;
903
+ Array.isArray(E) && E.length && Object.assign(L, y(E, Z));
904
904
  }
905
- return q;
905
+ return L;
906
906
  }
907
907
  function p() {
908
- const y = n.treeData;
909
- return Array.isArray(y) && y.length > 0;
908
+ const C = n.treeData;
909
+ return Array.isArray(C) && C.length > 0;
910
910
  }
911
- function _(y) {
912
- f.value = y, v.value = b(y);
911
+ function _(C) {
912
+ h.value = C, v.value = y(C);
913
913
  }
914
914
  function A() {
915
- const y = n.treeData;
916
- if (!Array.isArray(y) || y.length === 0)
915
+ const C = n.treeData;
916
+ if (!Array.isArray(C) || C.length === 0)
917
917
  return;
918
- const K = y.map((q) => g(q));
919
- _(K);
918
+ const q = C.map((L) => w(L));
919
+ _(q);
920
920
  }
921
- const O = w(() => n.value == null || n.value === "" ? "" : v.value[String(n.value)] ?? String(n.value)), P = (y, K) => {
922
- if (!y)
921
+ const I = x(() => n.value == null || n.value === "" ? "" : v.value[String(n.value)] ?? String(n.value)), S = (C, q) => {
922
+ if (!C)
923
923
  return !0;
924
- const q = n.labelField ?? "label";
925
- return String(K[q] ?? K.label ?? "").toLowerCase().includes(y.toLowerCase());
924
+ const L = n.labelField ?? "label";
925
+ return String(q[L] ?? q.label ?? "").toLowerCase().includes(C.toLowerCase());
926
926
  };
927
- ee(c, (y) => {
928
- var K;
929
- (K = l.value) == null || K.filter(y);
927
+ te(d, (C) => {
928
+ var q;
929
+ (q = l.value) == null || q.filter(C);
930
930
  });
931
- let T = null;
932
- function E() {
933
- n.disabled || (a.value = !0, n.lazy && !p() && W(), Ke(() => {
934
- T = (y) => {
935
- t.value && !t.value.contains(y.target) && N();
936
- }, document.addEventListener("click", T);
931
+ let M = null;
932
+ function z() {
933
+ n.disabled || (a.value = !0, n.lazy && !p() && O(), De(() => {
934
+ M = (C) => {
935
+ t.value && !t.value.contains(C.target) && V();
936
+ }, document.addEventListener("click", M);
937
937
  }));
938
938
  }
939
- function N() {
940
- a.value = !1, c.value = "", T && (document.removeEventListener("click", T), T = null);
939
+ function V() {
940
+ a.value = !1, d.value = "", M && (document.removeEventListener("click", M), M = null);
941
941
  }
942
- function S() {
942
+ function R() {
943
943
  e("input", void 0);
944
944
  }
945
- function d(y) {
946
- const K = n.valueField ?? "value", q = y[K] ?? y.value;
947
- e("input", q), N();
945
+ function f(C) {
946
+ const q = n.valueField ?? "value", L = C[q] ?? C.value;
947
+ e("input", L), V();
948
948
  }
949
- async function W() {
949
+ async function O() {
950
950
  if (!(!n.api || p())) {
951
- s.value = !0;
951
+ r.value = !0;
952
952
  try {
953
- const y = await n.api(n.params), K = Array.isArray(y) ? y : (y == null ? void 0 : y.list) ?? (y == null ? void 0 : y.data) ?? [];
954
- f.value = K.map((q) => g(q)), v.value = b(f.value);
953
+ const C = await n.api(n.params), q = Array.isArray(C) ? C : (C == null ? void 0 : C.list) ?? (C == null ? void 0 : C.data) ?? [];
954
+ h.value = q.map((L) => w(L)), v.value = y(h.value);
955
955
  } finally {
956
- s.value = !1;
956
+ r.value = !1;
957
957
  }
958
958
  }
959
959
  }
960
- return ge(() => {
961
- p() ? A() : n.lazy || W();
962
- }), ee(() => n.treeData, () => {
963
- p() ? A() : (f.value = [], v.value = {}, !n.lazy && n.api && W());
964
- }, { deep: !0 }), ee(() => n.api, () => {
965
- p() || (n.lazy ? (f.value = [], v.value = {}) : W());
966
- }, { deep: !0 }), ee(() => n.params, () => {
967
- p() || (n.lazy ? (f.value = [], v.value = {}) : W());
968
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: l, dropdownVisible: a, loading: s, filterText: c, treeData: f, flatLabelMap: v, treeProps: F, normalizeNode: g, buildFlatLabelMap: b, hasTreeDataProp: p, applyTreeData: _, syncFromTreeDataProp: A, displayText: O, filterNodeMethod: P, clickOutsideHandler: T, openDropdown: E, closeDropdown: N, clearValue: S, onNodeClick: d, fetchData: W };
960
+ return ye(() => {
961
+ p() ? A() : n.lazy || O();
962
+ }), te(() => n.treeData, () => {
963
+ p() ? A() : (h.value = [], v.value = {}, !n.lazy && n.api && O());
964
+ }, { deep: !0 }), te(() => n.api, () => {
965
+ p() || (n.lazy ? (h.value = [], v.value = {}) : O());
966
+ }, { deep: !0 }), te(() => n.params, () => {
967
+ p() || (n.lazy ? (h.value = [], v.value = {}) : O());
968
+ }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: l, dropdownVisible: a, loading: r, filterText: d, treeData: h, flatLabelMap: v, treeProps: k, normalizeNode: w, buildFlatLabelMap: y, hasTreeDataProp: p, applyTreeData: _, syncFromTreeDataProp: A, displayText: I, filterNodeMethod: S, clickOutsideHandler: M, openDropdown: z, closeDropdown: V, clearValue: R, onNodeClick: f, fetchData: O };
969
969
  }
970
970
  });
971
- var Mt = function() {
971
+ var Tt = function() {
972
972
  var e = this, n = e._self._c, t = e._self._setupProxy;
973
973
  return n("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [n("el-input", { staticClass: "ecp-tree-select__input", attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled, clearable: e.clearable, readonly: "", "suffix-icon": "el-icon-arrow-down" }, on: { focus: t.openDropdown, clear: t.clearValue } }), n("transition", { attrs: { name: "el-zoom-in-top" } }, [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? n("div", { staticClass: "ecp-tree-select__filter-inner" }, [n("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(l) {
974
974
  l.stopPropagation();
975
975
  } }, model: { value: t.filterText, callback: function(l) {
976
976
  t.filterText = l;
977
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);
978
- }, Tt = [], $t = /* @__PURE__ */ re(
978
+ }, Mt = [], $t = /* @__PURE__ */ ie(
979
979
  At,
980
- Mt,
981
980
  Tt,
981
+ Mt,
982
982
  !1,
983
983
  null,
984
984
  null,
985
985
  null,
986
986
  null
987
987
  );
988
- const Je = $t.exports, Dt = /* @__PURE__ */ te({
988
+ const Je = $t.exports, Dt = /* @__PURE__ */ oe({
989
989
  __name: "ProFormItem",
990
990
  props: {
991
991
  schema: null,
@@ -998,8 +998,8 @@ const Je = $t.exports, Dt = /* @__PURE__ */ te({
998
998
  customComponents: null,
999
999
  registerFieldInstance: null
1000
1000
  },
1001
- setup(r) {
1002
- const e = r, n = /* @__PURE__ */ new Set([
1001
+ setup(s) {
1002
+ const e = s, n = /* @__PURE__ */ new Set([
1003
1003
  "input",
1004
1004
  "select",
1005
1005
  "api-select",
@@ -1013,75 +1013,75 @@ const Je = $t.exports, Dt = /* @__PURE__ */ te({
1013
1013
  "checkbox",
1014
1014
  "radio"
1015
1015
  ]), t = D(null);
1016
- ge(() => {
1017
- var d;
1018
- e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, t.value));
1019
- }), Fe(() => {
1020
- var d;
1021
- e.schema.component === "api-select" && ((d = e.registerFieldInstance) == null || d.call(e, e.schema.field, null));
1016
+ ye(() => {
1017
+ var f;
1018
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, t.value));
1019
+ }), ke(() => {
1020
+ var f;
1021
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, null));
1022
1022
  });
1023
- const l = we(), a = w(() => ({
1023
+ const l = Ce(), a = x(() => ({
1024
1024
  schema: e.schema,
1025
1025
  values: e.formModel,
1026
1026
  model: e.formModel,
1027
1027
  field: e.schema.field
1028
- })), s = w(() => {
1029
- const d = e.schema.ifShow;
1030
- return d === void 0 ? !0 : typeof d == "boolean" ? d : d(a.value);
1031
- }), c = w(() => {
1032
- const d = e.schema.show;
1033
- return d === void 0 ? !0 : typeof d == "boolean" ? d : d(a.value);
1034
- }), f = w(() => {
1028
+ })), r = x(() => {
1029
+ const f = e.schema.ifShow;
1030
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(a.value);
1031
+ }), d = x(() => {
1032
+ const f = e.schema.show;
1033
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(a.value);
1034
+ }), h = x(() => {
1035
1035
  if (e.formDisabled)
1036
1036
  return !0;
1037
- const d = e.schema.dynamicDisabled;
1038
- return d === void 0 ? !1 : typeof d == "boolean" ? d : d(a.value);
1039
- }), v = w(() => {
1040
- const d = e.schema.dynamicRules;
1041
- return d ? Array.isArray(d) ? d : d(a.value) : e.schema.rules;
1042
- }), F = w(() => {
1043
- const d = e.schema.componentProps;
1044
- if (!d)
1037
+ const f = e.schema.dynamicDisabled;
1038
+ return f === void 0 ? !1 : typeof f == "boolean" ? f : f(a.value);
1039
+ }), v = x(() => {
1040
+ const f = e.schema.dynamicRules;
1041
+ return f ? Array.isArray(f) ? f : f(a.value) : e.schema.rules;
1042
+ }), k = x(() => {
1043
+ const f = e.schema.componentProps;
1044
+ if (!f)
1045
1045
  return { props: {}, listeners: {} };
1046
- const W = typeof d == "function" ? d({
1046
+ const O = typeof f == "function" ? f({
1047
1047
  ...a.value,
1048
1048
  formActionType: e.formActionType
1049
- }) : { ...d }, y = {}, K = {};
1050
- for (const [q, Q] of Object.entries(W))
1051
- if (q.length > 2 && /^on[A-Za-z]/.test(q) && typeof Q == "function") {
1052
- const J = q.slice(2).charAt(0).toLowerCase() + q.slice(3);
1053
- K[J] = Q;
1049
+ }) : { ...f }, C = {}, q = {};
1050
+ for (const [L, Y] of Object.entries(O))
1051
+ if (L.length > 2 && /^on[A-Za-z]/.test(L) && typeof Y == "function") {
1052
+ const G = L.slice(2).charAt(0).toLowerCase() + L.slice(3);
1053
+ q[G] = Y;
1054
1054
  } else
1055
- y[q] = Q;
1056
- return { props: y, listeners: K };
1057
- }), g = w(() => F.value.props), b = w(() => F.value.listeners), p = w(() => e.schema.colon ?? e.colon ?? !1), _ = w(() => {
1058
- const d = e.schema.tooltip;
1059
- if (!d)
1055
+ C[L] = Y;
1056
+ return { props: C, listeners: q };
1057
+ }), w = x(() => k.value.props), y = x(() => k.value.listeners), p = x(() => e.schema.colon ?? e.colon ?? !1), _ = x(() => {
1058
+ const f = e.schema.tooltip;
1059
+ if (!f)
1060
1060
  return null;
1061
- const W = typeof d == "function" ? d(a.value) : d;
1062
- return De(W, e.formModel[e.schema.field]);
1063
- }), A = w(() => _.value ? "el-tooltip" : "span"), O = w(() => _.value || {}), P = w(() => !!l.default), T = (d) => {
1064
- const W = d == null ? void 0 : d.options;
1065
- return Array.isArray(W) ? W : void 0;
1066
- }, E = w(() => {
1067
- const d = e.schema.component;
1068
- return d == null ? null : typeof d == "string" ? n.has(d) ? null : e.customComponents && e.customComponents[d] || d : d;
1069
- }), N = (d) => {
1070
- var W;
1071
- (W = e.onFieldChange) == null || W.call(e, e.schema.field, d);
1072
- }, S = w(() => {
1073
- const d = e.schema.render;
1074
- return d ? {
1061
+ const O = typeof f == "function" ? f(a.value) : f;
1062
+ return Ee(O, e.formModel[e.schema.field]);
1063
+ }), A = x(() => _.value ? "el-tooltip" : "span"), I = x(() => _.value || {}), S = x(() => !!l.default), M = (f) => {
1064
+ const O = f == null ? void 0 : f.options;
1065
+ return Array.isArray(O) ? O : void 0;
1066
+ }, z = x(() => {
1067
+ const f = e.schema.component;
1068
+ return f == null ? null : typeof f == "string" ? n.has(f) ? null : e.customComponents && e.customComponents[f] || f : f;
1069
+ }), V = (f) => {
1070
+ var O;
1071
+ (O = e.onFieldChange) == null || O.call(e, e.schema.field, f);
1072
+ }, R = x(() => {
1073
+ const f = e.schema.render;
1074
+ return f ? {
1075
1075
  render() {
1076
- const W = d(a.value);
1077
- return Array.isArray(W) ? ve("span", W) : W;
1076
+ const O = f(a.value);
1077
+ return Array.isArray(O) ? he("span", O) : O;
1078
1078
  }
1079
1079
  } : null;
1080
1080
  });
1081
- return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: l, renderParams: a, shouldRender: s, shouldShow: c, effectiveDisabled: f, effectiveRules: v, effectiveComponentPropsAndListeners: F, effectiveComponentProps: g, effectiveComponentListeners: b, showColon: p, normalizedTooltip: _, fieldWrapperComponent: A, fieldWrapperProps: O, hasSlot: P, getOptions: T, resolvedCustomComponent: E, setFieldValue: N, renderComponent: S, ApiSelect: Ue, FormattedNumberInput: Ae, TreeSelect: Je };
1081
+ return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: l, renderParams: a, shouldRender: r, shouldShow: d, effectiveDisabled: h, effectiveRules: v, effectiveComponentPropsAndListeners: k, effectiveComponentProps: w, effectiveComponentListeners: y, showColon: p, normalizedTooltip: _, fieldWrapperComponent: A, fieldWrapperProps: I, hasSlot: S, getOptions: M, resolvedCustomComponent: z, setFieldValue: V, renderComponent: R, ApiSelect: Ue, FormattedNumberInput: Ae, TreeSelect: Je };
1082
1082
  }
1083
1083
  });
1084
- var zt = function() {
1084
+ var Et = function() {
1085
1085
  var e = this, n = e._self._c, t = e._self._setupProxy;
1086
1086
  return t.shouldRender ? n("el-form-item", { directives: [{ name: "show", rawName: "v-show", value: t.shouldShow, expression: "shouldShow" }], attrs: { prop: e.schema.field, required: e.schema.required, rules: t.effectiveRules, "label-width": e.schema.labelWidth } }, [n("template", { slot: "label" }, [n("span", [e._v(" " + e._s(e.schema.label)), t.showColon ? n("span", { staticClass: "ecp-pro-form-item__colon" }, [e._v(":")]) : e._e()]), e.schema.helpMessage ? n("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [n("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(l, a) {
1087
1087
  return n("div", { key: a, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(l) + " ")]);
@@ -1110,17 +1110,17 @@ var zt = function() {
1110
1110
  }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(l) {
1111
1111
  return n("el-radio", { key: String(l.value), attrs: { label: l.value } }, [e._v(" " + e._s(l.label) + " ")]);
1112
1112
  }), 1) : e._e()], 1)]], 2) : e._e();
1113
- }, Et = [], It = /* @__PURE__ */ re(
1113
+ }, zt = [], It = /* @__PURE__ */ ie(
1114
1114
  Dt,
1115
- zt,
1116
1115
  Et,
1116
+ zt,
1117
1117
  !1,
1118
1118
  null,
1119
1119
  null,
1120
1120
  null,
1121
1121
  null
1122
1122
  );
1123
- const Ze = It.exports, Vt = /* @__PURE__ */ te({
1123
+ const Ze = It.exports, Vt = /* @__PURE__ */ oe({
1124
1124
  __name: "FormActions",
1125
1125
  props: {
1126
1126
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -1137,7 +1137,7 @@ const Ze = It.exports, Vt = /* @__PURE__ */ te({
1137
1137
  actionColOptions: null
1138
1138
  },
1139
1139
  emits: ["submit", "reset", "toggle"],
1140
- setup(r) {
1140
+ setup(s) {
1141
1141
  return { __sfc: !0 };
1142
1142
  }
1143
1143
  });
@@ -1148,7 +1148,7 @@ var Ot = function() {
1148
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) {
1149
1149
  return e.$emit("reset");
1150
1150
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
1151
- }, Nt = [], Wt = /* @__PURE__ */ re(
1151
+ }, Nt = [], Wt = /* @__PURE__ */ ie(
1152
1152
  Vt,
1153
1153
  Ot,
1154
1154
  Nt,
@@ -1158,7 +1158,7 @@ var Ot = function() {
1158
1158
  null,
1159
1159
  null
1160
1160
  );
1161
- const Xe = Wt.exports, Lt = /* @__PURE__ */ te({
1161
+ const Xe = Wt.exports, Lt = /* @__PURE__ */ oe({
1162
1162
  __name: "ProForm",
1163
1163
  props: {
1164
1164
  schemas: null,
@@ -1191,191 +1191,191 @@ const Xe = Wt.exports, Lt = /* @__PURE__ */ te({
1191
1191
  components: null
1192
1192
  },
1193
1193
  emits: ["submit", "reset", "register", "update:modelValue"],
1194
- setup(r, { expose: e, emit: n }) {
1195
- const t = r, l = we(), a = D(), s = D(), c = D(!1), f = D(!0), v = D({}), F = D({}), g = D([]), b = D({}), p = D(/* @__PURE__ */ new Map()), _ = { xl: 1920, lg: 1200, md: 992, sm: 768 }, A = (m, B, M) => {
1196
- const $ = M ?? (typeof window < "u" ? window.innerWidth : 1920), o = m ?? {}, u = B ?? {}, x = u.span ?? 8;
1197
- return $ >= _.xl ? o.xl ?? u.xl ?? o.lg ?? u.lg ?? o.md ?? u.md ?? o.sm ?? u.sm ?? o.xs ?? u.xs ?? o.span ?? x : $ >= _.lg ? o.lg ?? u.lg ?? o.md ?? u.md ?? o.sm ?? u.sm ?? o.xs ?? u.xs ?? o.span ?? x : $ >= _.md ? o.md ?? u.md ?? o.sm ?? u.sm ?? o.xs ?? u.xs ?? o.span ?? x : $ >= _.sm ? o.sm ?? u.sm ?? o.xs ?? u.xs ?? o.span ?? x : o.xs ?? u.xs ?? o.span ?? x;
1198
- }, { getSetting: O } = Be(), P = w(() => ({ ...O("ProForm"), ...t, ...b.value })), T = w(() => P.value.modelValue), E = w(() => T.value !== void 0), N = w(() => E.value ? T.value ?? {} : v.value), S = w(() => ({
1199
- ...O("ProForm").components ?? {},
1200
- ...P.value.components ?? {},
1201
- ...b.value.components ?? {}
1202
- })), d = w(() => P.value.actionColOptions ?? { span: 24 }), W = D(typeof window < "u" ? window.innerWidth : 1920), y = (m, B, M, $) => {
1203
- let o = 24, u = 1, x = 0;
1204
- for (const k of m) {
1205
- const U = A(k.colProps, B, $);
1206
- if (U > o) {
1207
- if (u++, u > M)
1194
+ setup(s, { expose: e, emit: n }) {
1195
+ const t = s, l = Ce(), a = D(), r = D(), d = D(!1), h = D(!0), v = D({}), k = D({}), w = D([]), y = D({}), p = D(/* @__PURE__ */ new Map()), _ = { xl: 1920, lg: 1200, md: 992, sm: 768 }, A = (m, B, T) => {
1196
+ const $ = T ?? (typeof window < "u" ? window.innerWidth : 1920), o = m ?? {}, i = B ?? {}, P = i.span ?? 8;
1197
+ return $ >= _.xl ? o.xl ?? i.xl ?? o.lg ?? i.lg ?? o.md ?? i.md ?? o.sm ?? i.sm ?? o.xs ?? i.xs ?? o.span ?? P : $ >= _.lg ? o.lg ?? i.lg ?? o.md ?? i.md ?? o.sm ?? i.sm ?? o.xs ?? i.xs ?? o.span ?? P : $ >= _.md ? o.md ?? i.md ?? o.sm ?? i.sm ?? o.xs ?? i.xs ?? o.span ?? P : $ >= _.sm ? o.sm ?? i.sm ?? o.xs ?? i.xs ?? o.span ?? P : o.xs ?? i.xs ?? o.span ?? P;
1198
+ }, { getSetting: I } = Be(), S = x(() => ({ ...I("ProForm"), ...t, ...y.value })), M = x(() => S.value.modelValue), z = x(() => M.value !== void 0), V = x(() => z.value ? M.value ?? {} : v.value), R = x(() => ({
1199
+ ...I("ProForm").components ?? {},
1200
+ ...S.value.components ?? {},
1201
+ ...y.value.components ?? {}
1202
+ })), f = x(() => S.value.actionColOptions ?? { span: 24 }), O = D(typeof window < "u" ? window.innerWidth : 1920), C = (m, B, T, $) => {
1203
+ let o = 24, i = 1, P = 0;
1204
+ for (const F of m) {
1205
+ const H = A(F.colProps, B, $);
1206
+ if (H > o) {
1207
+ if (i++, i > T)
1208
1208
  break;
1209
- o = 24 - U;
1209
+ o = 24 - H;
1210
1210
  } else
1211
- o -= U;
1212
- x++;
1211
+ o -= H;
1212
+ P++;
1213
1213
  }
1214
- return x;
1215
- }, K = w(() => {
1216
- const m = g.value.filter((o) => J(o));
1217
- if (!P.value.showAdvancedButton)
1214
+ return P;
1215
+ }, q = x(() => {
1216
+ const m = w.value.filter((o) => G(o));
1217
+ if (!S.value.showAdvancedButton)
1218
1218
  return !1;
1219
- const B = P.value.alwaysShowLines ?? 1, M = P.value.baseColProps, $ = y(m, M, B, W.value);
1219
+ const B = S.value.alwaysShowLines ?? 1, T = S.value.baseColProps, $ = C(m, T, B, O.value);
1220
1220
  return m.length > $;
1221
- }), q = w(() => P.value.formListeners ?? {}), Q = w(() => {
1222
- const m = g.value.filter((o) => J(o));
1223
- if (!P.value.showAdvancedButton || !f.value)
1221
+ }), L = x(() => S.value.formListeners ?? {}), Y = x(() => {
1222
+ const m = w.value.filter((o) => G(o));
1223
+ if (!S.value.showAdvancedButton || !h.value)
1224
1224
  return m;
1225
- const B = P.value.alwaysShowLines ?? 1, M = P.value.baseColProps, $ = y(m, M, B, W.value);
1225
+ const B = S.value.alwaysShowLines ?? 1, T = S.value.baseColProps, $ = C(m, T, B, O.value);
1226
1226
  return m.slice(0, $);
1227
- }), J = (m) => {
1228
- let B = !0, M = !0;
1229
- return typeof m.ifShow == "function" && (B = m.ifShow({ schema: m, values: N.value, model: N.value, field: m.field })), typeof m.ifShow == "boolean" && (B = m.ifShow), typeof m.show == "function" && (M = m.show({ schema: m, values: N.value, model: N.value, field: m.field })), typeof m.show == "boolean" && (M = m.show), B && M;
1230
- }, Y = (m) => m.colProps ?? P.value.baseColProps ?? {}, Z = (m) => m.slot || m.field, I = (m, B = !0) => {
1231
- const M = B ? { ...m ?? {} } : {}, $ = P.value.initialValues ?? t.initialValues;
1232
- return g.value.forEach((o) => {
1233
- if (!(B && Object.prototype.hasOwnProperty.call(M, o.field))) {
1227
+ }), G = (m) => {
1228
+ let B = !0, T = !0;
1229
+ return typeof m.ifShow == "function" && (B = m.ifShow({ schema: m, values: V.value, model: V.value, field: m.field })), typeof m.ifShow == "boolean" && (B = m.ifShow), typeof m.show == "function" && (T = m.show({ schema: m, values: V.value, model: V.value, field: m.field })), typeof m.show == "boolean" && (T = m.show), B && T;
1230
+ }, ne = (m) => m.colProps ?? S.value.baseColProps ?? {}, J = (m) => m.slot || m.field, Z = (m, B = !0) => {
1231
+ const T = B ? { ...m ?? {} } : {}, $ = S.value.initialValues ?? t.initialValues;
1232
+ return w.value.forEach((o) => {
1233
+ if (!(B && Object.prototype.hasOwnProperty.call(T, o.field))) {
1234
1234
  if (o.defaultValue !== void 0) {
1235
- M[o.field] = o.defaultValue;
1235
+ T[o.field] = o.defaultValue;
1236
1236
  return;
1237
1237
  }
1238
- $ && Object.prototype.hasOwnProperty.call($, o.field) && (M[o.field] = $[o.field]);
1238
+ $ && Object.prototype.hasOwnProperty.call($, o.field) && (T[o.field] = $[o.field]);
1239
1239
  }
1240
- }), M;
1241
- }, V = (m, B = !0) => {
1240
+ }), T;
1241
+ }, X = (m, B = !0) => {
1242
1242
  v.value = m, B && n("update:modelValue", m);
1243
- }, j = (m) => {
1244
- const B = I({ ...N.value, ...m });
1245
- return V(B), B;
1246
- }, C = () => {
1243
+ }, E = (m) => {
1244
+ const B = Z({ ...V.value, ...m });
1245
+ return X(B), B;
1246
+ }, W = () => {
1247
1247
  const m = {};
1248
- g.value.forEach((B) => {
1249
- var M;
1250
- (M = B.rules) != null && M.length && (m[B.field] = B.rules);
1251
- }), V(I(N.value), !1), F.value = m;
1252
- }, i = (m) => {
1248
+ w.value.forEach((B) => {
1249
+ var T;
1250
+ (T = B.rules) != null && T.length && (m[B.field] = B.rules);
1251
+ }), X(Z(V.value), !1), k.value = m;
1252
+ }, g = (m) => {
1253
1253
  const B = { ...m };
1254
- return g.value.forEach((M) => {
1255
- const $ = M.ifShow;
1254
+ return w.value.forEach((T) => {
1255
+ const $ = T.ifShow;
1256
1256
  if ($ === void 0)
1257
1257
  return;
1258
- (typeof $ == "boolean" ? $ : $({ schema: M, values: m, model: m, field: M.field })) || delete B[M.field];
1258
+ (typeof $ == "boolean" ? $ : $({ schema: T, values: m, model: m, field: T.field })) || delete B[T.field];
1259
1259
  }), B;
1260
- }, h = (m) => {
1261
- const B = i(m), M = b.value.fieldMapToTime;
1262
- if (!(M != null && M.length))
1260
+ }, u = (m) => {
1261
+ const B = g(m), T = y.value.fieldMapToTime;
1262
+ if (!(T != null && T.length))
1263
1263
  return B;
1264
1264
  const $ = { ...B };
1265
- return M.forEach(([o, [u, x]]) => {
1266
- const k = $[o];
1267
- Array.isArray(k) && k.length === 2 && (delete $[o], $[u] = k[0], $[x] = k[1]);
1265
+ return T.forEach(([o, [i, P]]) => {
1266
+ const F = $[o];
1267
+ Array.isArray(F) && F.length === 2 && (delete $[o], $[i] = F[0], $[P] = F[1]);
1268
1268
  }), $;
1269
- }, R = async () => {
1269
+ }, c = async () => {
1270
1270
  var m;
1271
1271
  try {
1272
- await ((m = a.value) == null ? void 0 : m.validate()), P.value.submitFunc ? await P.value.submitFunc() : (c.value = !0, n("submit", h({ ...N.value })));
1272
+ await ((m = a.value) == null ? void 0 : m.validate()), S.value.submitFunc ? await S.value.submitFunc() : (d.value = !0, n("submit", u({ ...V.value })));
1273
1273
  } catch (B) {
1274
1274
  console.error("Form validation failed:", B);
1275
1275
  } finally {
1276
- c.value = !1;
1276
+ d.value = !1;
1277
1277
  }
1278
- }, z = async () => {
1278
+ }, b = async () => {
1279
1279
  var m;
1280
- P.value.resetFunc ? await P.value.resetFunc() : ((m = a.value) == null || m.resetFields(), C(), n("reset"), P.value.submitOnReset && await R());
1281
- }, H = (m) => (j(m), Promise.resolve()), G = () => h({ ...N.value }), ne = async () => {
1280
+ S.value.resetFunc ? await S.value.resetFunc() : ((m = a.value) == null || m.resetFields(), W(), n("reset"), S.value.submitOnReset && await c());
1281
+ }, j = (m) => (E(m), Promise.resolve()), K = () => u({ ...V.value }), U = async () => {
1282
1282
  var m;
1283
- (m = a.value) == null || m.resetFields(), V(I(void 0, !1));
1284
- }, le = (m, B) => {
1285
- j({ [m]: B });
1286
- }, X = (m) => {
1283
+ (m = a.value) == null || m.resetFields(), X(Z(void 0, !1));
1284
+ }, ee = (m, B) => {
1285
+ E({ [m]: B });
1286
+ }, se = (m) => {
1287
1287
  var B;
1288
1288
  return ((B = a.value) == null ? void 0 : B.validate(m)) ?? Promise.resolve();
1289
- }, ae = (m) => a.value ? m != null && m.length ? Promise.all(m.map((B) => new Promise((M, $) => {
1290
- a.value.validateField(B, (o) => o ? M(void 0) : $(new Error("Validation failed")));
1291
- }))) : a.value.validate() : Promise.resolve(), de = async (m, B) => {
1289
+ }, Q = (m) => a.value ? m != null && m.length ? Promise.all(m.map((B) => new Promise((T, $) => {
1290
+ a.value.validateField(B, (o) => o ? T(void 0) : $(new Error("Validation failed")));
1291
+ }))) : a.value.validate() : Promise.resolve(), le = async (m, B) => {
1292
1292
  var $;
1293
- const M = ($ = s.value) == null ? void 0 : $.querySelector(`[data-field="${m}"]`);
1294
- return M && M.scrollIntoView({ behavior: (B == null ? void 0 : B.behavior) ?? "smooth", block: (B == null ? void 0 : B.block) ?? "nearest" }), Promise.resolve();
1295
- }, ie = (m) => {
1293
+ const T = ($ = r.value) == null ? void 0 : $.querySelector(`[data-field="${m}"]`);
1294
+ return T && T.scrollIntoView({ behavior: (B == null ? void 0 : B.behavior) ?? "smooth", block: (B == null ? void 0 : B.block) ?? "nearest" }), Promise.resolve();
1295
+ }, _e = (m) => {
1296
1296
  var B;
1297
1297
  (B = a.value) == null || B.clearValidate(m);
1298
1298
  }, fe = async (m) => {
1299
- (Array.isArray(m) ? m : [m]).forEach((M) => {
1300
- const $ = g.value.findIndex((o) => o.field === M.field);
1301
- $ >= 0 && (g.value[$] = { ...g.value[$], ...M });
1302
- });
1303
- }, oe = async (m, B, M) => {
1304
- if (M)
1305
- g.value.unshift(m);
1299
+ (Array.isArray(m) ? m : [m]).forEach((T) => {
1300
+ const $ = w.value.findIndex((o) => o.field === T.field);
1301
+ $ >= 0 && (w.value[$] = { ...w.value[$], ...T });
1302
+ }), W();
1303
+ }, ae = async (m, B, T) => {
1304
+ if (T)
1305
+ w.value.unshift(m);
1306
1306
  else if (B) {
1307
- const $ = g.value.findIndex((o) => o.field === B);
1308
- g.value.splice($ + 1, 0, m);
1307
+ const $ = w.value.findIndex((o) => o.field === B);
1308
+ w.value.splice($ + 1, 0, m);
1309
1309
  } else
1310
- g.value.push(m);
1311
- C();
1312
- }, be = async (m) => {
1310
+ w.value.push(m);
1311
+ W();
1312
+ }, pe = async (m) => {
1313
1313
  const B = Array.isArray(m) ? m : [m];
1314
- g.value = g.value.filter((M) => !B.includes(M.field));
1315
- }, ce = async (m) => {
1316
- b.value = { ...b.value, ...m }, m.schemas && (g.value = [...m.schemas], C());
1317
- }, Ce = (m, B) => {
1314
+ w.value = w.value.filter((T) => !B.includes(T.field));
1315
+ }, ue = async (m) => {
1316
+ y.value = { ...y.value, ...m }, m.schemas && (w.value = [...m.schemas], W());
1317
+ }, we = (m, B) => {
1318
1318
  B ? p.value.set(m, B) : p.value.delete(m);
1319
- }, xe = (m) => p.value.get(m) ?? null;
1319
+ }, de = (m) => p.value.get(m) ?? null;
1320
1320
  function Pe(m, B = !1) {
1321
- const M = p.value.get(m);
1322
- if (!M)
1321
+ const T = p.value.get(m);
1322
+ if (!T)
1323
1323
  return [];
1324
- const $ = M;
1324
+ const $ = T;
1325
1325
  return B ? ($ == null ? void 0 : $.rawOptions) ?? [] : ($ == null ? void 0 : $.options) ?? [];
1326
1326
  }
1327
1327
  const Se = (m) => {
1328
1328
  const B = p.value.get(m);
1329
1329
  if (!B)
1330
1330
  return !1;
1331
- const M = B;
1332
- return (M == null ? void 0 : M.loading) ?? !1;
1333
- }, ye = {
1334
- getFieldsValue: G,
1335
- setFieldsValue: H,
1336
- resetFields: ne,
1337
- validate: X,
1338
- validateFields: ae,
1339
- submit: R,
1340
- scrollToField: de,
1341
- clearValidate: ie,
1331
+ const T = B;
1332
+ return (T == null ? void 0 : T.loading) ?? !1;
1333
+ }, xe = {
1334
+ getFieldsValue: K,
1335
+ setFieldsValue: j,
1336
+ resetFields: U,
1337
+ validate: se,
1338
+ validateFields: Q,
1339
+ submit: c,
1340
+ scrollToField: le,
1341
+ clearValidate: _e,
1342
1342
  updateSchema: fe,
1343
- appendSchemaByField: oe,
1344
- removeSchemaByField: be,
1345
- setProps: ce,
1346
- getComponentInstance: xe,
1343
+ appendSchemaByField: ae,
1344
+ removeSchemaByField: pe,
1345
+ setProps: ue,
1346
+ getComponentInstance: de,
1347
1347
  getFieldOptions: Pe,
1348
1348
  isFieldLoading: Se
1349
1349
  };
1350
1350
  e({
1351
- ...ye,
1352
- registerFieldInstance: Ce
1351
+ ...xe,
1352
+ registerFieldInstance: we
1353
1353
  });
1354
- const pe = () => {
1355
- g.value = [...t.schemas ?? []], C();
1356
- }, me = () => {
1357
- typeof window < "u" && (W.value = window.innerWidth);
1354
+ const me = () => {
1355
+ w.value = [...t.schemas ?? []], W();
1356
+ }, ve = () => {
1357
+ typeof window < "u" && (O.value = window.innerWidth);
1358
1358
  };
1359
- return ge(() => {
1360
- pe(), n("register", ye), typeof window < "u" && window.addEventListener("resize", me);
1361
- }), Fe(() => {
1362
- typeof window < "u" && window.removeEventListener("resize", me);
1363
- }), ee(() => T.value, (m) => {
1364
- !E.value || m === void 0 || V(I(m), !1);
1365
- }, { deep: !0, immediate: !0 }), ee(() => [t.schemas, t.initialValues], pe, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: l, formRef: a, formWrapRef: s, submitLoading: c, collapsed: f, formModel: v, formRules: F, innerSchemas: g, innerProps: b, fieldInstanceMap: p, BREAKPOINTS: _, getEffectiveSpan: A, getComponentSetting: O, effectiveProps: P, controlledModelValue: T, isControlled: E, currentFormModel: N, formCustomComponents: S, effectiveActionColOptions: d, windowWidth: W, getVisibleSchemaCount: y, hasMoreFields: K, formListeners: q, displaySchemas: Q, shouldShow: J, getColProps: Y, getSlotName: Z, resolveSchemaModel: I, applyFormModel: V, updateFormModel: j, initForm: C, filterByIfShow: i, processFieldMapToTime: h, handleSubmit: R, handleReset: z, setFieldsValue: H, getFieldsValue: G, resetFields: ne, handleFieldChange: le, validate: X, validateFields: ae, scrollToField: de, clearValidate: ie, updateSchema: fe, appendSchemaByField: oe, removeSchemaByField: be, setProps: ce, registerFieldInstance: Ce, getComponentInstance: xe, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: ye, syncSchemas: pe, handleResize: me, ProFormItem: Ze, FormActions: Xe };
1359
+ return ye(() => {
1360
+ me(), n("register", xe), typeof window < "u" && window.addEventListener("resize", ve);
1361
+ }), ke(() => {
1362
+ typeof window < "u" && window.removeEventListener("resize", ve);
1363
+ }), te(() => M.value, (m) => {
1364
+ !z.value || m === void 0 || X(Z(m), !1);
1365
+ }, { deep: !0, immediate: !0 }), te(() => [t.schemas, t.initialValues], me, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: l, formRef: a, formWrapRef: r, submitLoading: d, collapsed: h, formModel: v, formRules: k, innerSchemas: w, innerProps: y, fieldInstanceMap: p, BREAKPOINTS: _, getEffectiveSpan: A, getComponentSetting: I, effectiveProps: S, controlledModelValue: M, isControlled: z, currentFormModel: V, formCustomComponents: R, effectiveActionColOptions: f, windowWidth: O, getVisibleSchemaCount: C, hasMoreFields: q, formListeners: L, displaySchemas: Y, shouldShow: G, getColProps: ne, getSlotName: J, resolveSchemaModel: Z, applyFormModel: X, updateFormModel: E, initForm: W, filterByIfShow: g, processFieldMapToTime: u, handleSubmit: c, handleReset: b, setFieldsValue: j, getFieldsValue: K, resetFields: U, handleFieldChange: ee, validate: se, validateFields: Q, scrollToField: le, clearValidate: _e, updateSchema: fe, appendSchemaByField: ae, removeSchemaByField: pe, setProps: ue, registerFieldInstance: we, getComponentInstance: de, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: xe, syncSchemas: me, handleResize: ve, ProFormItem: Ze, FormActions: Xe };
1366
1366
  }
1367
1367
  });
1368
1368
  var Kt = function() {
1369
1369
  var e = this, n = e._self._c, t = e._self._setupProxy;
1370
1370
  return n("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [n("el-form", e._g(e._b({ ref: "formRef", staticClass: "ecp-pro-form", attrs: { model: t.currentFormModel, rules: t.formRules, "label-width": t.effectiveProps.labelWidth, "label-position": t.effectiveProps.labelPosition, size: t.effectiveProps.size, disabled: t.effectiveProps.disabled } }, "el-form", e.$attrs, !1), t.formListeners), [e._t("formHeader"), n("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(l) {
1371
- var a, s;
1372
- return [t.shouldShow(l) ? n("el-col", e._b({ key: l.field, attrs: { offset: ((a = l.colProps) == null ? void 0 : a.offset) ?? ((s = t.effectiveProps.baseColProps) == null ? void 0 : s.offset) ?? 0, "data-field": l.field } }, "el-col", t.getColProps(l), !1), [n(t.ProFormItem, { attrs: { schema: l, "form-model": t.currentFormModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, colon: t.effectiveProps.colon, "custom-components": t.formCustomComponents, "on-field-change": t.handleFieldChange, "register-field-instance": t.registerFieldInstance } }, [t.slots[t.getSlotName(l)] ? [e._t(t.getSlotName(l), null, { model: t.currentFormModel, schema: l, field: l.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1371
+ var a, r;
1372
+ return [t.shouldShow(l) ? n("el-col", e._b({ key: l.field, attrs: { offset: ((a = l.colProps) == null ? void 0 : a.offset) ?? ((r = t.effectiveProps.baseColProps) == null ? void 0 : r.offset) ?? 0, "data-field": l.field } }, "el-col", t.getColProps(l), !1), [n(t.ProFormItem, { attrs: { schema: l, "form-model": t.currentFormModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, colon: t.effectiveProps.colon, "custom-components": t.formCustomComponents, "on-field-change": t.handleFieldChange, "register-field-instance": t.registerFieldInstance } }, [t.slots[t.getSlotName(l)] ? [e._t(t.getSlotName(l), null, { model: t.currentFormModel, schema: l, field: l.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1373
1373
  }), t.effectiveProps.showActionButtonGroup ? n("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [n(t.FormActions, { attrs: { "show-action-button-group": t.effectiveProps.showActionButtonGroup, "show-submit-button": t.effectiveProps.showSubmitButton, "show-reset-button": t.effectiveProps.showResetButton, "submit-button-text": t.effectiveProps.submitButtonText, "reset-button-text": t.effectiveProps.resetButtonText, "submit-button-icon": t.effectiveProps.submitButtonIcon, "reset-button-icon": t.effectiveProps.resetButtonIcon, "submit-loading": t.submitLoading, "show-advanced-button": t.effectiveProps.showAdvancedButton, "has-more-fields": t.hasMoreFields, collapsed: t.collapsed, "action-col-options": t.effectiveActionColOptions }, on: { submit: t.handleSubmit, reset: t.handleReset, toggle: function(l) {
1374
1374
  t.collapsed = !t.collapsed;
1375
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(l) {
1376
1376
  t.collapsed = !t.collapsed;
1377
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);
1378
- }, jt = [], qt = /* @__PURE__ */ re(
1378
+ }, jt = [], qt = /* @__PURE__ */ ie(
1379
1379
  Lt,
1380
1380
  Kt,
1381
1381
  jt,
@@ -1386,86 +1386,86 @@ var Kt = function() {
1386
1386
  null
1387
1387
  );
1388
1388
  const Qe = qt.exports;
1389
- function _n(r) {
1390
- const e = D(null), n = D(r ? _e(r) : void 0), t = () => r ? _e(r) : void 0, l = (S) => {
1391
- e.value = S;
1392
- const d = t();
1393
- d && Object.keys(d).length > 0 && S.setProps(d);
1389
+ function _n(s) {
1390
+ const e = D(null), n = D(s ? be(s) : void 0), t = () => s ? be(s) : void 0, l = (R) => {
1391
+ e.value = R;
1392
+ const f = t();
1393
+ f && Object.keys(f).length > 0 && R.setProps(f);
1394
1394
  };
1395
- r && ee(
1395
+ s && te(
1396
1396
  () => t(),
1397
- (S) => {
1398
- n.value = S, S && e.value && e.value.setProps(S);
1397
+ (R) => {
1398
+ n.value = R, R && e.value && e.value.setProps(R);
1399
1399
  },
1400
1400
  { deep: !0 }
1401
1401
  );
1402
1402
  const a = () => {
1403
- var S;
1404
- return ((S = e.value) == null ? void 0 : S.getFieldsValue()) ?? {};
1405
- }, s = async (S) => {
1406
- var d;
1407
- await ((d = e.value) == null ? void 0 : d.setFieldsValue(S));
1408
- }, c = async () => {
1409
- var S;
1410
- await ((S = e.value) == null ? void 0 : S.resetFields());
1411
- }, f = (S) => {
1412
- var d;
1413
- return ((d = e.value) == null ? void 0 : d.validate(S)) ?? Promise.resolve();
1414
- }, v = (S) => {
1415
- var d;
1416
- return ((d = e.value) == null ? void 0 : d.validateFields(S)) ?? Promise.resolve();
1417
- }, F = () => {
1418
- var S;
1419
- return ((S = e.value) == null ? void 0 : S.submit()) ?? Promise.resolve();
1420
- }, g = (S, d) => {
1421
- var W;
1422
- return ((W = e.value) == null ? void 0 : W.scrollToField(S, d)) ?? Promise.resolve();
1423
- }, b = (S) => {
1424
- var d;
1425
- (d = e.value) == null || d.clearValidate(S);
1426
- }, p = (S) => {
1427
- var d;
1428
- return ((d = e.value) == null ? void 0 : d.updateSchema(S)) ?? Promise.resolve();
1429
- }, _ = (S, d, W) => {
1430
- var y;
1431
- return ((y = e.value) == null ? void 0 : y.appendSchemaByField(S, d, W)) ?? Promise.resolve();
1432
- }, A = (S) => {
1433
- var d;
1434
- return ((d = e.value) == null ? void 0 : d.removeSchemaByField(S)) ?? Promise.resolve();
1435
- }, O = async (S) => {
1436
- var d;
1437
- n.value = { ...n.value, ...S }, await ((d = e.value) == null ? void 0 : d.setProps(S));
1438
- }, P = (S) => {
1439
- var d;
1440
- return ((d = e.value) == null ? void 0 : d.getComponentInstance(S)) ?? null;
1403
+ var R;
1404
+ return ((R = e.value) == null ? void 0 : R.getFieldsValue()) ?? {};
1405
+ }, r = async (R) => {
1406
+ var f;
1407
+ await ((f = e.value) == null ? void 0 : f.setFieldsValue(R));
1408
+ }, d = async () => {
1409
+ var R;
1410
+ await ((R = e.value) == null ? void 0 : R.resetFields());
1411
+ }, h = (R) => {
1412
+ var f;
1413
+ return ((f = e.value) == null ? void 0 : f.validate(R)) ?? Promise.resolve();
1414
+ }, v = (R) => {
1415
+ var f;
1416
+ return ((f = e.value) == null ? void 0 : f.validateFields(R)) ?? Promise.resolve();
1417
+ }, k = () => {
1418
+ var R;
1419
+ return ((R = e.value) == null ? void 0 : R.submit()) ?? Promise.resolve();
1420
+ }, w = (R, f) => {
1421
+ var O;
1422
+ return ((O = e.value) == null ? void 0 : O.scrollToField(R, f)) ?? Promise.resolve();
1423
+ }, y = (R) => {
1424
+ var f;
1425
+ (f = e.value) == null || f.clearValidate(R);
1426
+ }, p = (R) => {
1427
+ var f;
1428
+ return ((f = e.value) == null ? void 0 : f.updateSchema(R)) ?? Promise.resolve();
1429
+ }, _ = (R, f, O) => {
1430
+ var C;
1431
+ return ((C = e.value) == null ? void 0 : C.appendSchemaByField(R, f, O)) ?? Promise.resolve();
1432
+ }, A = (R) => {
1433
+ var f;
1434
+ return ((f = e.value) == null ? void 0 : f.removeSchemaByField(R)) ?? Promise.resolve();
1435
+ }, I = async (R) => {
1436
+ var f;
1437
+ n.value = { ...n.value, ...R }, await ((f = e.value) == null ? void 0 : f.setProps(R));
1438
+ }, S = (R) => {
1439
+ var f;
1440
+ return ((f = e.value) == null ? void 0 : f.getComponentInstance(R)) ?? null;
1441
1441
  };
1442
- function T(S, d = !1) {
1443
- return e.value ? d ? e.value.getFieldOptions(S, !0) : e.value.getFieldOptions(S) : [];
1442
+ function M(R, f = !1) {
1443
+ return e.value ? f ? e.value.getFieldOptions(R, !0) : e.value.getFieldOptions(R) : [];
1444
1444
  }
1445
1445
  return [l, {
1446
1446
  register: l,
1447
1447
  formAction: e,
1448
1448
  getFieldsValue: a,
1449
- setFieldsValue: s,
1450
- resetFields: c,
1451
- validate: f,
1449
+ setFieldsValue: r,
1450
+ resetFields: d,
1451
+ validate: h,
1452
1452
  validateFields: v,
1453
- submit: F,
1454
- scrollToField: g,
1455
- clearValidate: b,
1453
+ submit: k,
1454
+ scrollToField: w,
1455
+ clearValidate: y,
1456
1456
  updateSchema: p,
1457
1457
  appendSchemaByField: _,
1458
1458
  removeSchemaByField: A,
1459
- setProps: O,
1460
- getComponentInstance: P,
1461
- getFieldOptions: T,
1462
- isFieldLoading: (S) => {
1463
- var d;
1464
- return ((d = e.value) == null ? void 0 : d.isFieldLoading(S)) ?? !1;
1459
+ setProps: I,
1460
+ getComponentInstance: S,
1461
+ getFieldOptions: M,
1462
+ isFieldLoading: (R) => {
1463
+ var f;
1464
+ return ((f = e.value) == null ? void 0 : f.isFieldLoading(R)) ?? !1;
1465
1465
  }
1466
1466
  }];
1467
1467
  }
1468
- const Ht = /* @__PURE__ */ te({
1468
+ const Ht = /* @__PURE__ */ oe({
1469
1469
  __name: "ProDescriptions",
1470
1470
  props: {
1471
1471
  title: null,
@@ -1480,8 +1480,8 @@ const Ht = /* @__PURE__ */ te({
1480
1480
  collapseOptions: { default: () => ({ canExpand: !1, defaultExpand: !0, expandButtonText: "展开", collapseButtonText: "收起", visibleRows: 1 }) }
1481
1481
  },
1482
1482
  emits: ["register"],
1483
- setup(r, { expose: e, emit: n }) {
1484
- const t = r, l = D({}), a = D({}), s = D([]), c = D(typeof window < "u" ? window.innerWidth : 1920), f = D(!0), v = te({
1483
+ setup(s, { expose: e, emit: n }) {
1484
+ const t = s, l = D({}), a = D({}), r = D([]), d = D(typeof window < "u" ? window.innerWidth : 1920), h = D(!0), v = oe({
1485
1485
  name: "EcpDescriptionValueRenderer",
1486
1486
  props: {
1487
1487
  schema: { type: Object, required: !0 },
@@ -1489,117 +1489,117 @@ const Ht = /* @__PURE__ */ te({
1489
1489
  record: { type: Object, required: !0 },
1490
1490
  emptyText: { type: String, default: "-" }
1491
1491
  },
1492
- setup(i) {
1492
+ setup(g) {
1493
1493
  return () => {
1494
- const h = i.schema, R = i.record, z = i.value, H = (G) => {
1495
- const ne = F(h, G === i.emptyText ? z : G, R), le = ve("span", G);
1496
- return ne ? ve("el-tooltip", { props: ne }, [le]) : le;
1494
+ const u = g.schema, c = g.record, b = g.value, j = (K) => {
1495
+ const U = k(u, K === g.emptyText ? b : K, c), ee = he("span", K);
1496
+ return U ? he("el-tooltip", { props: U }, [ee]) : ee;
1497
1497
  };
1498
- if (h.render) {
1499
- const G = h.render(z, R);
1500
- return G == null || G === "" ? H(i.emptyText) : typeof G == "string" || typeof G == "number" ? H(String(G)) : G;
1498
+ if (u.render) {
1499
+ const K = u.render(b, c);
1500
+ return K == null || K === "" ? j(g.emptyText) : typeof K == "string" || typeof K == "number" ? j(String(K)) : K;
1501
1501
  }
1502
- return Array.isArray(z) ? H(z.length ? z.join(", ") : i.emptyText) : z == null || z === "" ? H(i.emptyText) : H(typeof z == "object" ? JSON.stringify(z) : String(z));
1502
+ return Array.isArray(b) ? j(b.length ? b.join(", ") : g.emptyText) : b == null || b === "" ? j(g.emptyText) : j(typeof b == "object" ? JSON.stringify(b) : String(b));
1503
1503
  };
1504
1504
  }
1505
- }), F = (i, h, R) => {
1506
- const z = i.tooltip;
1507
- if (!z)
1505
+ }), k = (g, u, c) => {
1506
+ const b = g.tooltip;
1507
+ if (!b)
1508
1508
  return null;
1509
- const H = typeof z == "function" ? z({ value: h, record: R, schema: i }) : z;
1510
- return De(H, h);
1511
- }, { mergeSettings: g } = Be(), b = w(() => g("ProDescriptions", { ...t, ...l.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, _ = (i, h) => {
1512
- if (typeof i == "number")
1513
- return Math.max(1, i);
1514
- const R = i ?? {};
1515
- return h >= p.xxl ? R.xxl ?? R.xl ?? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.xl ? R.xl ?? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.lg ? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.md ? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.sm ? R.sm ?? R.xs ?? 2 : R.xs ?? 1;
1516
- }, A = w(() => _(b.value.column, c.value)), O = w(() => b.value.data ?? a.value ?? {}), P = w(() => (s.value.length ? s.value : b.value.schema ?? []).filter((i) => i.dataIndex || i.field ? typeof i.show == "function" ? i.show(O.value) : i.show !== !1 : !1).map((i) => ({
1517
- ...i,
1518
- dataIndex: i.dataIndex || i.field || ""
1519
- }))), T = w(() => {
1520
- const i = [];
1521
- let h = { items: [] }, R = 0;
1522
- const z = A.value;
1523
- return P.value.forEach((H, G) => {
1524
- const ne = P.value.length - G, le = Math.max(1, Math.min(H.span ?? 1, z)), X = ne === 1 ? z - R || z : le;
1525
- R + X > z && (i.push(h), h = { items: [] }, R = 0);
1526
- const ae = ne === 1 && R < z ? Math.max(1, z - R) : X;
1527
- h.items.push({ ...H, _span: ae }), R += ae, R >= z && (i.push(h), h = { items: [] }, R = 0);
1528
- }), h.items.length > 0 && i.push(h), i;
1529
- }), E = w(() => {
1530
- var h;
1531
- if (!N.value || f.value)
1532
- return T.value;
1533
- const i = Math.max(1, ((h = b.value.collapseOptions) == null ? void 0 : h.visibleRows) ?? 1);
1534
- return T.value.slice(0, i);
1535
- }), N = w(() => {
1536
- var h, R;
1537
- const i = Math.max(1, ((h = b.value.collapseOptions) == null ? void 0 : h.visibleRows) ?? 1);
1538
- return !!b.value.useCollapse && !!((R = b.value.collapseOptions) != null && R.canExpand) && T.value.length > i;
1539
- }), S = w(() => !!b.value.title || !!b.value.helpMessage || N.value), d = w(() => {
1540
- var i, h;
1509
+ const j = typeof b == "function" ? b({ value: u, record: c, schema: g }) : b;
1510
+ return Ee(j, u);
1511
+ }, { mergeSettings: w } = Be(), y = x(() => w("ProDescriptions", { ...t, ...l.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, _ = (g, u) => {
1512
+ if (typeof g == "number")
1513
+ return Math.max(1, g);
1514
+ const c = g ?? {};
1515
+ return u >= p.xxl ? c.xxl ?? c.xl ?? c.lg ?? c.md ?? c.sm ?? c.xs ?? 3 : u >= p.xl ? c.xl ?? c.lg ?? c.md ?? c.sm ?? c.xs ?? 3 : u >= p.lg ? c.lg ?? c.md ?? c.sm ?? c.xs ?? 3 : u >= p.md ? c.md ?? c.sm ?? c.xs ?? 3 : u >= p.sm ? c.sm ?? c.xs ?? 2 : c.xs ?? 1;
1516
+ }, A = x(() => _(y.value.column, d.value)), I = x(() => y.value.data ?? a.value ?? {}), S = x(() => (r.value.length ? r.value : y.value.schema ?? []).filter((g) => g.dataIndex || g.field ? typeof g.show == "function" ? g.show(I.value) : g.show !== !1 : !1).map((g) => ({
1517
+ ...g,
1518
+ dataIndex: g.dataIndex || g.field || ""
1519
+ }))), M = x(() => {
1520
+ const g = [];
1521
+ let u = { items: [] }, c = 0;
1522
+ const b = A.value;
1523
+ return S.value.forEach((j, K) => {
1524
+ const U = S.value.length - K, ee = Math.max(1, Math.min(j.span ?? 1, b)), se = U === 1 ? b - c || b : ee;
1525
+ c + se > b && (g.push(u), u = { items: [] }, c = 0);
1526
+ const Q = U === 1 && c < b ? Math.max(1, b - c) : se;
1527
+ u.items.push({ ...j, _span: Q }), c += Q, c >= b && (g.push(u), u = { items: [] }, c = 0);
1528
+ }), u.items.length > 0 && g.push(u), g;
1529
+ }), z = x(() => {
1530
+ var u;
1531
+ if (!V.value || h.value)
1532
+ return M.value;
1533
+ const g = Math.max(1, ((u = y.value.collapseOptions) == null ? void 0 : u.visibleRows) ?? 1);
1534
+ return M.value.slice(0, g);
1535
+ }), V = x(() => {
1536
+ var u, c;
1537
+ const g = Math.max(1, ((u = y.value.collapseOptions) == null ? void 0 : u.visibleRows) ?? 1);
1538
+ return !!y.value.useCollapse && !!((c = y.value.collapseOptions) != null && c.canExpand) && M.value.length > g;
1539
+ }), R = x(() => !!y.value.title || !!y.value.helpMessage || V.value), f = x(() => {
1540
+ var g, u;
1541
1541
  return {
1542
- expand: ((i = b.value.collapseOptions) == null ? void 0 : i.expandButtonText) ?? "展开",
1543
- collapse: ((h = b.value.collapseOptions) == null ? void 0 : h.collapseButtonText) ?? "收起"
1542
+ expand: ((g = y.value.collapseOptions) == null ? void 0 : g.expandButtonText) ?? "展开",
1543
+ collapse: ((u = y.value.collapseOptions) == null ? void 0 : u.collapseButtonText) ?? "收起"
1544
1544
  };
1545
- }), W = w(() => ({
1545
+ }), O = x(() => ({
1546
1546
  gridTemplateColumns: `repeat(${A.value}, minmax(0, 1fr))`
1547
- })), y = (i) => ({
1548
- gridColumn: `span ${i._span}`
1549
- }), K = (i) => ({
1550
- minWidth: i.labelMinWidth ? `${i.labelMinWidth}px` : void 0,
1551
- ...i.labelStyle ?? {}
1552
- }), q = (i) => ({
1553
- minWidth: i.contentMinWidth ? `${i.contentMinWidth}px` : void 0,
1554
- ...i.contentStyle ?? {}
1555
- }), Q = (i) => O.value[i.dataIndex], J = () => {
1556
- s.value = [...b.value.schema ?? []];
1557
- }, Y = () => {
1558
- a.value = { ...b.value.data ?? {} };
1559
- }, Z = async (i) => {
1560
- l.value = { ...l.value, ...i }, i.schema && (s.value = [...i.schema]), i.data && (a.value = { ...i.data });
1561
- }, I = async (i) => {
1562
- a.value = { ...a.value, ...i }, l.value = { ...l.value, data: a.value };
1563
- }, V = () => ({ ...b.value.data ?? a.value ?? {} }), j = {
1564
- setProps: Z,
1565
- setData: I,
1566
- getData: V
1547
+ })), C = (g) => ({
1548
+ gridColumn: `span ${g._span}`
1549
+ }), q = (g) => ({
1550
+ minWidth: g.labelMinWidth ? `${g.labelMinWidth}px` : void 0,
1551
+ ...g.labelStyle ?? {}
1552
+ }), L = (g) => ({
1553
+ minWidth: g.contentMinWidth ? `${g.contentMinWidth}px` : void 0,
1554
+ ...g.contentStyle ?? {}
1555
+ }), Y = (g) => I.value[g.dataIndex], G = () => {
1556
+ r.value = [...y.value.schema ?? []];
1557
+ }, ne = () => {
1558
+ a.value = { ...y.value.data ?? {} };
1559
+ }, J = async (g) => {
1560
+ l.value = { ...l.value, ...g }, g.schema && (r.value = [...g.schema]), g.data && (a.value = { ...g.data });
1561
+ }, Z = async (g) => {
1562
+ a.value = { ...a.value, ...g }, l.value = { ...l.value, data: a.value };
1563
+ }, X = () => ({ ...y.value.data ?? a.value ?? {} }), E = {
1564
+ setProps: J,
1565
+ setData: Z,
1566
+ getData: X
1567
1567
  };
1568
- e(j);
1569
- const C = () => {
1570
- typeof window < "u" && (c.value = window.innerWidth);
1568
+ e(E);
1569
+ const W = () => {
1570
+ typeof window < "u" && (d.value = window.innerWidth);
1571
1571
  };
1572
- return ge(() => {
1573
- var i;
1574
- J(), Y(), f.value = ((i = b.value.collapseOptions) == null ? void 0 : i.defaultExpand) !== !1, n("register", j), typeof window < "u" && window.addEventListener("resize", C);
1575
- }), Fe(() => {
1576
- typeof window < "u" && window.removeEventListener("resize", C);
1577
- }), ee(() => b.value.schema, J, { deep: !0 }), ee(() => b.value.data, Y, { deep: !0 }), ee(() => {
1578
- var i;
1579
- return (i = b.value.collapseOptions) == null ? void 0 : i.defaultExpand;
1580
- }, (i) => {
1581
- i !== void 0 && (f.value = i);
1582
- }), { __sfc: !0, props: t, emit: n, innerProps: l, innerData: a, innerSchema: s, windowWidth: c, expanded: f, DescriptionValueRenderer: v, normalizeTooltip: F, mergeSettings: g, effectiveProps: b, breakpoints: p, resolveColumn: _, currentColumn: A, effectiveData: O, visibleSchema: P, normalizedRows: T, renderedRows: E, showCollapseButton: N, showHeader: S, collapseButtonText: d, bodyStyle: W, getItemStyle: y, getLabelStyle: K, getContentStyle: q, getItemValue: Q, syncSchema: J, syncData: Y, setProps: Z, setData: I, getData: V, descriptionAction: j, updateWindowWidth: C };
1572
+ return ye(() => {
1573
+ var g;
1574
+ G(), ne(), h.value = ((g = y.value.collapseOptions) == null ? void 0 : g.defaultExpand) !== !1, n("register", E), typeof window < "u" && window.addEventListener("resize", W);
1575
+ }), ke(() => {
1576
+ typeof window < "u" && window.removeEventListener("resize", W);
1577
+ }), te(() => y.value.schema, G, { deep: !0 }), te(() => y.value.data, ne, { deep: !0 }), te(() => {
1578
+ var g;
1579
+ return (g = y.value.collapseOptions) == null ? void 0 : g.defaultExpand;
1580
+ }, (g) => {
1581
+ g !== void 0 && (h.value = g);
1582
+ }), { __sfc: !0, props: t, emit: n, innerProps: l, innerData: a, innerSchema: r, windowWidth: d, expanded: h, DescriptionValueRenderer: v, normalizeTooltip: k, mergeSettings: w, effectiveProps: y, breakpoints: p, resolveColumn: _, currentColumn: A, effectiveData: I, visibleSchema: S, normalizedRows: M, renderedRows: z, showCollapseButton: V, showHeader: R, collapseButtonText: f, bodyStyle: O, getItemStyle: C, getLabelStyle: q, getContentStyle: L, getItemValue: Y, syncSchema: G, syncData: ne, setProps: J, setData: Z, getData: X, descriptionAction: E, updateWindowWidth: W };
1583
1583
  }
1584
1584
  });
1585
1585
  var Gt = function() {
1586
1586
  var l;
1587
1587
  var e = this, n = e._self._c, t = e._self._setupProxy;
1588
- return n("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? n("div", { staticClass: "ecp-pro-descriptions__header" }, [n("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? n("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(a, s) {
1589
- return n("div", { key: s }, [e._v(e._s(a))]);
1590
- }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (l = t.effectiveProps.collapseOptions) != null && l.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? n("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(a, s) {
1591
- return n("div", { key: `collapse-${s}` }, [e._v(e._s(a))]);
1588
+ return n("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? n("div", { staticClass: "ecp-pro-descriptions__header" }, [n("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? n("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(a, r) {
1589
+ return n("div", { key: r }, [e._v(e._s(a))]);
1590
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (l = t.effectiveProps.collapseOptions) != null && l.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? n("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(a, r) {
1591
+ return n("div", { key: `collapse-${r}` }, [e._v(e._s(a))]);
1592
1592
  }), 0) : n("span", [e._v(e._s(t.effectiveProps.collapseOptions.helpMessage))])]), n("i", { staticClass: "el-icon-info ecp-pro-descriptions__help" })], 2) : e._e()], 1), t.showCollapseButton ? n("el-button", { staticClass: "ecp-pro-descriptions__toggle", attrs: { type: "text" }, on: { click: function(a) {
1593
1593
  t.expanded = !t.expanded;
1594
1594
  } } }, [e._v(" " + e._s(t.expanded ? t.collapseButtonText.collapse : t.collapseButtonText.expand) + " "), n("i", { staticClass: "el-icon-arrow-down", class: t.expanded ? "is-expanded" : "" })]) : e._e()], 1) : e._e(), n("div", e._b({ staticClass: "ecp-pro-descriptions__body", class: [
1595
1595
  `is-${t.effectiveProps.size}`,
1596
1596
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1597
- ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(a, s) {
1598
- return [e._l(a.items, function(c) {
1599
- return [n("div", { key: `${s}-${c.dataIndex || c.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(c) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(c) }, [e._v(" " + e._s(c.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(c) }, [e.$scopedSlots[c.slot || c.dataIndex] ? e._t(c.slot || c.dataIndex, null, { value: t.getItemValue(c), record: t.effectiveData, schema: c }) : n(t.DescriptionValueRenderer, { attrs: { schema: c, value: t.getItemValue(c), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1597
+ ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(a, r) {
1598
+ return [e._l(a.items, function(d) {
1599
+ return [n("div", { key: `${r}-${d.dataIndex || d.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(d) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(d) }, [e._v(" " + e._s(d.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(d) }, [e.$scopedSlots[d.slot || d.dataIndex] ? e._t(d.slot || d.dataIndex, null, { value: t.getItemValue(d), record: t.effectiveData, schema: d }) : n(t.DescriptionValueRenderer, { attrs: { schema: d, value: t.getItemValue(d), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1600
1600
  })];
1601
1601
  })], 2)]);
1602
- }, Ut = [], Jt = /* @__PURE__ */ re(
1602
+ }, Ut = [], Jt = /* @__PURE__ */ ie(
1603
1603
  Ht,
1604
1604
  Gt,
1605
1605
  Ut,
@@ -1610,30 +1610,30 @@ var Gt = function() {
1610
1610
  null
1611
1611
  );
1612
1612
  const Ye = Jt.exports;
1613
- function gn(r) {
1614
- const e = D(null), n = () => r ? _e(r) : void 0, t = () => {
1615
- const s = _e(e);
1616
- if (!s)
1613
+ function gn(s) {
1614
+ const e = D(null), n = () => s ? be(s) : void 0, t = () => {
1615
+ const r = be(e);
1616
+ if (!r)
1617
1617
  throw new Error("ProDescriptions instance has not been registered");
1618
- return s;
1619
- }, l = (s) => {
1620
- e.value = s;
1621
- const c = n();
1622
- c && Object.keys(c).length > 0 && s.setProps(c);
1618
+ return r;
1619
+ }, l = (r) => {
1620
+ e.value = r;
1621
+ const d = n();
1622
+ d && Object.keys(d).length > 0 && r.setProps(d);
1623
1623
  };
1624
- return r && ee(
1624
+ return s && te(
1625
1625
  () => n(),
1626
- (s) => {
1627
- s && e.value && e.value.setProps(s);
1626
+ (r) => {
1627
+ r && e.value && e.value.setProps(r);
1628
1628
  },
1629
1629
  { deep: !0 }
1630
1630
  ), [l, {
1631
- setProps: (s) => t().setProps(s),
1632
- setData: (s) => t().setData(s),
1631
+ setProps: (r) => t().setProps(r),
1632
+ setData: (r) => t().setData(r),
1633
1633
  getData: () => t().getData()
1634
1634
  }];
1635
1635
  }
1636
- const Zt = /* @__PURE__ */ te({
1636
+ const Zt = /* @__PURE__ */ oe({
1637
1637
  __name: "CollapseContainer",
1638
1638
  props: {
1639
1639
  title: null,
@@ -1654,33 +1654,33 @@ const Zt = /* @__PURE__ */ te({
1654
1654
  contentStyle: { default: () => ({}) }
1655
1655
  },
1656
1656
  emits: ["update:expanded", "change", "collapse", "expand"],
1657
- setup(r, { expose: e, emit: n }) {
1658
- const t = r, l = we(), { mergeSettings: a } = Be(), s = D(t.expanded ?? t.defaultExpand), c = w(() => a("CollapseContainer", { ...t })), f = w(() => c.value.canExpand ?? c.value.canExpan ?? !0), v = w(() => c.value.expanded !== void 0), F = w(() => v.value ? !!c.value.expanded : s.value), g = w(() => !!l.title || !!l.action || !!c.value.title || !!c.value.helpMessage || f.value), b = w(() => f.value), p = w(() => {
1659
- const T = c.value.wrapperProps ?? {}, E = T.class, N = T.style, S = { ...T };
1660
- return delete S.class, delete S.style, {
1661
- ...S,
1662
- class: E,
1663
- style: N
1657
+ setup(s, { expose: e, emit: n }) {
1658
+ const t = s, l = Ce(), { mergeSettings: a } = Be(), r = D(t.expanded ?? t.defaultExpand), d = x(() => a("CollapseContainer", { ...t })), h = x(() => d.value.canExpand ?? d.value.canExpan ?? !0), v = x(() => d.value.expanded !== void 0), k = x(() => v.value ? !!d.value.expanded : r.value), w = x(() => !!l.title || !!l.action || !!d.value.title || !!d.value.helpMessage || h.value), y = x(() => h.value), p = x(() => {
1659
+ const M = d.value.wrapperProps ?? {}, z = M.class, V = M.style, R = { ...M };
1660
+ return delete R.class, delete R.style, {
1661
+ ...R,
1662
+ class: z,
1663
+ style: V
1664
1664
  };
1665
1665
  }), _ = () => {
1666
- !c.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1666
+ !d.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1667
1667
  window.dispatchEvent(new Event("resize"));
1668
1668
  }, 220);
1669
- }, A = (T) => {
1670
- v.value || (s.value = T), n("update:expanded", T), n("change", T), n(T ? "expand" : "collapse"), _();
1671
- }, O = () => {
1672
- f.value && A(!F.value);
1673
- }, P = () => {
1674
- b.value && O();
1669
+ }, A = (M) => {
1670
+ v.value || (r.value = M), n("update:expanded", M), n("change", M), n(M ? "expand" : "collapse"), _();
1671
+ }, I = () => {
1672
+ h.value && A(!k.value);
1673
+ }, S = () => {
1674
+ y.value && I();
1675
1675
  };
1676
- return ee(() => t.expanded, (T) => {
1677
- T !== void 0 && (s.value = T);
1678
- }), ee(() => t.defaultExpand, (T) => {
1679
- t.expanded === void 0 && (s.value = T);
1676
+ return te(() => t.expanded, (M) => {
1677
+ M !== void 0 && (r.value = M);
1678
+ }), te(() => t.defaultExpand, (M) => {
1679
+ t.expanded === void 0 && (r.value = M);
1680
1680
  }), e({
1681
1681
  setExpanded: A,
1682
- toggleExpand: O
1683
- }), { __sfc: !0, props: t, emit: n, slots: l, mergeSettings: a, innerExpanded: s, effectiveProps: c, resolvedCanExpan: f, isControlled: v, mergedExpanded: F, showHeader: g, canToggleByHeader: b, wrapperProps: p, triggerWindowResize: _, setExpanded: A, toggleExpand: O, handleHeaderClick: P };
1682
+ toggleExpand: I
1683
+ }), { __sfc: !0, props: t, emit: n, slots: l, mergeSettings: a, innerExpanded: r, effectiveProps: d, resolvedCanExpan: h, isControlled: v, mergedExpanded: k, showHeader: w, canToggleByHeader: y, wrapperProps: p, triggerWindowResize: _, setExpanded: A, toggleExpand: I, handleHeaderClick: S };
1684
1684
  }
1685
1685
  });
1686
1686
  var Xt = function() {
@@ -1698,7 +1698,7 @@ var Xt = function() {
1698
1698
  } } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(l) {
1699
1699
  return l.stopPropagation(), t.toggleExpand.apply(null, arguments);
1700
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);
1701
- }, Qt = [], Yt = /* @__PURE__ */ re(
1701
+ }, Qt = [], Yt = /* @__PURE__ */ ie(
1702
1702
  Zt,
1703
1703
  Xt,
1704
1704
  Qt,
@@ -1709,276 +1709,297 @@ var Xt = function() {
1709
1709
  null
1710
1710
  );
1711
1711
  const et = Yt.exports;
1712
- function en(r) {
1713
- const { props: e, emit: n, emitAddRow: t, emitRemoveRow: l } = r, a = D(null), s = (C) => {
1714
- a.value = C;
1715
- }, c = D(null), f = w(() => e.modelValue), v = w(() => f.value !== void 0), F = w(() => v.value ? f.value ?? [] : []), g = w(() => ({ rows: F.value })), b = w(() => F.value.map((C, i) => ({ ...C, _index: i })));
1716
- function p(C) {
1717
- return `r-${C._index}`;
1712
+ function en(s) {
1713
+ const { props: e, emit: n, emitAddRow: t, emitRemoveRow: l } = s, a = D(null), r = (u) => {
1714
+ a.value = u;
1715
+ }, d = D(null), h = x(() => e.modelValue), v = x(() => h.value !== void 0), k = x(() => v.value ? h.value ?? [] : []), w = x(() => ({ rows: k.value })), y = x(() => k.value.map((u, c) => ({ ...u, _index: c })));
1716
+ function p(u) {
1717
+ return `r-${u._index}`;
1718
1718
  }
1719
1719
  function _() {
1720
- return JSON.parse(JSON.stringify(F.value));
1720
+ return JSON.parse(JSON.stringify(k.value));
1721
1721
  }
1722
1722
  function A() {
1723
- const C = {};
1724
- for (const i of e.columns)
1725
- if (i.children && i.children.length > 0)
1726
- for (const h of i.children)
1727
- C[h.key] = "";
1723
+ const u = {};
1724
+ for (const c of e.columns)
1725
+ if (c.children && c.children.length > 0)
1726
+ for (const b of c.children)
1727
+ u[b.key] = "";
1728
1728
  else
1729
- C[i.key] = "";
1730
- return C;
1729
+ u[c.key] = "";
1730
+ return u;
1731
1731
  }
1732
- function O(C) {
1733
- n("update:modelValue", C);
1732
+ function I(u) {
1733
+ n("update:modelValue", u);
1734
1734
  }
1735
- function P(C) {
1736
- return F.value[C._index] ?? {};
1735
+ function S(u) {
1736
+ return k.value[u._index] ?? {};
1737
1737
  }
1738
- function T(C, i, h) {
1739
- if (h) {
1740
- const R = P(C)[i.key];
1741
- return R && typeof R == "object" ? R[h] ?? "" : P(C)[h] ?? "";
1738
+ function M(u, c, b) {
1739
+ if (b) {
1740
+ const j = S(u)[c.key];
1741
+ return j && typeof j == "object" ? j[b] ?? "" : S(u)[b] ?? "";
1742
1742
  }
1743
- return P(C)[i.key] ?? "";
1743
+ return S(u)[c.key] ?? "";
1744
1744
  }
1745
- function E(C, i, h, R) {
1746
- const z = _(), H = { ...z[C._index] };
1747
- if (h) {
1748
- const G = H[i.key];
1749
- if (G && typeof G == "object") {
1750
- const ne = { ...G };
1751
- ne[h] = R, H[i.key] = ne;
1745
+ function z(u, c, b, j) {
1746
+ const K = _(), U = { ...K[u._index] };
1747
+ if (b) {
1748
+ const ee = U[c.key];
1749
+ if (ee && typeof ee == "object") {
1750
+ const se = { ...ee };
1751
+ se[b] = j, U[c.key] = se;
1752
1752
  } else
1753
- H[h] = R;
1753
+ U[b] = j;
1754
1754
  } else
1755
- H[i.key] = R;
1756
- z[C._index] = H, O(z);
1755
+ U[c.key] = j;
1756
+ K[u._index] = U, I(K);
1757
1757
  }
1758
- function N() {
1758
+ function V() {
1759
1759
  t == null || t();
1760
- const C = _();
1761
- C.push(A()), O(C);
1760
+ const u = _();
1761
+ u.push(A()), I(u);
1762
+ }
1763
+ function R(u) {
1764
+ if (!C.value)
1765
+ return;
1766
+ l == null || l(u);
1767
+ const c = _();
1768
+ c.splice(u, 1), I(c);
1762
1769
  }
1763
- function S(C) {
1764
- if (!d.value)
1770
+ function f(u) {
1771
+ return k.value[u] ?? {};
1772
+ }
1773
+ function O(u, c) {
1774
+ if (u < 0 || u >= k.value.length)
1765
1775
  return;
1766
- l == null || l(C);
1767
- const i = _();
1768
- i.splice(C, 1), O(i);
1776
+ const b = _();
1777
+ b[u] = c, I(b);
1769
1778
  }
1770
- const d = w(() => F.value.length > (e.minRows ?? 0));
1771
- function W(C, i, h) {
1772
- return h ? `rows.${C._index}.${h}` : `rows.${C._index}.${i.key}`;
1779
+ const C = x(() => k.value.length > (e.minRows ?? 0));
1780
+ function q(u, c, b) {
1781
+ return b ? `rows.${u._index}.${b}` : `rows.${u._index}.${c.key}`;
1773
1782
  }
1774
- const y = {};
1775
- function K(C) {
1776
- return JSON.stringify(C.map((i) => {
1777
- if (i == null || typeof i != "object")
1778
- return String(i);
1779
- const h = i;
1783
+ const L = {};
1784
+ function Y(u) {
1785
+ return JSON.stringify(u.map((c) => {
1786
+ if (c == null || typeof c != "object")
1787
+ return String(c);
1788
+ const b = c;
1780
1789
  return {
1781
- required: h.required,
1782
- type: h.type,
1783
- message: h.message,
1784
- pattern: String(h.pattern ?? ""),
1785
- min: h.min,
1786
- max: h.max,
1787
- trigger: Array.isArray(h.trigger) ? [...h.trigger] : h.trigger,
1788
- hasValidator: typeof h.validator == "function",
1789
- hasAsyncValidator: typeof h.asyncValidator == "function"
1790
+ required: b.required,
1791
+ type: b.type,
1792
+ message: b.message,
1793
+ pattern: String(b.pattern ?? ""),
1794
+ min: b.min,
1795
+ max: b.max,
1796
+ trigger: Array.isArray(b.trigger) ? [...b.trigger] : b.trigger,
1797
+ hasValidator: typeof b.validator == "function",
1798
+ hasAsyncValidator: typeof b.asyncValidator == "function"
1790
1799
  };
1791
1800
  }));
1792
1801
  }
1793
- const q = w(() => {
1794
- const C = (z) => [
1795
- { required: !0, message: `请输入${z}`, trigger: "change" }
1802
+ const G = x(() => {
1803
+ const u = (K) => [
1804
+ { required: !0, message: `请输入${K}`, trigger: "change" }
1796
1805
  ];
1797
- let i = !1;
1798
- const h = {};
1799
- F.value.forEach((z, H) => {
1800
- for (const G of e.columns) {
1801
- const ne = (le, X, ae) => {
1802
- const de = `rows.${H}.${le}`;
1803
- let ie = [];
1804
- "dynamicRules" in X && X.dynamicRules !== void 0 ? ie = typeof X.dynamicRules == "function" ? X.dynamicRules({ row: z, value: ae, column: X }) : X.dynamicRules : "rules" in X && X.rules !== void 0 ? ie = X.rules : X.required && (ie = C(X.title));
1805
- const fe = K(ie), oe = y[de], ce = (oe == null ? void 0 : oe.__sig) === fe && oe ? oe : ie;
1806
- ce.__sig = fe, h[de] = ce, ce !== oe && (i = !0);
1806
+ let c = !1;
1807
+ const b = {};
1808
+ k.value.forEach((K, U) => {
1809
+ for (const ee of e.columns) {
1810
+ const se = (Q, le, _e) => {
1811
+ const fe = `rows.${U}.${Q}`;
1812
+ let ae = [];
1813
+ "dynamicRules" in le && le.dynamicRules !== void 0 ? ae = typeof le.dynamicRules == "function" ? le.dynamicRules({ row: K, value: _e, column: le }) : le.dynamicRules : "rules" in le && le.rules !== void 0 ? ae = le.rules : le.required && (ae = u(le.title));
1814
+ const pe = Y(ae), ue = L[fe], de = (ue == null ? void 0 : ue.__sig) === pe && ue ? ue : ae;
1815
+ de.__sig = pe, b[fe] = de, de !== ue && (c = !0);
1807
1816
  };
1808
- if (G.children && G.children.length > 0)
1809
- for (const le of G.children) {
1810
- const X = T({ _index: H }, G, le.key);
1811
- ne(le.key, le, X);
1817
+ if (ee.children && ee.children.length > 0)
1818
+ for (const Q of ee.children) {
1819
+ const le = M({ _index: U }, ee, Q.key);
1820
+ se(Q.key, Q, le);
1812
1821
  }
1813
1822
  else {
1814
- const le = T({ _index: H }, G);
1815
- ne(G.key, G, le);
1823
+ const Q = M({ _index: U }, ee);
1824
+ se(ee.key, ee, Q);
1816
1825
  }
1817
1826
  }
1818
1827
  });
1819
- const R = e.rules || {};
1820
- for (const z of Object.keys(R)) {
1821
- const H = R[z];
1822
- h[z] = H, H !== y[z] && (i = !0);
1828
+ const j = e.rules || {};
1829
+ for (const K of Object.keys(j)) {
1830
+ const U = j[K];
1831
+ b[K] = U, U !== L[K] && (c = !0);
1823
1832
  }
1824
- return (i || Object.keys(h).length !== Object.keys(y).length) && (Object.keys(y).forEach((z) => {
1825
- delete y[z];
1826
- }), Object.assign(y, h)), y;
1833
+ return (c || Object.keys(b).length !== Object.keys(L).length) && (Object.keys(L).forEach((K) => {
1834
+ delete L[K];
1835
+ }), Object.assign(L, b)), L;
1827
1836
  });
1828
- function Q() {
1829
- return new Promise((C) => {
1830
- const i = c.value;
1831
- if (!i || typeof i.validate != "function") {
1832
- C(!0);
1837
+ function ne() {
1838
+ return new Promise((u) => {
1839
+ const c = d.value;
1840
+ if (!c || typeof c.validate != "function") {
1841
+ u(!0);
1833
1842
  return;
1834
1843
  }
1835
- i.validate((h) => C(h));
1844
+ c.validate((b) => u(b));
1836
1845
  });
1837
1846
  }
1838
- function J(C) {
1839
- var i, h;
1840
- (h = (i = c.value) == null ? void 0 : i.clearValidate) == null || h.call(i, C);
1847
+ function J(u) {
1848
+ var c, b;
1849
+ (b = (c = d.value) == null ? void 0 : c.clearValidate) == null || b.call(c, u);
1841
1850
  }
1842
- function Y(C) {
1843
- return C.component === "formatted-number" ? "ecp-formatted-number-input" : "el-input";
1851
+ function Z(u) {
1852
+ return u.component === "formatted-number" ? "ecp-formatted-number-input" : "el-input";
1844
1853
  }
1845
- function Z(C) {
1846
- const i = C.componentProps || {}, h = {};
1847
- for (const [R, z] of Object.entries(i))
1848
- /^on[A-Za-z]/.test(R) && typeof z == "function" || (h[R] = z);
1849
- return C.component === "formatted-number" ? { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...h } : h;
1854
+ function X(u) {
1855
+ const c = u.componentProps || {}, b = {};
1856
+ for (const [j, K] of Object.entries(c))
1857
+ /^on[A-Za-z]/.test(j) && typeof K == "function" || (b[j] = K);
1858
+ return u.component === "formatted-number" ? { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...b } : b;
1850
1859
  }
1851
- function I(C, i, h) {
1852
- return (R) => E(C.row, i, h, R);
1860
+ function E(u, c, b) {
1861
+ return (j) => z(u.row, c, b, j);
1853
1862
  }
1854
- const V = w(() => {
1855
- const C = [];
1856
- for (const i of e.columns)
1857
- if (i.children && i.children.length > 0)
1858
- for (const h of i.children)
1859
- C.push(`${i.key}.${h.key}`);
1863
+ const W = x(() => {
1864
+ const u = [];
1865
+ for (const c of e.columns)
1866
+ if (c.children && c.children.length > 0)
1867
+ for (const b of c.children)
1868
+ u.push(`${c.key}.${b.key}`);
1860
1869
  else
1861
- i.hideInTable || C.push(i.key);
1862
- return C;
1870
+ c.hideInTable || u.push(c.key);
1871
+ return u;
1863
1872
  });
1864
1873
  return {
1865
1874
  // 注册
1866
- register: s,
1875
+ register: r,
1867
1876
  // el-form 绑定(formModelRef 包装了数组,满足 el-form :model Object 类型要求)
1868
- formModelRef: g,
1869
- currentModelValue: F,
1870
- mergedRules: q,
1877
+ formModelRef: w,
1878
+ currentModelValue: k,
1879
+ mergedRules: G,
1871
1880
  // el-table 绑定
1872
- tableRows: b,
1881
+ tableRows: y,
1873
1882
  rowKeyFn: p,
1874
1883
  spanMethodAdapter: ({
1875
- rowIndex: C,
1876
- column: i,
1877
- columnIndex: h,
1878
- row: R
1884
+ rowIndex: u,
1885
+ column: c,
1886
+ columnIndex: b,
1887
+ row: j
1879
1888
  }) => {
1880
1889
  if (!e.spanMethod)
1881
1890
  return;
1882
- const z = V.value[h];
1891
+ const K = W.value[b];
1883
1892
  return e.spanMethod({
1884
- row: R,
1885
- column: { ...i, property: z ?? i.property },
1886
- rowIndex: C,
1887
- columnIndex: h
1893
+ row: j,
1894
+ column: { ...c, property: K ?? c.property },
1895
+ rowIndex: u,
1896
+ columnIndex: b
1888
1897
  });
1889
1898
  },
1890
- allLeafColumnKeys: V,
1899
+ allLeafColumnKeys: W,
1891
1900
  // ref
1892
- formRef: c,
1893
- getFormRef: () => c.value,
1901
+ formRef: d,
1902
+ getFormRef: () => d.value,
1894
1903
  // 单元格渲染
1895
- cellComponent: Y,
1896
- cellBind: Z,
1897
- slotUpdateHandler: I,
1898
- getCellProp: W,
1904
+ cellComponent: Z,
1905
+ cellBind: X,
1906
+ slotUpdateHandler: E,
1907
+ getCellProp: q,
1899
1908
  // 单元格值读写
1900
- getCellValue: T,
1901
- setCellValue: E,
1909
+ getCellValue: M,
1910
+ setCellValue: z,
1902
1911
  // 行操作
1903
- handleAddRow: N,
1904
- handleRemoveRow: S,
1912
+ handleAddRow: V,
1913
+ handleRemoveRow: R,
1914
+ // 行读写
1915
+ getRow: f,
1916
+ setRow: O,
1905
1917
  // el-form 实例方法
1906
- validate: Q,
1918
+ validate: ne,
1907
1919
  clearValidate: J
1908
1920
  };
1909
1921
  }
1910
- const tn = /* @__PURE__ */ te({
1922
+ const tn = /* @__PURE__ */ oe({
1911
1923
  __name: "CellEditor",
1912
1924
  props: {
1913
1925
  col: null,
1914
1926
  value: null,
1915
1927
  row: null,
1928
+ index: null,
1916
1929
  size: null,
1917
1930
  placeholder: null,
1918
- action: null
1931
+ formActionType: null
1919
1932
  },
1920
1933
  emits: ["update"],
1921
- setup(r, { emit: e }) {
1922
- const n = r, t = w(() => {
1923
- const v = (typeof n.col.componentProps == "function" ? {} : n.col.componentProps ?? {}).options;
1924
- return Array.isArray(v) ? v : [];
1925
- }), l = w(() => {
1926
- const f = {
1934
+ setup(s, { emit: e }) {
1935
+ const n = s, t = x(() => {
1936
+ const k = (typeof n.col.componentProps == "function" ? {} : n.col.componentProps ?? {}).options;
1937
+ return Array.isArray(k) ? k : [];
1938
+ }), l = x(() => {
1939
+ const v = {
1927
1940
  input: "el-input",
1928
1941
  "input-number": "el-input-number",
1929
1942
  "date-picker": "el-date-picker",
1930
1943
  switch: "el-switch",
1931
1944
  cascader: "el-cascader"
1932
1945
  };
1933
- return n.col.component === "formatted-number" ? Ae : f[n.col.component] || "el-input";
1934
- }), a = w(() => {
1935
- let f = {}, v = {};
1936
- const F = n.col.componentProps;
1937
- typeof F == "function" ? v = F({ row: n.row ?? {}, value: n.value, column: n.col, action: n.action }) : f = F ?? {};
1938
- const g = { size: n.size };
1939
- for (const [b, p] of Object.entries({ ...f, ...v }))
1940
- /^on[A-Za-z]/.test(b) && typeof p == "function" || (g[b] = p);
1946
+ return n.col.component === "formatted-number" ? Ae : v[n.col.component] || "el-input";
1947
+ }), a = x(() => {
1948
+ let v = {};
1949
+ if (typeof n.col.componentProps == "function") {
1950
+ const y = n.row ?? {}, p = n.formActionType;
1951
+ v = n.col.componentProps({
1952
+ row: y,
1953
+ value: n.value,
1954
+ index: n.index,
1955
+ column: n.col,
1956
+ formActionType: p
1957
+ });
1958
+ } else
1959
+ v = n.col.componentProps ?? {};
1960
+ const k = {}, w = {};
1961
+ for (const [y, p] of Object.entries(v))
1962
+ if (/^on[A-Za-z]/.test(y) && typeof p == "function") {
1963
+ const _ = y[2].toLowerCase() + y.slice(3);
1964
+ w[_] = p;
1965
+ } else
1966
+ k[y] = p;
1967
+ return { bind: k, userEvents: w };
1968
+ }), r = x(() => {
1969
+ n.value, n.row, n.formActionType;
1970
+ const v = { size: n.size, ...a.value.bind };
1941
1971
  if (n.col.component === "formatted-number")
1942
- return { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...g };
1972
+ return { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...v };
1943
1973
  if (["select", "checkbox", "radio"].includes(n.col.component)) {
1944
- const { options: b, ...p } = g;
1945
- return p;
1974
+ const { options: k, ...w } = v;
1975
+ return w;
1946
1976
  }
1947
- return g;
1948
- }), s = w(() => {
1949
- let f = {}, v = {};
1950
- const F = n.col.componentProps;
1951
- typeof F == "function" ? v = F({ row: n.row ?? {}, value: n.value, column: n.col, action: n.action }) : f = F ?? {};
1952
- const g = {};
1953
- for (const [b, p] of Object.entries({ ...f, ...v }))
1954
- if (/^on[A-Za-z]/.test(b) && typeof p == "function") {
1955
- const _ = b[2].toLowerCase() + b.slice(3);
1956
- g[_] = p;
1957
- }
1958
- return g;
1959
- });
1960
- return { __sfc: !0, props: n, emit: e, options: t, cellComp: l, cellBind: a, cellEvents: s, mergedEvents: (...f) => {
1961
- const v = {};
1962
- for (const F of f) {
1963
- const g = s.value[F];
1964
- v[F] = (b) => {
1965
- g && g(b), e("update", F === "clear" ? void 0 : b);
1977
+ return v;
1978
+ }), d = x(() => (n.value, n.row, n.formActionType, a.value.userEvents));
1979
+ return { __sfc: !0, props: n, emit: e, options: t, cellComp: l, componentPropsResult: a, cellBind: r, cellEvents: d, mergedEvents: (...v) => {
1980
+ const k = {};
1981
+ for (const w of v) {
1982
+ const y = d.value[w];
1983
+ k[w] = (p) => {
1984
+ e("update", w === "clear" ? void 0 : p), De(() => {
1985
+ y && y(p);
1986
+ });
1966
1987
  };
1967
1988
  }
1968
- return v;
1989
+ return k;
1969
1990
  }, ApiSelect: Ue, TreeSelect: Je };
1970
1991
  }
1971
1992
  });
1972
1993
  var nn = function() {
1973
1994
  var e = this, n = e._self._c, t = e._self._setupProxy;
1974
- return e.col.component === "select" ? n("el-select", e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "el-select", t.cellBind, !1), t.mergedEvents("change", "clear")), e._l(t.options, function(l) {
1995
+ return e.col.component === "select" ? n("el-select", e._g(e._b({ attrs: { value: e.value, placeholder: t.cellBind.placeholder || e.placeholder } }, "el-select", t.cellBind, !1), t.mergedEvents("change", "clear")), e._l(t.options, function(l) {
1975
1996
  return n("el-option", { key: String(l.value), attrs: { label: l.label, value: l.value } });
1976
1997
  }), 1) : e.col.component === "checkbox" ? n("el-checkbox-group", e._g(e._b({ attrs: { value: e.value } }, "el-checkbox-group", t.cellBind, !1), t.mergedEvents("change")), e._l(t.options, function(l) {
1977
1998
  return n("el-checkbox", { key: String(l.value), attrs: { label: l.value } }, [e._v(e._s(l.label))]);
1978
1999
  }), 1) : e.col.component === "radio" ? n("el-radio-group", e._g(e._b({ attrs: { value: e.value } }, "el-radio-group", t.cellBind, !1), t.mergedEvents("change")), e._l(t.options, function(l) {
1979
2000
  return n("el-radio", { key: String(l.value), attrs: { label: l.value } }, [e._v(e._s(l.label))]);
1980
- }), 1) : e.col.component === "date-range" ? n("el-date-picker", e._g(e._b({ attrs: { value: e.value, type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", placeholder: e.placeholder } }, "el-date-picker", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "api-select" ? n(t.ApiSelect, e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "ApiSelect", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "tree-select" ? n(t.TreeSelect, e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "TreeSelect", t.cellBind, !1), t.mergedEvents("change"))) : n(t.cellComp, e._g(e._b({ tag: "component", attrs: { value: e.value, placeholder: e.placeholder } }, "component", t.cellBind, !1), t.mergedEvents("input")));
1981
- }, ln = [], on = /* @__PURE__ */ re(
2001
+ }), 1) : e.col.component === "date-range" ? n("el-date-picker", e._g(e._b({ attrs: { value: e.value, type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", placeholder: t.cellBind.placeholder || e.placeholder } }, "el-date-picker", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "api-select" ? n(t.ApiSelect, e._g(e._b({ attrs: { value: e.value, placeholder: t.cellBind.placeholder || e.placeholder } }, "ApiSelect", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "tree-select" ? n(t.TreeSelect, e._g(e._b({ attrs: { value: e.value, placeholder: t.cellBind.placeholder || e.placeholder } }, "TreeSelect", t.cellBind, !1), t.mergedEvents("change"))) : n(t.cellComp, e._g(e._b({ tag: "component", attrs: { value: e.value, placeholder: t.cellBind.placeholder || e.placeholder } }, "component", t.cellBind, !1), t.mergedEvents("input", "change")));
2002
+ }, ln = [], on = /* @__PURE__ */ ie(
1982
2003
  tn,
1983
2004
  nn,
1984
2005
  ln,
@@ -1988,14 +2009,14 @@ var nn = function() {
1988
2009
  null,
1989
2010
  null
1990
2011
  );
1991
- const an = on.exports, sn = {
2012
+ const an = on.exports, rn = {
1992
2013
  name: "ProTableForm",
1993
2014
  model: {
1994
2015
  prop: "modelValue",
1995
2016
  event: "update:modelValue"
1996
2017
  }
1997
- }, rn = /* @__PURE__ */ te({
1998
- ...sn,
2018
+ }, sn = /* @__PURE__ */ oe({
2019
+ ...rn,
1999
2020
  props: {
2000
2021
  modelValue: { default: () => [] },
2001
2022
  columns: null,
@@ -2023,87 +2044,91 @@ const an = on.exports, sn = {
2023
2044
  formProps: null
2024
2045
  },
2025
2046
  emits: ["update:modelValue", "add-row", "remove-row", "register"],
2026
- setup(r, { expose: e, emit: n }) {
2027
- const t = r, l = te({
2047
+ setup(s, { expose: e, emit: n }) {
2048
+ const t = s, l = oe({
2028
2049
  name: "RenderCell",
2029
2050
  props: {
2030
2051
  renderFn: { type: Function, required: !0 },
2031
2052
  renderParams: { type: Object, required: !0 }
2032
2053
  },
2033
- setup(I) {
2054
+ setup(E) {
2034
2055
  return () => {
2035
- const V = I.renderFn(I.renderParams);
2036
- return Array.isArray(V), V;
2056
+ const W = E.renderFn(E.renderParams);
2057
+ return Array.isArray(W), W;
2037
2058
  };
2038
2059
  }
2039
2060
  });
2040
- function a(I, V, j, C) {
2041
- const i = C !== void 0 ? T(V, j, C) : T(V, j), h = I.render({ row: V, value: i, column: I });
2042
- return { isText: f(h), value: h };
2061
+ function a(E, W, g, u) {
2062
+ const c = u !== void 0 ? M(W, g, u) : M(W, g), b = E.render({ row: W, value: c, column: E });
2063
+ return { isText: h(b), value: b };
2043
2064
  }
2044
- const s = /* @__PURE__ */ new WeakMap();
2045
- function c(I, V, j, C) {
2046
- s.has(V) || s.set(V, /* @__PURE__ */ new Map());
2047
- const i = s.get(V), h = j.key + (C ? "." + C : "");
2048
- return i.has(h) || i.set(h, a(I, V, j, C)), i.get(h);
2065
+ const r = /* @__PURE__ */ new WeakMap();
2066
+ function d(E, W, g, u) {
2067
+ r.has(W) || r.set(W, /* @__PURE__ */ new Map());
2068
+ const c = r.get(W), b = g.key + (u ? "." + u : "");
2069
+ return c.has(b) || c.set(b, a(E, W, g, u)), c.get(b);
2049
2070
  }
2050
- function f(I) {
2051
- return I === null || typeof I in { string: 1, number: 1, boolean: 1, bigint: 1, symbol: 1 };
2071
+ function h(E) {
2072
+ return E === null || typeof E in { string: 1, number: 1, boolean: 1, bigint: 1, symbol: 1 };
2052
2073
  }
2053
2074
  const {
2054
2075
  formModelRef: v,
2055
- currentModelValue: F,
2056
- mergedRules: g,
2057
- tableRows: b,
2076
+ currentModelValue: k,
2077
+ mergedRules: w,
2078
+ tableRows: y,
2058
2079
  rowKeyFn: p,
2059
2080
  spanMethodAdapter: _,
2060
2081
  formRef: A,
2061
- slotUpdateHandler: O,
2062
- getCellProp: P,
2063
- getCellValue: T,
2064
- setCellValue: E,
2065
- handleAddRow: N,
2066
- handleRemoveRow: S,
2067
- validate: d,
2068
- clearValidate: W
2082
+ slotUpdateHandler: I,
2083
+ getCellProp: S,
2084
+ getCellValue: M,
2085
+ setCellValue: z,
2086
+ handleAddRow: V,
2087
+ handleRemoveRow: R,
2088
+ getRow: f,
2089
+ setRow: O,
2090
+ validate: C,
2091
+ clearValidate: q
2069
2092
  } = en({
2070
2093
  props: t,
2071
2094
  emit: n,
2072
2095
  emitAddRow: () => n("add-row"),
2073
- emitRemoveRow: (I) => n("remove-row", I)
2096
+ emitRemoveRow: (E) => n("remove-row", E)
2074
2097
  });
2075
- function y(I, V, j) {
2076
- var C;
2077
- (C = t.onRowClick) == null || C.call(t, I, j);
2098
+ function L(E, W, g) {
2099
+ var u;
2100
+ (u = t.onRowClick) == null || u.call(t, E, g);
2078
2101
  }
2079
- function K(I, V, j) {
2080
- var C;
2081
- (C = t.onRowDblclick) == null || C.call(t, I, j);
2102
+ function Y(E, W, g) {
2103
+ var u;
2104
+ (u = t.onRowDblclick) == null || u.call(t, E, g);
2082
2105
  }
2083
- function q(I) {
2084
- var V;
2085
- (V = t.onSortChange) == null || V.call(t, I);
2106
+ function G(E) {
2107
+ var W;
2108
+ (W = t.onSortChange) == null || W.call(t, E);
2086
2109
  }
2087
- function Q(I, V) {
2088
- var j;
2089
- (j = t.onExpandChange) == null || j.call(t, I, V);
2110
+ function ne(E, W) {
2111
+ var g;
2112
+ (g = t.onExpandChange) == null || g.call(t, E, W);
2090
2113
  }
2091
- const J = w(() => t.columns.map((I, V) => ({
2092
- ...I,
2093
- _key: I.key || `__col-${V}`
2094
- }))), Y = D(null), Z = {
2095
- validate: d,
2096
- clearValidate: W,
2097
- addRow: N,
2098
- removeRow: S,
2099
- getRows: () => [...F.value],
2100
- getRowCount: () => F.value.length,
2101
- getTable: () => Y.value,
2102
- getModelValue: () => [...F.value],
2103
- setModelValue: (I) => n("update:modelValue", I),
2104
- getFormRef: () => A.value
2114
+ const J = x(() => t.columns.map((E, W) => ({
2115
+ ...E,
2116
+ _key: E.key || `__col-${W}`
2117
+ }))), Z = D(null), X = {
2118
+ validate: C,
2119
+ clearValidate: q,
2120
+ addRow: V,
2121
+ removeRow: R,
2122
+ getRows: () => [...k.value],
2123
+ getRowCount: () => k.value.length,
2124
+ getTable: () => Z.value,
2125
+ getModelValue: () => [...k.value],
2126
+ setModelValue: (E) => n("update:modelValue", E),
2127
+ getFormRef: () => A.value,
2128
+ getRow: f,
2129
+ setRow: O
2105
2130
  };
2106
- return e(Z), n("register", Z), { __sfc: !0, RenderCell: l, execRenderOnce: a, _renderCache: s, getRender: c, isPrimitive: f, props: t, emit: n, formModelRef: v, currentModelValue: F, mergedRules: g, tableRows: b, rowKeyFn: p, spanMethodAdapter: _, formRef: A, slotUpdateHandler: O, getCellProp: P, getCellValue: T, setCellValue: E, handleAddRow: N, handleRemoveRow: S, validate: d, clearValidate: W, handleTableRowClick: y, handleTableRowDblclick: K, handleTableSortChange: q, handleTableExpandChange: Q, flatColumns: J, tableRef: Y, action: Z, CellEditor: an };
2131
+ return e(X), n("register", X), { __sfc: !0, RenderCell: l, execRenderOnce: a, _renderCache: r, getRender: d, isPrimitive: h, props: t, emit: n, formModelRef: v, currentModelValue: k, mergedRules: w, tableRows: y, rowKeyFn: p, spanMethodAdapter: _, formRef: A, slotUpdateHandler: I, getCellProp: S, getCellValue: M, setCellValue: z, handleAddRow: V, handleRemoveRow: R, getRow: f, setRow: O, validate: C, clearValidate: q, handleTableRowClick: L, handleTableRowDblclick: Y, handleTableSortChange: G, handleTableExpandChange: ne, flatColumns: J, tableRef: Z, action: X, CellEditor: an };
2107
2132
  }
2108
2133
  });
2109
2134
  var un = function() {
@@ -2118,9 +2143,9 @@ var un = function() {
2118
2143
  return [e._t(`header-${a.key}`, function() {
2119
2144
  return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [a.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(a.title) + " ")])];
2120
2145
  }, { column: a })];
2121
- }, proxy: !0 }, { key: "default", fn: function(s) {
2122
- return [a.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [t.getRender(a, s.row, l, a.key).isText ? [n("span", [e._v(e._s(t.getRender(a, s.row, l, a.key).value))])] : [n(t.RenderCell, { attrs: { "render-fn": a.render, "render-params": { row: s.row, col: l, childKey: a.key } } })]], 2)] : a.component === "slot" && a.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [e._t(`cell-${a.slotName}`, null, { column: a, row: s.row, index: s.$index, value: t.getCellValue(s.row, l, a.key), updateValue: t.slotUpdateHandler(s, l, a.key) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [n(t.CellEditor, { attrs: { col: a, value: t.getCellValue(s.row, l, a.key), row: s.row, size: e.size, placeholder: l.placeholder || e.metricPlaceholder, action: t.action }, on: { update: function(c) {
2123
- return t.setCellValue(s.row, l, a.key, c);
2146
+ }, proxy: !0 }, { key: "default", fn: function(r) {
2147
+ return [a.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(r.row, l, a.key), rules: t.mergedRules[t.getCellProp(r.row, l, a.key)] } }, [t.getRender(a, r.row, l, a.key).isText ? [n("span", [e._v(e._s(t.getRender(a, r.row, l, a.key).value))])] : [n(t.RenderCell, { attrs: { "render-fn": a.render, "render-params": { row: r.row, col: l, childKey: a.key } } })]], 2)] : a.component === "slot" && a.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(r.row, l, a.key), rules: t.mergedRules[t.getCellProp(r.row, l, a.key)] } }, [e._t(`cell-${a.slotName}`, null, { column: a, row: r.row, index: r.$index, value: t.getCellValue(r.row, l, a.key), updateValue: t.slotUpdateHandler(r, l, a.key) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(r.row, l, a.key), rules: t.mergedRules[t.getCellProp(r.row, l, a.key)] } }, [n(t.CellEditor, { attrs: { col: a, value: t.getCellValue(r.row, l, a.key), row: r.row, index: r.$index, size: e.size, placeholder: l.placeholder || e.metricPlaceholder, formActionType: t.action }, on: { update: function(d) {
2148
+ return t.setCellValue(r.row, l, a.key, d);
2124
2149
  } } })], 1)];
2125
2150
  } }], null, !0) })];
2126
2151
  })], 2) : l.hideInTable ? e._e() : n("el-table-column", { key: "leaf-" + l._key, attrs: { label: l.title, "min-width": l.minWidth || l.width || 120, width: l.width, align: l.align || "center", "header-align": l.headerAlign, fixed: l.fixed, "cell-style": l.cellStyle, "header-cell-style": l.headerCellStyle, "cell-class-name": l.cellClassName, "header-cell-class-name": l.headerCellClassName, sortable: l.sortable, resizable: l.resizable !== !1 }, scopedSlots: e._u([{ key: "header", fn: function() {
@@ -2128,13 +2153,13 @@ var un = function() {
2128
2153
  return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [l.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(l.title) + " ")])];
2129
2154
  }, { column: l })];
2130
2155
  }, proxy: !0 }, { key: "default", fn: function(a) {
2131
- return [l.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [t.getRender(l, a.row, l).isText ? [n("span", [e._v(e._s(t.getRender(l, a.row, l).value))])] : [n(t.RenderCell, { attrs: { "render-fn": l.render, "render-params": { row: a.row, col: l } } })]], 2)] : l.component === "slot" && l.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [e._t(`cell-${l.slotName}`, null, { column: l, row: a.row, index: a.$index, value: t.getCellValue(a.row, l), updateValue: t.slotUpdateHandler(a, l) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [n(t.CellEditor, { attrs: { col: l, value: t.getCellValue(a.row, l), row: a.row, size: e.size, placeholder: l.placeholder || e.metricPlaceholder, action: t.action }, on: { update: function(s) {
2132
- return t.setCellValue(a.row, l, void 0, s);
2156
+ return [l.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [t.getRender(l, a.row, l).isText ? [n("span", [e._v(e._s(t.getRender(l, a.row, l).value))])] : [n(t.RenderCell, { attrs: { "render-fn": l.render, "render-params": { row: a.row, col: l } } })]], 2)] : l.component === "slot" && l.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [e._t(`cell-${l.slotName}`, null, { column: l, row: a.row, index: a.$index, value: t.getCellValue(a.row, l), updateValue: t.slotUpdateHandler(a, l) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [n(t.CellEditor, { attrs: { col: l, value: t.getCellValue(a.row, l), row: a.row, index: a.$index, size: e.size, placeholder: l.placeholder || e.metricPlaceholder, formActionType: t.action }, on: { update: function(r) {
2157
+ return t.setCellValue(a.row, l, void 0, r);
2133
2158
  } } })], 1)];
2134
2159
  } }], null, !0) })];
2135
2160
  }), e._t("action", null, { addRow: t.handleAddRow, removeRow: t.handleRemoveRow })], 2)], 1)], 1);
2136
- }, cn = [], dn = /* @__PURE__ */ re(
2137
- rn,
2161
+ }, cn = [], dn = /* @__PURE__ */ ie(
2162
+ sn,
2138
2163
  un,
2139
2164
  cn,
2140
2165
  !1,
@@ -2154,9 +2179,9 @@ const tt = dn.exports, fn = [
2154
2179
  { name: "CollapseContainer", component: et },
2155
2180
  { name: "ProTableForm", component: tt }
2156
2181
  ];
2157
- function pn(r) {
2182
+ function pn(s) {
2158
2183
  fn.forEach(({ name: e, component: n }) => {
2159
- r.component(e, n);
2184
+ s.component(e, n);
2160
2185
  });
2161
2186
  }
2162
2187
  const bn = {
@@ -2180,15 +2205,15 @@ export {
2180
2205
  tt as ProTableForm,
2181
2206
  Ge as TableAction,
2182
2207
  wt as applyNumericInputDigitLimits,
2183
- We as clampByIntegerDigits,
2208
+ Le as clampByIntegerDigits,
2184
2209
  bn as default,
2185
- Le as formatWithThousands,
2210
+ Ke as formatWithThousands,
2186
2211
  pn as install,
2187
- ke as normalizeNumericValue,
2212
+ Fe as normalizeNumericValue,
2188
2213
  St as numberToEditString,
2189
- xt as roundToDecimals,
2190
- Ne as sanitizeNumericInput,
2191
- Te as stripNumberGrouping,
2214
+ Ct as roundToDecimals,
2215
+ We as sanitizeNumericInput,
2216
+ Me as stripNumberGrouping,
2192
2217
  Pt as toFixedDecimalString,
2193
2218
  Be as useComponentSetting,
2194
2219
  gn as useDescription,