@aspire-ui/element-component-pro 1.0.16 → 1.0.17

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 Xe, defineComponent as le, h as ue, useSlots as Ae, ref as D, computed as S, onMounted as me, nextTick as We, onUnmounted as Fe, watch as Y, unref as pe } from "vue";
2
- import { MessageBox as Ze } from "element-ui";
3
- const fe = Xe({});
4
- function Me(c, e) {
1
+ import { reactive as Ze, defineComponent as oe, h as ue, useSlots as Fe, ref as z, computed as C, onMounted as me, nextTick as Ke, onUnmounted as ke, watch as U, unref as pe } from "vue";
2
+ import { MessageBox as Qe } from "element-ui";
3
+ const fe = Ze({});
4
+ function $e(c, e) {
5
5
  if (!e)
6
6
  return c;
7
7
  for (const n in e)
8
8
  if (Object.prototype.hasOwnProperty.call(e, n)) {
9
9
  const t = c[n], o = e[n];
10
- Oe(o) ? Oe(t) ? c[n] = Me(
10
+ Ee(o) ? Ee(t) ? c[n] = $e(
11
11
  t,
12
12
  o
13
13
  ) : c[n] = { ...o } : c[n] = o;
14
14
  }
15
15
  return c;
16
16
  }
17
- function Oe(c) {
17
+ function Ee(c) {
18
18
  if (!c || typeof c != "object")
19
19
  return !1;
20
20
  const e = Object.getPrototypeOf(c);
21
21
  return e === Object.prototype || e === null;
22
22
  }
23
- function $e() {
23
+ function Be() {
24
24
  return {
25
25
  getSetting: (t) => JSON.parse(JSON.stringify(t === void 0 ? fe : fe[t] ?? {})),
26
26
  setSetting: (t, o) => {
27
- const s = fe[t];
28
- s ? fe[t] = Me({ ...s }, o) : fe[t] = { ...o };
27
+ const r = fe[t];
28
+ r ? fe[t] = $e({ ...r }, o) : fe[t] = { ...o };
29
29
  },
30
30
  mergeSettings: (t, o) => {
31
- const s = fe[t] ?? {};
32
- return Me({ ...s }, o);
31
+ const r = fe[t] ?? {};
32
+ return $e({ ...r }, o);
33
33
  }
34
34
  };
35
35
  }
36
- const Qe = /* @__PURE__ */ le({
36
+ const Ye = /* @__PURE__ */ oe({
37
37
  __name: "ProTable",
38
38
  props: {
39
39
  columns: null,
@@ -78,7 +78,7 @@ const Qe = /* @__PURE__ */ le({
78
78
  },
79
79
  emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
80
80
  setup(c, { expose: e, emit: n }) {
81
- const t = c, o = le({
81
+ const t = c, o = oe({
82
82
  name: "EcpProTableDefaultCellRenderer",
83
83
  props: {
84
84
  column: { type: Object, required: !0 },
@@ -88,20 +88,20 @@ const Qe = /* @__PURE__ */ le({
88
88
  },
89
89
  setup(l) {
90
90
  return () => {
91
- var v, F;
92
- const a = l.column;
93
- if (a != null && a.customRender) {
94
- const E = a.customRender({ text: l.value, record: l.record, index: l.index });
95
- return typeof E == "string" || typeof E == "number" ? ue("span", String(E)) : E;
91
+ var _, k;
92
+ const s = l.column;
93
+ if (s != null && s.customRender) {
94
+ const W = s.customRender({ text: l.value, record: l.record, index: l.index });
95
+ return typeof W == "string" || typeof W == "number" ? ue("span", String(W)) : W;
96
96
  }
97
- if (a != null && a.valueEnum) {
98
- const E = ((F = (v = a.valueEnum) == null ? void 0 : v[l.value]) == null ? void 0 : F.text) ?? l.value;
99
- return ue("span", E == null ? "" : String(E));
97
+ if (s != null && s.valueEnum) {
98
+ const W = ((k = (_ = s.valueEnum) == null ? void 0 : _[l.value]) == null ? void 0 : k.text) ?? l.value;
99
+ return ue("span", W == null ? "" : String(W));
100
100
  }
101
101
  return ue("span", l.value == null ? "" : String(l.value));
102
102
  };
103
103
  }
104
- }), s = le({
104
+ }), r = oe({
105
105
  name: "EcpProTableBodyCellRenderer",
106
106
  props: {
107
107
  slotRender: { type: Function, required: !0 },
@@ -114,198 +114,198 @@ const Qe = /* @__PURE__ */ le({
114
114
  },
115
115
  setup(l) {
116
116
  return () => {
117
- const a = l.slotRender, v = a == null ? void 0 : a({ column: l.column, record: l.record, index: l.index, value: l.value });
118
- if (((Z) => Z == null ? [] : Array.isArray(Z) ? Z.filter((oe) => oe != null && oe !== !1 && !oe.isComment) : [Z])(v).length > 0)
119
- return v;
120
- const V = { ...l.column };
121
- return l.customRender && (V.customRender = l.customRender), l.valueEnum && (V.valueEnum = l.valueEnum), ue(o, { props: { column: V, record: l.record, index: l.index, value: l.value } });
117
+ const s = l.slotRender, _ = s == null ? void 0 : s({ column: l.column, record: l.record, index: l.index, value: l.value });
118
+ if (((Q) => Q == null ? [] : Array.isArray(Q) ? Q.filter((le) => le != null && le !== !1 && !le.isComment) : [Q])(_).length > 0)
119
+ return _;
120
+ const I = { ...l.column };
121
+ return l.customRender && (I.customRender = l.customRender), l.valueEnum && (I.valueEnum = l.valueEnum), ue(o, { props: { column: I, record: l.record, index: l.index, value: l.value } });
122
122
  };
123
123
  }
124
- }), r = Ae(), _ = D(), u = D(), g = D(0), z = D(t.loading ?? !1), y = D([]), k = D({}), p = D([]), C = D({}), b = D([]), j = D(null), { mergeSettings: N } = $e(), x = S(() => N("ProTable", { ...t, ...C.value })), q = S(() => {
125
- const l = x.value.pagination;
124
+ }), a = Fe(), v = z(), u = z(), P = z(0), $ = z(t.loading ?? !1), m = z([]), S = z({}), p = z([]), x = z({}), g = z([]), V = z(null), { mergeSettings: O } = Be(), y = C(() => O("ProTable", { ...t, ...x.value })), q = C(() => {
125
+ const l = y.value.pagination;
126
126
  return l && typeof l == "object" ? {
127
127
  pageSize: l.pageSize ?? 10,
128
128
  pageSizes: l.pageSizes ?? [10, 20, 50, 100]
129
129
  } : { pageSize: 10, pageSizes: [10, 20, 50, 100] };
130
- }), A = D({
130
+ }), A = z({
131
131
  page: 1,
132
132
  pageSize: q.value.pageSize,
133
133
  pageSizes: q.value.pageSizes,
134
134
  total: 0
135
- }), P = S(() => !!x.value.title || !!r.tableTitle || !!r.toolbar), f = S(() => j.value !== null ? j.value : !!t.pagination && typeof t.pagination == "object"), L = S(() => x.value.pagination && typeof x.value.pagination == "object" ? !!x.value.pagination.small : !1), M = S(() => x.value.pagination && typeof x.value.pagination == "object" ? !!x.value.pagination.background : !1), T = S(() => x.value.rowKey || "id"), K = S(() => new Set(b.value.map((l) => l[T.value]))), U = S(
135
+ }), F = C(() => !!y.value.title || !!a.tableTitle || !!a.toolbar), f = C(() => V.value !== null ? V.value : !!t.pagination && typeof t.pagination == "object"), K = C(() => y.value.pagination && typeof y.value.pagination == "object" ? !!y.value.pagination.small : !1), M = C(() => y.value.pagination && typeof y.value.pagination == "object" ? !!y.value.pagination.background : !1), D = C(() => y.value.rowKey || "id"), j = C(() => new Set(g.value.map((l) => l[D.value]))), G = C(
136
136
  () => p.value.filter((l) => !l.hideInTable && !l.defaultHidden)
137
- ), H = S(() => {
138
- var a, v;
137
+ ), H = C(() => {
138
+ var s, _;
139
139
  let l = 0;
140
- return x.value.rowSelection && (l += Number(x.value.rowSelection.width) || 48), x.value.showIndexColumn && (l += Number((a = x.value.indexColumnProps) == null ? void 0 : a.width) || 60), x.value.actionColumn && (l += Number((v = x.value.actionColumn) == null ? void 0 : v.width) || 150), l;
141
- }), Q = (l) => typeof l == "number" && l > 0, G = S(() => U.value.filter((a) => ne(a) && Q(a.width)).reduce((a, v) => a + (typeof v.width == "number" ? v.width : 0), 0)), ee = S(() => U.value.filter((a) => ne(a) && typeof a.width == "string").reduce((a, v) => a + (Number(te(v)) || 80), 0)), J = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, te = (l) => {
142
- const a = l.width;
143
- if (Q(a) && G.value > 0 && g.value > 0 && typeof a == "number") {
144
- const v = g.value - H.value - ee.value;
145
- let F = Math.floor(v * a / G.value);
146
- const E = J(l.minWidth) ?? 60, V = J(l.maxWidth);
147
- return F = Math.max(E, F), V != null && (F = Math.min(V, F)), F;
140
+ return y.value.rowSelection && (l += Number(y.value.rowSelection.width) || 48), y.value.showIndexColumn && (l += Number((s = y.value.indexColumnProps) == null ? void 0 : s.width) || 60), y.value.actionColumn && (l += Number((_ = y.value.actionColumn) == null ? void 0 : _.width) || 150), l;
141
+ }), Y = (l) => typeof l == "number" && l > 0, X = C(() => G.value.filter((s) => ne(s) && Y(s.width)).reduce((s, _) => s + (typeof _.width == "number" ? _.width : 0), 0)), ee = C(() => G.value.filter((s) => ne(s) && typeof s.width == "string").reduce((s, _) => s + (Number(te(_)) || 80), 0)), J = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, te = (l) => {
142
+ const s = l.width;
143
+ if (Y(s) && X.value > 0 && P.value > 0 && typeof s == "number") {
144
+ const _ = P.value - H.value - ee.value;
145
+ let k = Math.floor(_ * s / X.value);
146
+ const W = J(l.minWidth) ?? 60, I = J(l.maxWidth);
147
+ return k = Math.max(W, k), I != null && (k = Math.min(I, k)), k;
148
148
  }
149
- if (typeof a == "string") {
150
- const v = J(a) ?? 80, F = J(l.minWidth), E = J(l.maxWidth);
151
- let V = v;
152
- return F != null && (V = Math.max(F, V)), E != null && (V = Math.min(E, V)), V;
149
+ if (typeof s == "string") {
150
+ const _ = J(s) ?? 80, k = J(l.minWidth), W = J(l.maxWidth);
151
+ let I = _;
152
+ return k != null && (I = Math.max(k, I)), W != null && (I = Math.min(W, I)), I;
153
153
  }
154
154
  return l.width;
155
- }, ne = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, h = S(() => {
156
- var a;
157
- const l = (a = x.value.rowSelection) == null ? void 0 : a.getCheckboxProps;
158
- return l ? y.value.filter((v) => {
159
- var F;
160
- return !((F = l(v)) != null && F.disabled);
161
- }) : y.value;
162
- }), I = S(() => h.value.length > 0), $ = S(() => h.value.length === 0 ? !1 : h.value.every((l) => K.value.has(l[T.value]))), i = S(() => {
163
- const l = h.value.filter((a) => K.value.has(a[T.value])).length;
164
- return l > 0 && l < h.value.length;
165
- }), m = (l) => K.value.has(l[T.value]), B = (l) => {
166
- var a, v, F;
167
- return ((F = (v = (a = x.value.rowSelection) == null ? void 0 : a.getCheckboxProps) == null ? void 0 : v.call(a, l)) == null ? void 0 : F.disabled) ?? !1;
168
- }, W = (l) => {
169
- var a, v, F;
170
- return ((F = (v = (a = x.value.rowSelection) == null ? void 0 : a.getRadioProps) == null ? void 0 : v.call(a, l)) == null ? void 0 : F.disabled) ?? !1;
171
- }, O = () => {
172
- const l = b.value.map((a) => a[T.value]);
173
- n("selection-change", { keys: l, rows: b.value });
174
- }, X = (l, a) => {
175
- const v = l[T.value];
176
- a ? b.value = [...b.value.filter((F) => F[T.value] !== v), l] : b.value = b.value.filter((F) => F[T.value] !== v), O();
177
- }, se = (l) => {
178
- b.value = [l], O();
155
+ }, ne = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, b = C(() => {
156
+ var s;
157
+ const l = (s = y.value.rowSelection) == null ? void 0 : s.getCheckboxProps;
158
+ return l ? m.value.filter((_) => {
159
+ var k;
160
+ return !((k = l(_)) != null && k.disabled);
161
+ }) : m.value;
162
+ }), N = C(() => b.value.length > 0), T = C(() => b.value.length === 0 ? !1 : b.value.every((l) => j.value.has(l[D.value]))), i = C(() => {
163
+ const l = b.value.filter((s) => j.value.has(s[D.value])).length;
164
+ return l > 0 && l < b.value.length;
165
+ }), h = (l) => j.value.has(l[D.value]), R = (l) => {
166
+ var s, _, k;
167
+ return ((k = (_ = (s = y.value.rowSelection) == null ? void 0 : s.getCheckboxProps) == null ? void 0 : _.call(s, l)) == null ? void 0 : k.disabled) ?? !1;
168
+ }, L = (l) => {
169
+ var s, _, k;
170
+ return ((k = (_ = (s = y.value.rowSelection) == null ? void 0 : s.getRadioProps) == null ? void 0 : _.call(s, l)) == null ? void 0 : k.disabled) ?? !1;
171
+ }, E = () => {
172
+ const l = g.value.map((s) => s[D.value]);
173
+ n("selection-change", { keys: l, rows: g.value });
174
+ }, Z = (l, s) => {
175
+ const _ = l[D.value];
176
+ s ? g.value = [...g.value.filter((k) => k[D.value] !== _), l] : g.value = g.value.filter((k) => k[D.value] !== _), E();
177
+ }, re = (l) => {
178
+ g.value = [l], E();
179
179
  }, he = (l) => {
180
180
  if (l) {
181
- const a = new Set(b.value.map((F) => F[T.value])), v = h.value.filter((F) => !a.has(F[T.value]));
182
- b.value = [...b.value, ...v];
181
+ const s = new Set(g.value.map((k) => k[D.value])), _ = b.value.filter((k) => !s.has(k[D.value]));
182
+ g.value = [...g.value, ..._];
183
183
  } else {
184
- const a = new Set(y.value.map((v) => v[T.value]));
185
- b.value = b.value.filter((v) => !a.has(v[T.value]));
184
+ const s = new Set(m.value.map((_) => _[D.value]));
185
+ g.value = g.value.filter((_) => !s.has(_[D.value]));
186
186
  }
187
- O();
188
- }, re = async (l) => {
187
+ E();
188
+ }, se = async (l) => {
189
189
  if (!t.api) {
190
190
  if (t.dataSource)
191
191
  return;
192
- y.value = [];
192
+ m.value = [];
193
193
  return;
194
194
  }
195
- z.value = !0;
195
+ $.value = !0;
196
196
  try {
197
- const a = x.value.fetchSetting ?? {}, v = a.pageField ?? "page", F = a.sizeField ?? "pageSize", E = a.listField ?? "list", V = a.totalField ?? "total", Z = {
198
- [v]: (l == null ? void 0 : l.page) ?? A.value.page,
199
- [F]: (l == null ? void 0 : l.pageSize) ?? A.value.pageSize,
197
+ const s = y.value.fetchSetting ?? {}, _ = s.pageField ?? "page", k = s.sizeField ?? "pageSize", W = s.listField ?? "list", I = s.totalField ?? "total", Q = {
198
+ [_]: (l == null ? void 0 : l.page) ?? A.value.page,
199
+ [k]: (l == null ? void 0 : l.pageSize) ?? A.value.pageSize,
200
200
  ...t.searchInfo,
201
201
  ...l == null ? void 0 : l.searchInfo
202
202
  };
203
203
  (l == null ? void 0 : l.page) != null && (A.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (A.value.pageSize = l.pageSize);
204
- const oe = t.beforeFetch ? t.beforeFetch(Z) : Z, Re = await t.api(oe);
205
- k.value = Re || {};
206
- const Pe = t.afterFetch ? t.afterFetch(Re) : Re, De = Pe[E] ?? Pe.items ?? Pe.list ?? [], ze = Pe[V] ?? 0;
207
- y.value = De, A.value.total = ze, n("fetch-success", { items: De, total: ze });
208
- } catch (a) {
209
- n("fetch-error", a);
204
+ const le = t.beforeFetch ? t.beforeFetch(Q) : Q, Me = await t.api(le);
205
+ S.value = Me || {};
206
+ const Pe = t.afterFetch ? t.afterFetch(Me) : Me, De = Pe[W] ?? Pe.items ?? Pe.list ?? [], ze = Pe[I] ?? 0;
207
+ m.value = De, A.value.total = ze, n("fetch-success", { items: De, total: ze });
208
+ } catch (s) {
209
+ n("fetch-error", s);
210
210
  } finally {
211
- z.value = !1;
211
+ $.value = !1;
212
212
  }
213
- }, _e = () => re(void 0), be = (l) => {
214
- x.value.clearSelectOnPageChange && (b.value = []), A.value.pageSize = l, A.value.page = 1, re(void 0);
215
- }, ge = (l) => {
216
- x.value.clearSelectOnPageChange && (b.value = []), A.value.page = l, re(void 0);
217
- }, ye = (l, a, v) => n("row-click", l, v), we = (l, a, v) => n("row-dblclick", l, v), Ce = ({ prop: l, order: a }) => n("sort-change", { prop: l, order: a }), xe = (l, a) => n("expand-change", l, a), ve = (l) => y.value.findIndex((a) => a[T.value] === l), ie = {
213
+ }, _e = () => se(void 0), ge = (l) => {
214
+ y.value.clearSelectOnPageChange && (g.value = []), A.value.pageSize = l, A.value.page = 1, se(void 0);
215
+ }, be = (l) => {
216
+ y.value.clearSelectOnPageChange && (g.value = []), A.value.page = l, se(void 0);
217
+ }, ye = (l, s, _) => n("row-click", l, _), we = (l, s, _) => n("row-dblclick", l, _), Ce = ({ prop: l, order: s }) => n("sort-change", { prop: l, order: s }), xe = (l, s) => n("expand-change", l, s), ve = (l) => m.value.findIndex((s) => s[D.value] === l), ie = {
218
218
  setProps: (l) => {
219
- C.value = { ...C.value, ...l };
219
+ x.value = { ...x.value, ...l };
220
220
  },
221
- reload: (l) => re(l),
221
+ reload: (l) => se(l),
222
222
  redoHeight: () => {
223
- var l, a;
224
- (a = (l = _.value) == null ? void 0 : l.doLayout) == null || a.call(l);
223
+ var l, s;
224
+ (s = (l = v.value) == null ? void 0 : l.doLayout) == null || s.call(l);
225
225
  },
226
226
  setLoading: (l) => {
227
- z.value = l;
227
+ $.value = l;
228
228
  },
229
- getDataSource: () => y.value,
230
- getRawDataSource: () => k.value,
229
+ getDataSource: () => m.value,
230
+ getRawDataSource: () => S.value,
231
231
  setTableData: (l) => {
232
- y.value = l ?? [];
232
+ m.value = l ?? [];
233
233
  },
234
234
  getColumns: () => p.value,
235
235
  setColumns: (l) => {
236
236
  if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
237
- const a = l, v = (t.columns ?? []).filter((E) => a.includes(E.key ?? E.dataIndex)), F = a.map((E) => v.find((V) => (V.key ?? V.dataIndex) === E)).filter(Boolean);
238
- F.length && (p.value = F);
237
+ const s = l, _ = (t.columns ?? []).filter((W) => s.includes(W.key ?? W.dataIndex)), k = s.map((W) => _.find((I) => (I.key ?? I.dataIndex) === W)).filter(Boolean);
238
+ k.length && (p.value = k);
239
239
  } else
240
240
  p.value = l ?? [];
241
241
  },
242
242
  setPagination: (l) => {
243
243
  l != null && l.page && (A.value.page = l.page), l != null && l.pageSize && (A.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (A.value.total = l.total);
244
244
  },
245
- getSelectRowKeys: () => b.value.map((l) => l[T.value]),
246
- getSelectRows: () => b.value,
245
+ getSelectRowKeys: () => g.value.map((l) => l[D.value]),
246
+ getSelectRows: () => g.value,
247
247
  clearSelectedRowKeys: () => {
248
- b.value = [], O();
248
+ g.value = [], E();
249
249
  },
250
250
  setSelectedRowKeys: (l) => {
251
- const a = new Set(l), v = y.value.filter((F) => a.has(F[T.value]));
252
- l.forEach((F) => {
253
- v.some((E) => E[T.value] === F) || v.push({ [T.value]: F });
254
- }), b.value = v, O();
251
+ const s = new Set(l), _ = m.value.filter((k) => s.has(k[D.value]));
252
+ l.forEach((k) => {
253
+ _.some((W) => W[D.value] === k) || _.push({ [D.value]: k });
254
+ }), g.value = _, E();
255
255
  },
256
256
  deleteSelectRowByKey: (l) => {
257
- b.value = b.value.filter((a) => a[T.value] !== l), O();
257
+ g.value = g.value.filter((s) => s[D.value] !== l), E();
258
258
  },
259
- updateTableData: (l, a, v) => {
260
- l < 0 || l >= y.value.length || (y.value = [...y.value], y.value[l] = { ...y.value[l], [a]: v });
259
+ updateTableData: (l, s, _) => {
260
+ l < 0 || l >= m.value.length || (m.value = [...m.value], m.value[l] = { ...m.value[l], [s]: _ });
261
261
  },
262
- updateTableDataRecord: (l, a) => {
263
- const v = ve(l);
264
- if (!(v < 0))
265
- return y.value = [...y.value], y.value[v] = { ...y.value[v], ...a }, y.value[v];
262
+ updateTableDataRecord: (l, s) => {
263
+ const _ = ve(l);
264
+ if (!(_ < 0))
265
+ return m.value = [...m.value], m.value[_] = { ...m.value[_], ...s }, m.value[_];
266
266
  },
267
267
  deleteTableDataRecord: (l) => {
268
- const a = Array.isArray(l) ? l : [l], v = new Set(a);
269
- y.value = y.value.filter((F) => !v.has(F[T.value]));
268
+ const s = Array.isArray(l) ? l : [l], _ = new Set(s);
269
+ m.value = m.value.filter((k) => !_.has(k[D.value]));
270
270
  },
271
- insertTableDataRecord: (l, a) => {
272
- const v = [...y.value];
273
- return a == null || a >= v.length ? v.push(l) : v.splice(a, 0, l), y.value = v, l;
271
+ insertTableDataRecord: (l, s) => {
272
+ const _ = [...m.value];
273
+ return s == null || s >= _.length ? _.push(l) : _.splice(s, 0, l), m.value = _, l;
274
274
  },
275
275
  getPaginationRef: () => f.value ? { page: A.value.page, pageSize: Number(A.value.pageSize) || 10, total: A.value.total } : !1,
276
276
  getShowPagination: () => f.value,
277
277
  setShowPagination: (l) => {
278
- j.value = l;
278
+ V.value = l;
279
279
  },
280
- getRowSelection: () => x.value.rowSelection,
280
+ getRowSelection: () => y.value.rowSelection,
281
281
  expandAll: () => {
282
- var F;
283
- const l = ((F = x.value.treeProps) == null ? void 0 : F.children) ?? "children", a = (E) => {
284
- const V = [];
285
- return E.forEach((Z) => {
286
- V.push(Z);
287
- const oe = Z[l];
288
- Array.isArray(oe) && oe.length > 0 && V.push(...a(oe));
289
- }), V;
282
+ var k;
283
+ const l = ((k = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
284
+ const I = [];
285
+ return W.forEach((Q) => {
286
+ I.push(Q);
287
+ const le = Q[l];
288
+ Array.isArray(le) && le.length > 0 && I.push(...s(le));
289
+ }), I;
290
290
  };
291
- a(y.value).forEach((E) => {
292
- var V, Z;
293
- return (Z = (V = _.value) == null ? void 0 : V.toggleRowExpansion) == null ? void 0 : Z.call(V, E, !0);
291
+ s(m.value).forEach((W) => {
292
+ var I, Q;
293
+ return (Q = (I = v.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Q.call(I, W, !0);
294
294
  });
295
295
  },
296
296
  collapseAll: () => {
297
- var F;
298
- const l = ((F = x.value.treeProps) == null ? void 0 : F.children) ?? "children", a = (E) => {
299
- const V = [];
300
- return E.forEach((Z) => {
301
- V.push(Z);
302
- const oe = Z[l];
303
- Array.isArray(oe) && oe.length > 0 && V.push(...a(oe));
304
- }), V;
297
+ var k;
298
+ const l = ((k = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
299
+ const I = [];
300
+ return W.forEach((Q) => {
301
+ I.push(Q);
302
+ const le = Q[l];
303
+ Array.isArray(le) && le.length > 0 && I.push(...s(le));
304
+ }), I;
305
305
  };
306
- a(y.value).forEach((E) => {
307
- var V, Z;
308
- return (Z = (V = _.value) == null ? void 0 : V.toggleRowExpansion) == null ? void 0 : Z.call(V, E, !1);
306
+ s(m.value).forEach((W) => {
307
+ var I, Q;
308
+ return (Q = (I = v.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Q.call(I, W, !1);
309
309
  });
310
310
  }
311
311
  };
@@ -313,102 +313,102 @@ const Qe = /* @__PURE__ */ le({
313
313
  const ce = () => {
314
314
  p.value = [...t.columns ?? []];
315
315
  }, de = () => {
316
- t.api && x.value.immediate !== !1 ? re(void 0) : t.dataSource && (y.value = [...t.dataSource], !t.api && t.pagination !== !1 && (A.value.total = t.dataSource.length));
316
+ t.api && y.value.immediate !== !1 ? se(void 0) : t.dataSource && (m.value = [...t.dataSource], !t.api && t.pagination !== !1 && (A.value.total = t.dataSource.length));
317
317
  }, d = () => {
318
- u.value && (g.value = u.value.offsetWidth || 0);
318
+ u.value && (P.value = u.value.offsetWidth || 0);
319
319
  };
320
- let w = null, R = null;
320
+ let w = null, B = null;
321
321
  return me(() => {
322
- ce(), n("register", ie), de(), typeof window < "u" && (window.addEventListener("resize", d), w = new ResizeObserver(d), We(() => {
323
- d(), R = u.value, R && (w == null || w.observe(R));
322
+ ce(), n("register", ie), de(), typeof window < "u" && (window.addEventListener("resize", d), w = new ResizeObserver(d), Ke(() => {
323
+ d(), B = u.value, B && (w == null || w.observe(B));
324
324
  }));
325
- }), Fe(() => {
326
- typeof window < "u" && (window.removeEventListener("resize", d), w && R && (w.unobserve(R), R = null));
327
- }), Y(() => t.columns, ce, { deep: !0 }), Y(() => t.dataSource, () => {
328
- !t.api && t.dataSource && (y.value = [...t.dataSource]);
329
- }, { deep: !0 }), Y(() => t.loading, (l) => {
330
- z.value = l ?? !1;
331
- }), { __sfc: !0, DefaultCellRenderer: o, BodyCellRenderer: s, props: t, emit: n, slots: r, tableRef: _, tableWrapRef: u, containerWidth: g, loading: z, innerData: y, rawDataSource: k, innerColumns: p, innerProps: C, selectedRows: b, showPaginationRef: j, mergeSettings: N, effectiveProps: x, defaultPagination: q, pagination: A, showTitleBar: P, showPagination: f, paginationSmall: L, paginationBackground: M, rowKeyField: T, selectedKeysSet: K, displayColumns: U, fixedColumnsWidth: H, isRatioWidth: Q, totalRatio: G, fixedDataColumnsWidth: ee, parseWidthPx: J, getColumnWidth: te, shouldShowColumn: ne, selectableRows: h, hasSelectableRows: I, isAllCurrentPageSelected: $, isIndeterminate: i, isRowSelected: m, getCheckboxDisabled: B, getRadioDisabled: W, emitSelectionChange: O, handleCheckboxChange: X, handleRadioSelect: se, handleSelectAll: he, fetchData: re, handleReload: _e, handleSizeChange: be, handleCurrentChange: ge, handleRowClick: ye, handleRowDblclick: we, handleSortChange: Ce, handleExpandChange: xe, findRowIndex: ve, tableAction: ie, syncColumns: ce, loadData: de, updateContainerWidth: d, resizeObserver: w, observedEl: R };
325
+ }), ke(() => {
326
+ typeof window < "u" && (window.removeEventListener("resize", d), w && B && (w.unobserve(B), B = null));
327
+ }), U(() => t.columns, ce, { deep: !0 }), U(() => t.dataSource, () => {
328
+ !t.api && t.dataSource && (m.value = [...t.dataSource]);
329
+ }, { deep: !0 }), U(() => t.loading, (l) => {
330
+ $.value = l ?? !1;
331
+ }), { __sfc: !0, DefaultCellRenderer: o, BodyCellRenderer: r, props: t, emit: n, slots: a, tableRef: v, tableWrapRef: u, containerWidth: P, loading: $, innerData: m, rawDataSource: S, innerColumns: p, innerProps: x, selectedRows: g, showPaginationRef: V, mergeSettings: O, effectiveProps: y, defaultPagination: q, pagination: A, showTitleBar: F, showPagination: f, paginationSmall: K, paginationBackground: M, rowKeyField: D, selectedKeysSet: j, displayColumns: G, fixedColumnsWidth: H, isRatioWidth: Y, totalRatio: X, fixedDataColumnsWidth: ee, parseWidthPx: J, getColumnWidth: te, shouldShowColumn: ne, selectableRows: b, hasSelectableRows: N, isAllCurrentPageSelected: T, isIndeterminate: i, isRowSelected: h, getCheckboxDisabled: R, getRadioDisabled: L, emitSelectionChange: E, handleCheckboxChange: Z, handleRadioSelect: re, handleSelectAll: he, fetchData: se, handleReload: _e, handleSizeChange: ge, handleCurrentChange: be, handleRowClick: ye, handleRowDblclick: we, handleSortChange: Ce, handleExpandChange: xe, findRowIndex: ve, tableAction: ie, syncColumns: ce, loadData: de, updateContainerWidth: d, resizeObserver: w, observedEl: B };
332
332
  }
333
333
  });
334
- function ae(c, e, n, t, o, s, r, _) {
334
+ function ae(c, e, n, t, o, r, a, v) {
335
335
  var u = typeof c == "function" ? c.options : c;
336
- e && (u.render = e, u.staticRenderFns = n, u._compiled = !0), t && (u.functional = !0), s && (u._scopeId = "data-v-" + s);
337
- var g;
338
- if (r ? (g = function(k) {
339
- k = k || // cached call
336
+ e && (u.render = e, u.staticRenderFns = n, u._compiled = !0), t && (u.functional = !0), r && (u._scopeId = "data-v-" + r);
337
+ var P;
338
+ if (a ? (P = function(S) {
339
+ S = S || // cached call
340
340
  this.$vnode && this.$vnode.ssrContext || // stateful
341
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !k && typeof __VUE_SSR_CONTEXT__ < "u" && (k = __VUE_SSR_CONTEXT__), o && o.call(this, k), k && k._registeredComponents && k._registeredComponents.add(r);
342
- }, u._ssrRegister = g) : o && (g = _ ? function() {
341
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !S && typeof __VUE_SSR_CONTEXT__ < "u" && (S = __VUE_SSR_CONTEXT__), o && o.call(this, S), S && S._registeredComponents && S._registeredComponents.add(a);
342
+ }, u._ssrRegister = P) : o && (P = v ? function() {
343
343
  o.call(
344
344
  this,
345
345
  (u.functional ? this.parent : this).$root.$options.shadowRoot
346
346
  );
347
- } : o), g)
347
+ } : o), P)
348
348
  if (u.functional) {
349
- u._injectStyles = g;
350
- var z = u.render;
351
- u.render = function(p, C) {
352
- return g.call(C), z(p, C);
349
+ u._injectStyles = P;
350
+ var $ = u.render;
351
+ u.render = function(p, x) {
352
+ return P.call(x), $(p, x);
353
353
  };
354
354
  } else {
355
- var y = u.beforeCreate;
356
- u.beforeCreate = y ? [].concat(y, g) : [g];
355
+ var m = u.beforeCreate;
356
+ u.beforeCreate = m ? [].concat(m, P) : [P];
357
357
  }
358
358
  return {
359
359
  exports: c,
360
360
  options: u
361
361
  };
362
362
  }
363
- var Ye = function() {
364
- var o, s, r, _;
363
+ var et = function() {
364
+ var o, r, a, v;
365
365
  var e = this, n = e._self._c, t = e._self._setupProxy;
366
- 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(u, g) {
367
- return n("div", { key: g }, [e._v(e._s(u))]);
366
+ 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(u, P) {
367
+ return n("div", { key: P }, [e._v(e._s(u))]);
368
368
  }), 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() {
369
369
  var u;
370
370
  return [((u = t.effectiveProps.tableSetting) == null ? void 0 : u.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
371
371
  })], 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.effectiveProps.spanMethod, "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(u) {
372
372
  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")];
373
373
  } }, { key: "default", fn: function(u) {
374
- var g;
375
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(u.row), disabled: t.getCheckboxDisabled(u.row) }, on: { change: (z) => t.handleCheckboxChange(u.row, z) }, nativeOn: { click: function(z) {
376
- z.stopPropagation();
377
- } } }) : n("el-radio", { attrs: { value: (g = t.selectedRows[0]) == null ? void 0 : g[t.rowKeyField], label: u.row[t.rowKeyField], disabled: t.getRadioDisabled(u.row) }, on: { change: function(z) {
374
+ var P;
375
+ return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(u.row), disabled: t.getCheckboxDisabled(u.row) }, on: { change: ($) => t.handleCheckboxChange(u.row, $) }, nativeOn: { click: function($) {
376
+ $.stopPropagation();
377
+ } } }) : n("el-radio", { attrs: { value: (P = t.selectedRows[0]) == null ? void 0 : P[t.rowKeyField], label: u.row[t.rowKeyField], disabled: t.getRadioDisabled(u.row) }, on: { change: function($) {
378
378
  return t.handleRadioSelect(u.row);
379
- } }, nativeOn: { click: function(z) {
380
- z.stopPropagation();
379
+ } }, nativeOn: { click: function($) {
380
+ $.stopPropagation();
381
381
  } } }, [n("span")])];
382
- } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((s = t.effectiveProps.indexColumnProps) == null ? void 0 : s.width) || 60, fixed: (r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.fixed, align: ((_ = t.effectiveProps.indexColumnProps) == null ? void 0 : _.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(u) {
383
- return [t.shouldShowColumn(u) ? n("el-table-column", { key: u.dataIndex || u.key || u.title, attrs: { prop: u.dataIndex, label: u.title, width: t.getColumnWidth(u), "min-width": t.isRatioWidth(u.width) ? void 0 : u.minWidth, fixed: u.fixed, align: u.align || "left", sortable: u.sortable, formatter: u.formatter, "show-overflow-tooltip": u.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(g) {
384
- return [u.dataIndex && e.$scopedSlots[`header-${u.dataIndex}`] ? e._t(`header-${u.dataIndex}`, null, { column: u }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: u }) : [n("span", [e._v(e._s(u.title))]), u.helpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(u.helpMessage) ? n("span", e._l(u.helpMessage, function(z, y) {
385
- return n("div", { key: y }, [e._v(e._s(z))]);
382
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((v = t.effectiveProps.indexColumnProps) == null ? void 0 : v.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(u) {
383
+ return [t.shouldShowColumn(u) ? n("el-table-column", { key: u.dataIndex || u.key || u.title, attrs: { prop: u.dataIndex, label: u.title, width: t.getColumnWidth(u), "min-width": t.isRatioWidth(u.width) ? void 0 : u.minWidth, fixed: u.fixed, align: u.align || "left", sortable: u.sortable, formatter: u.formatter, "show-overflow-tooltip": u.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(P) {
384
+ return [u.dataIndex && e.$scopedSlots[`header-${u.dataIndex}`] ? e._t(`header-${u.dataIndex}`, null, { column: u }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: u }) : [n("span", [e._v(e._s(u.title))]), u.helpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(u.helpMessage) ? n("span", e._l(u.helpMessage, function($, m) {
385
+ return n("div", { key: m }, [e._v(e._s($))]);
386
386
  }), 0) : n("span", [e._v(e._s(u.helpMessage))])]), n("i", { staticClass: "el-icon-question" })], 2) : e._e()]];
387
- } }, { key: "default", fn: function(g) {
388
- return [u.dataIndex && e.$scopedSlots[u.dataIndex] ? e._t(u.dataIndex, null, { row: g.row, column: u, index: g.$index, value: g.row[u.dataIndex] }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: u, record: g.row, index: g.$index, value: g.row[u.dataIndex], "custom-render": u.customRender, "value-enum": u.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: u, record: g.row, index: g.$index, value: g.row[u.dataIndex] } })];
387
+ } }, { key: "default", fn: function(P) {
388
+ return [u.dataIndex && e.$scopedSlots[u.dataIndex] ? e._t(u.dataIndex, null, { row: P.row, column: u, index: P.$index, value: P.row[u.dataIndex] }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: u, record: P.row, index: P.$index, value: P.row[u.dataIndex], "custom-render": u.customRender, "value-enum": u.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: u, record: P.row, index: P.$index, value: P.row[u.dataIndex] } })];
389
389
  } }], null, !0) }) : e._e()];
390
390
  }), 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(u) {
391
391
  return [e.$scopedSlots.action ? e._t("action", null, { record: u.row, column: t.effectiveProps.actionColumn, index: u.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: u.row, index: u.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
392
392
  } }], 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()]);
393
- }, et = [], tt = /* @__PURE__ */ ae(
394
- Qe,
393
+ }, tt = [], nt = /* @__PURE__ */ ae(
395
394
  Ye,
396
395
  et,
396
+ tt,
397
397
  !1,
398
398
  null,
399
399
  "f3d27813",
400
400
  null,
401
401
  null
402
402
  );
403
- const Ke = tt.exports, Ne = (c) => Array.isArray(c) ? c.length > 0 : c != null && String(c).trim() !== "", Ie = (c) => Array.isArray(c) ? c.map((e) => String(e)).join(", ") : c == null ? "" : typeof c == "object" ? JSON.stringify(c) : String(c), Te = (c, e) => {
403
+ const Le = nt.exports, Oe = (c) => Array.isArray(c) ? c.length > 0 : c != null && String(c).trim() !== "", Ne = (c) => Array.isArray(c) ? c.map((e) => String(e)).join(", ") : c == null ? "" : typeof c == "object" ? JSON.stringify(c) : String(c), Te = (c, e) => {
404
404
  if (!c)
405
405
  return null;
406
406
  if (c === !0)
407
407
  return {
408
- content: Ie(e),
408
+ content: Ne(e),
409
409
  placement: "top",
410
410
  effect: "dark",
411
- disabled: !Ne(e)
411
+ disabled: !Oe(e)
412
412
  };
413
413
  if (typeof c == "string")
414
414
  return {
@@ -417,8 +417,8 @@ const Ke = tt.exports, Ne = (c) => Array.isArray(c) ? c.length > 0 : c != null &
417
417
  effect: "dark"
418
418
  };
419
419
  const n = { ...c };
420
- return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ie(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Ne(n.content)), n;
421
- }, nt = /* @__PURE__ */ le({
420
+ 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;
421
+ }, ot = /* @__PURE__ */ oe({
422
422
  __name: "TableAction",
423
423
  props: {
424
424
  actions: { default: () => [] },
@@ -426,124 +426,124 @@ const Ke = tt.exports, Ne = (c) => Array.isArray(c) ? c.length > 0 : c != null &
426
426
  stopButtonPropagation: { type: Boolean, default: !1 }
427
427
  },
428
428
  setup(c) {
429
- const e = c, n = (p) => Te(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", o = (p) => p.filter((C) => {
430
- const { ifShow: b } = C;
431
- return typeof b == "boolean" ? b : typeof b == "function" ? b(C) : !0;
432
- }), s = S(() => o(e.actions || [])), r = S(() => o(e.dropDownActions || [])), _ = (p, C) => {
433
- var b;
434
- e.stopButtonPropagation && C.stopPropagation(), (b = p.onClick) == null || b.call(p, C);
435
- }, u = (p, C) => {
436
- _(p, C);
437
- }, g = (p, C, b) => {
438
- var j, N, x, q;
439
- e.stopButtonPropagation && b.stopPropagation(), p.popConfirm && (C === "confirm" ? (N = (j = p.popConfirm).confirm) == null || N.call(j) : (q = (x = p.popConfirm).cancel) == null || q.call(x));
429
+ const e = c, n = (p) => Te(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", o = (p) => p.filter((x) => {
430
+ const { ifShow: g } = x;
431
+ return typeof g == "boolean" ? g : typeof g == "function" ? g(x) : !0;
432
+ }), r = C(() => o(e.actions || [])), a = C(() => o(e.dropDownActions || [])), v = (p, x) => {
433
+ var g;
434
+ e.stopButtonPropagation && x.stopPropagation(), (g = p.onClick) == null || g.call(p, x);
435
+ }, u = (p, x) => {
436
+ v(p, x);
437
+ }, P = (p, x, g) => {
438
+ var V, O, y, q;
439
+ e.stopButtonPropagation && g.stopPropagation(), p.popConfirm && (x === "confirm" ? (O = (V = p.popConfirm).confirm) == null || O.call(V) : (q = (y = p.popConfirm).cancel) == null || q.call(y));
440
440
  };
441
- return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: s, visibleDropDownActions: r, handleClick: _, handleActionClick: u, handlePopConfirm: g, handlePopConfirmConfirm: (p, C) => {
442
- g(p, "confirm", C);
443
- }, handlePopConfirmCancel: (p, C) => {
444
- g(p, "cancel", C);
441
+ return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick: v, handleActionClick: u, handlePopConfirm: P, handlePopConfirmConfirm: (p, x) => {
442
+ P(p, "confirm", x);
443
+ }, handlePopConfirmCancel: (p, x) => {
444
+ P(p, "cancel", x);
445
445
  }, handleDropdownCommand: (p) => {
446
- var j;
447
- const C = Number(p), b = r.value[C];
448
- if (!(!b || b.disabled)) {
449
- if (b.popConfirm) {
450
- const N = b.popConfirm.title, x = b.popConfirm.okText || "确定", q = b.popConfirm.cancelText || "取消";
451
- Ze.confirm(N, "提示", {
452
- confirmButtonText: x,
446
+ var V;
447
+ const x = Number(p), g = a.value[x];
448
+ if (!(!g || g.disabled)) {
449
+ if (g.popConfirm) {
450
+ const O = g.popConfirm.title, y = g.popConfirm.okText || "确定", q = g.popConfirm.cancelText || "取消";
451
+ Qe.confirm(O, "提示", {
452
+ confirmButtonText: y,
453
453
  cancelButtonText: q,
454
454
  type: "warning"
455
455
  }).then(() => {
456
- var A, P;
457
- return (P = (A = b.popConfirm) == null ? void 0 : A.confirm) == null ? void 0 : P.call(A);
456
+ var A, F;
457
+ return (F = (A = g.popConfirm) == null ? void 0 : A.confirm) == null ? void 0 : F.call(A);
458
458
  }).catch(() => {
459
- var A, P;
460
- return (P = (A = b.popConfirm) == null ? void 0 : A.cancel) == null ? void 0 : P.call(A);
459
+ var A, F;
460
+ return (F = (A = g.popConfirm) == null ? void 0 : A.cancel) == null ? void 0 : F.call(A);
461
461
  });
462
462
  return;
463
463
  }
464
- (j = b.onClick) == null || j.call(b, {});
464
+ (V = g.onClick) == null || V.call(g, {});
465
465
  }
466
466
  } };
467
467
  }
468
468
  });
469
- var ot = function() {
469
+ var lt = function() {
470
470
  var e = this, n = e._self._c, t = e._self._setupProxy;
471
- return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(o, s) {
472
- return n("span", { key: `action-${s}`, staticClass: "ecp-table-action__item" }, [o.popConfirm ? n("el-popconfirm", { attrs: { title: o.popConfirm.title, "confirm-button-text": o.popConfirm.okText || "确定", "cancel-button-text": o.popConfirm.cancelText || "取消" }, on: { confirm: function(r) {
473
- return t.handlePopConfirmConfirm(o, r);
474
- }, cancel: function(r) {
475
- return t.handlePopConfirmCancel(o, r);
476
- } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(r) {
477
- return t.handleActionClick(o, r);
478
- } } }, "el-button", o.props, !1), [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])], 1)], 1)]) : n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(r) {
479
- return t.handleActionClick(o, r);
471
+ return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(o, r) {
472
+ return n("span", { key: `action-${r}`, staticClass: "ecp-table-action__item" }, [o.popConfirm ? n("el-popconfirm", { attrs: { title: o.popConfirm.title, "confirm-button-text": o.popConfirm.okText || "确定", "cancel-button-text": o.popConfirm.cancelText || "取消" }, on: { confirm: function(a) {
473
+ return t.handlePopConfirmConfirm(o, a);
474
+ }, cancel: function(a) {
475
+ return t.handlePopConfirmCancel(o, a);
476
+ } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(a) {
477
+ return t.handleActionClick(o, a);
478
+ } } }, "el-button", o.props, !1), [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])], 1)], 1)]) : n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(a) {
479
+ return t.handleActionClick(o, a);
480
480
  } } }, "el-button", o.props, !1), [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])], 1), o.divider ? n("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
481
- }), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(o, s) {
482
- return n("el-dropdown-item", { key: `dropdown-${s}`, attrs: { command: s, disabled: o.disabled, divided: !!o.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])]);
481
+ }), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(o, r) {
482
+ return n("el-dropdown-item", { key: `dropdown-${r}`, attrs: { command: r, disabled: o.disabled, divided: !!o.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])]);
483
483
  }), 1)], 1) : e._e()], 2);
484
- }, lt = [], at = /* @__PURE__ */ ae(
485
- nt,
484
+ }, at = [], st = /* @__PURE__ */ ae(
486
485
  ot,
487
486
  lt,
487
+ at,
488
488
  !1,
489
489
  null,
490
490
  "45a58e7c",
491
491
  null,
492
492
  null
493
493
  );
494
- const je = at.exports;
495
- function Xt(c) {
496
- const e = D(null), n = () => c ? pe(c) : void 0, t = () => {
497
- const r = pe(e);
498
- if (!r)
494
+ const je = st.exports;
495
+ function tn(c) {
496
+ const e = z(null), n = () => c ? pe(c) : void 0, t = () => {
497
+ const a = pe(e);
498
+ if (!a)
499
499
  throw new Error("ProTable instance has not been registered");
500
- return r;
501
- }, o = (r) => {
502
- e.value = r;
503
- const _ = n();
504
- _ && Object.keys(_).length > 0 && r.setProps(_);
500
+ return a;
501
+ }, o = (a) => {
502
+ e.value = a;
503
+ const v = n();
504
+ v && Object.keys(v).length > 0 && a.setProps(v);
505
505
  };
506
- return c && Y(
506
+ return c && U(
507
507
  () => n(),
508
- (r) => {
509
- r && e.value && e.value.setProps(r);
508
+ (a) => {
509
+ a && e.value && e.value.setProps(a);
510
510
  },
511
511
  { deep: !0 }
512
512
  ), [o, {
513
- setProps: (r) => t().setProps(r),
514
- reload: (r) => t().reload(r),
513
+ setProps: (a) => t().setProps(a),
514
+ reload: (a) => t().reload(a),
515
515
  redoHeight: () => t().redoHeight(),
516
- setLoading: (r) => t().setLoading(r),
516
+ setLoading: (a) => t().setLoading(a),
517
517
  getDataSource: () => t().getDataSource(),
518
518
  getRawDataSource: () => t().getRawDataSource(),
519
- setTableData: (r) => t().setTableData(r),
519
+ setTableData: (a) => t().setTableData(a),
520
520
  getColumns: () => t().getColumns(),
521
- setColumns: (r) => t().setColumns(r),
522
- setPagination: (r) => t().setPagination(r),
521
+ setColumns: (a) => t().setColumns(a),
522
+ setPagination: (a) => t().setPagination(a),
523
523
  getSelectRowKeys: () => t().getSelectRowKeys(),
524
524
  getSelectRows: () => t().getSelectRows(),
525
525
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
526
- setSelectedRowKeys: (r) => t().setSelectedRowKeys(r),
527
- deleteSelectRowByKey: (r) => t().deleteSelectRowByKey(r),
528
- updateTableData: (r, _, u) => t().updateTableData(r, _, u),
529
- updateTableDataRecord: (r, _) => t().updateTableDataRecord(r, _),
530
- deleteTableDataRecord: (r) => t().deleteTableDataRecord(r),
531
- insertTableDataRecord: (r, _) => t().insertTableDataRecord(r, _),
526
+ setSelectedRowKeys: (a) => t().setSelectedRowKeys(a),
527
+ deleteSelectRowByKey: (a) => t().deleteSelectRowByKey(a),
528
+ updateTableData: (a, v, u) => t().updateTableData(a, v, u),
529
+ updateTableDataRecord: (a, v) => t().updateTableDataRecord(a, v),
530
+ deleteTableDataRecord: (a) => t().deleteTableDataRecord(a),
531
+ insertTableDataRecord: (a, v) => t().insertTableDataRecord(a, v),
532
532
  getPaginationRef: () => t().getPaginationRef(),
533
533
  getShowPagination: () => t().getShowPagination(),
534
- setShowPagination: (r) => t().setShowPagination(r),
534
+ setShowPagination: (a) => t().setShowPagination(a),
535
535
  getRowSelection: () => t().getRowSelection(),
536
536
  expandAll: () => {
537
- var r, _;
538
- return (_ = (r = t()).expandAll) == null ? void 0 : _.call(r);
537
+ var a, v;
538
+ return (v = (a = t()).expandAll) == null ? void 0 : v.call(a);
539
539
  },
540
540
  collapseAll: () => {
541
- var r, _;
542
- return (_ = (r = t()).collapseAll) == null ? void 0 : _.call(r);
541
+ var a, v;
542
+ return (v = (a = t()).collapseAll) == null ? void 0 : v.call(a);
543
543
  }
544
544
  }];
545
545
  }
546
- const rt = /* @__PURE__ */ le({
546
+ const rt = /* @__PURE__ */ oe({
547
547
  __name: "ApiSelect",
548
548
  props: {
549
549
  value: null,
@@ -560,22 +560,22 @@ const rt = /* @__PURE__ */ le({
560
560
  },
561
561
  emits: ["input", "change"],
562
562
  setup(c, { expose: e }) {
563
- const n = c, t = D(!1), o = D([]), s = D([]), r = D(""), _ = (g) => {
564
- n.lazy && g && (JSON.stringify(n.params ?? {}) !== r.value || o.value.length === 0) && u();
565
- }, u = async () => {
563
+ const n = c, t = z(!1), o = z([]), r = z([]), a = (m) => m == null ? "null" : JSON.stringify(v(m)), v = (m) => Array.isArray(m) ? m.map(v) : m !== null && typeof m == "object" ? Object.keys(m).sort().reduce((S, p) => (S[p] = v(m[p]), S), {}) : m, u = z(a(n.params ?? null)), P = (m) => {
564
+ n.lazy && m && (a(n.params ?? null) !== u.value || o.value.length === 0) && $();
565
+ }, $ = async () => {
566
566
  if (n.api) {
567
567
  t.value = !0;
568
568
  try {
569
- const g = await n.api(n.params), z = Array.isArray(g) ? g : (g == null ? void 0 : g.list) ?? (g == null ? void 0 : g.data) ?? [];
570
- s.value = z;
571
- const y = n.labelField ?? "label", k = n.valueField ?? "value";
572
- o.value = z.map((p) => {
573
- const C = p;
569
+ const m = await n.api(n.params), S = Array.isArray(m) ? m : (m == null ? void 0 : m.list) ?? (m == null ? void 0 : m.data) ?? [];
570
+ r.value = S;
571
+ const p = n.labelField ?? "label", x = n.valueField ?? "value";
572
+ o.value = S.map((g) => {
573
+ const V = g;
574
574
  return {
575
- label: String(C[y] ?? C.label ?? ""),
576
- value: C[k] ?? C.value
575
+ label: String(V[p] ?? V.label ?? ""),
576
+ value: V[x] ?? V.value
577
577
  };
578
- }), r.value = JSON.stringify(n.params ?? {});
578
+ }), u.value = a(n.params ?? null);
579
579
  } finally {
580
580
  t.value = !1;
581
581
  }
@@ -583,23 +583,23 @@ const rt = /* @__PURE__ */ le({
583
583
  };
584
584
  return e({
585
585
  options: o,
586
- rawOptions: s,
586
+ rawOptions: r,
587
587
  loading: t,
588
- fetchOptions: u
588
+ fetchOptions: $
589
589
  }), me(() => {
590
- n.lazy || u();
591
- }), Y(
590
+ n.lazy || $();
591
+ }), U(
592
592
  () => n.api,
593
593
  () => {
594
- n.lazy ? (o.value = [], s.value = []) : u();
594
+ n.lazy ? (o.value = [], r.value = []) : $();
595
595
  },
596
596
  { deep: !0 }
597
- ), Y(() => n.params, () => {
598
- n.lazy ? (o.value = [], s.value = []) : u();
599
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: s, cachedParams: r, onVisibleChange: _, fetchOptions: u };
597
+ ), U(() => n.params, () => {
598
+ a(n.params ?? null) !== u.value && (n.lazy ? (o.value = [], r.value = []) : $());
599
+ }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: v, lastFetchedParamsKey: u, onVisibleChange: P, fetchOptions: $ };
600
600
  }
601
601
  });
602
- var st = function() {
602
+ var it = function() {
603
603
  var e = this, n = e._self._c, t = e._self._setupProxy;
604
604
  return n("el-select", e._b({ on: { input: function(o) {
605
605
  return e.$emit("input", o);
@@ -608,18 +608,18 @@ var st = function() {
608
608
  }, "visible-change": t.onVisibleChange } }, "el-select", { ...e.$attrs, value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, !1), e._l(t.options, function(o) {
609
609
  return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
610
610
  }), 1);
611
- }, it = [], ct = /* @__PURE__ */ ae(
611
+ }, ct = [], ut = /* @__PURE__ */ ae(
612
612
  rt,
613
- st,
614
613
  it,
614
+ ct,
615
615
  !1,
616
616
  null,
617
617
  null,
618
618
  null,
619
619
  null
620
620
  );
621
- const ut = ct.exports;
622
- function Ve(c) {
621
+ const dt = ut.exports;
622
+ function Ie(c) {
623
623
  const e = c.trim();
624
624
  if (!e)
625
625
  return "";
@@ -627,47 +627,47 @@ function Ve(c) {
627
627
  e[0] === "-" && (t = "-", n = 1);
628
628
  let o = !1;
629
629
  for (; n < e.length; n++) {
630
- const s = e[n];
631
- if (s >= "0" && s <= "9") {
632
- t += s;
630
+ const r = e[n];
631
+ if (r >= "0" && r <= "9") {
632
+ t += r;
633
633
  continue;
634
634
  }
635
- s === "." && !o && (o = !0, (t === "" || t === "-") && (t += "0"), t += ".");
635
+ r === "." && !o && (o = !0, (t === "" || t === "-") && (t += "0"), t += ".");
636
636
  }
637
637
  return t;
638
638
  }
639
- function Be(c) {
639
+ function Ae(c) {
640
640
  return c.replace(/,/g, "").trim();
641
641
  }
642
- function dt(c, e, n) {
642
+ function ft(c, e, n) {
643
643
  if (!c || c === "-")
644
644
  return c;
645
645
  const t = c[0] === "-";
646
646
  let o = t ? c.slice(1) : c;
647
- const s = o.indexOf(".");
648
- if (s === -1) {
649
- const z = Math.max(0, e);
650
- return o = z > 0 ? o.slice(0, z) : o, t ? "-" + o : o;
647
+ const r = o.indexOf(".");
648
+ if (r === -1) {
649
+ const $ = Math.max(0, e);
650
+ return o = $ > 0 ? o.slice(0, $) : o, t ? "-" + o : o;
651
651
  }
652
- let r = o.slice(0, s);
653
- e > 0 && (r = r.slice(0, e));
654
- const _ = o.slice(s + 1), u = _ === "" && o.endsWith(".");
652
+ let a = o.slice(0, r);
653
+ e > 0 && (a = a.slice(0, e));
654
+ const v = o.slice(r + 1), u = v === "" && o.endsWith(".");
655
655
  if (n <= 0)
656
- return t ? "-" + r : r;
656
+ return t ? "-" + a : a;
657
657
  if (u)
658
- return (t ? "-" : "") + r + ".";
659
- const g = _.slice(0, n);
660
- return (t ? "-" : "") + r + "." + g;
658
+ return (t ? "-" : "") + a + ".";
659
+ const P = v.slice(0, n);
660
+ return (t ? "-" : "") + a + "." + P;
661
661
  }
662
- function ft(c, e) {
662
+ function pt(c, e) {
663
663
  const n = Math.pow(10, c) - 1;
664
664
  return e <= 0 ? n : n + (1 - Math.pow(10, -e));
665
665
  }
666
- function Ee(c, e, n) {
667
- const t = ft(e, n), o = c < 0 ? -1 : 1;
666
+ function Ve(c, e, n) {
667
+ const t = pt(e, n), o = c < 0 ? -1 : 1;
668
668
  return Math.abs(c) <= t ? c : o * t;
669
669
  }
670
- function pt(c, e, n) {
670
+ function mt(c, e, n) {
671
671
  if (e <= 0)
672
672
  switch (n) {
673
673
  case "floor":
@@ -678,39 +678,39 @@ function pt(c, e, n) {
678
678
  return Math.round(c);
679
679
  }
680
680
  const t = Math.pow(10, e), o = c * t;
681
- let s;
681
+ let r;
682
682
  switch (n) {
683
683
  case "floor":
684
- s = Math.floor(o);
684
+ r = Math.floor(o);
685
685
  break;
686
686
  case "ceil":
687
- s = Math.ceil(o);
687
+ r = Math.ceil(o);
688
688
  break;
689
689
  default:
690
- s = Math.round(o);
690
+ r = Math.round(o);
691
691
  }
692
- return s / t;
692
+ return r / t;
693
693
  }
694
694
  function Se(c, e, n, t) {
695
- let o = Ee(c, e, n);
696
- return o = pt(o, n, t), o = Ee(o, e, n), o;
695
+ let o = Ve(c, e, n);
696
+ return o = mt(o, n, t), o = Ve(o, e, n), o;
697
697
  }
698
- function mt(c, e) {
698
+ function vt(c, e) {
699
699
  return Number.isNaN(c) || !Number.isFinite(c) ? "" : c.toFixed(Math.max(0, e));
700
700
  }
701
- function Le(c, e) {
701
+ function We(c, e) {
702
702
  if (Number.isNaN(c) || !Number.isFinite(c))
703
703
  return "";
704
- const n = c.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [s, r] = o.split("."), _ = s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
705
- return e <= 0 || r === void 0 ? (t ? "-" : "") + _ : (t ? "-" : "") + _ + "." + r;
704
+ const n = c.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), v = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
705
+ return e <= 0 || a === void 0 ? (t ? "-" : "") + v : (t ? "-" : "") + v + "." + a;
706
706
  }
707
- function vt(c, e) {
707
+ function ht(c, e) {
708
708
  if (Number.isNaN(c) || !Number.isFinite(c))
709
709
  return "";
710
710
  let n = c.toFixed(Math.max(0, e));
711
711
  return n = n.replace(/(\.\d*?)0+$/, "$1"), n = n.replace(/\.$/, ""), n;
712
712
  }
713
- const ht = /* @__PURE__ */ le({
713
+ const _t = /* @__PURE__ */ oe({
714
714
  __name: "FormattedNumberInput",
715
715
  props: {
716
716
  value: null,
@@ -723,85 +723,85 @@ const ht = /* @__PURE__ */ le({
723
723
  },
724
724
  emits: ["input"],
725
725
  setup(c, { emit: e }) {
726
- const n = c, t = D(!1), o = D(""), s = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), r = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
727
- function _(p) {
726
+ const n = c, t = z(!1), o = z(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
727
+ function v(p) {
728
728
  if (p == null || p === "")
729
729
  return null;
730
730
  if (typeof p == "number")
731
731
  return Number.isFinite(p) ? p : null;
732
- const C = Be(String(p));
733
- if (C === "" || C === "-")
732
+ const x = Ae(String(p));
733
+ if (x === "" || x === "-")
734
734
  return null;
735
- const b = Number(C);
736
- return Number.isFinite(b) ? b : null;
735
+ const g = Number(x);
736
+ return Number.isFinite(g) ? g : null;
737
737
  }
738
738
  function u() {
739
739
  if (t.value)
740
740
  return;
741
- const p = _(n.value);
741
+ const p = v(n.value);
742
742
  if (p === null) {
743
743
  o.value = "";
744
744
  return;
745
745
  }
746
- o.value = Le(
747
- Se(p, s(), r(), n.rounding),
748
- r()
746
+ o.value = We(
747
+ Se(p, r(), a(), n.rounding),
748
+ a()
749
749
  );
750
750
  }
751
- Y(
751
+ U(
752
752
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
753
753
  () => u(),
754
754
  { immediate: !0, deep: !0 }
755
755
  );
756
- function g(p) {
757
- e("input", mt(p, r()));
756
+ function P(p) {
757
+ e("input", vt(p, a()));
758
758
  }
759
- function z(p) {
760
- let C = Ve(p);
761
- if (n.inputLimit !== !1 && (C = dt(C, s(), r())), o.value = C, C === "" || C === "-")
759
+ function $(p) {
760
+ let x = Ie(p);
761
+ if (n.inputLimit !== !1 && (x = ft(x, r(), a())), o.value = x, x === "" || x === "-")
762
762
  return;
763
- const b = Number(C);
764
- if (!Number.isFinite(b))
763
+ const g = Number(x);
764
+ if (!Number.isFinite(g))
765
765
  return;
766
- const j = Se(b, s(), r(), n.rounding);
767
- g(j);
766
+ const V = Se(g, r(), a(), n.rounding);
767
+ P(V);
768
768
  }
769
- function y() {
769
+ function m() {
770
770
  t.value = !0;
771
- const p = Be(o.value), C = _(p === "" ? n.value : p);
772
- if (C === null) {
771
+ const p = Ae(o.value), x = v(p === "" ? n.value : p);
772
+ if (x === null) {
773
773
  o.value = "";
774
774
  return;
775
775
  }
776
- o.value = vt(
777
- Se(C, s(), r(), n.rounding),
778
- r()
776
+ o.value = ht(
777
+ Se(x, r(), a(), n.rounding),
778
+ a()
779
779
  );
780
780
  }
781
- function k() {
781
+ function S() {
782
782
  t.value = !1;
783
- const p = Be(o.value);
783
+ const p = Ae(o.value);
784
784
  if (p === "" || p === "-") {
785
785
  o.value = "", e("input", void 0);
786
786
  return;
787
787
  }
788
- const C = Number(Ve(p));
789
- if (!Number.isFinite(C)) {
788
+ const x = Number(Ie(p));
789
+ if (!Number.isFinite(x)) {
790
790
  o.value = "", e("input", void 0);
791
791
  return;
792
792
  }
793
- const b = Se(C, s(), r(), n.rounding);
794
- o.value = Le(b, r()), g(b);
793
+ const g = Se(x, r(), a(), n.rounding);
794
+ o.value = We(g, a()), P(g);
795
795
  }
796
- return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: s, decM: r, parseExternalToNumber: _, syncDisplayFromValue: u, emitStoredValue: g, onInput: z, onFocus: y, onBlur: k };
796
+ return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber: v, syncDisplayFromValue: u, emitStoredValue: P, onInput: $, onFocus: m, onBlur: S };
797
797
  }
798
798
  });
799
- var _t = function() {
799
+ var gt = function() {
800
800
  var e = this, n = e._self._c, t = e._self._setupProxy;
801
801
  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));
802
- }, bt = [], gt = /* @__PURE__ */ ae(
803
- ht,
802
+ }, bt = [], yt = /* @__PURE__ */ ae(
804
803
  _t,
804
+ gt,
805
805
  bt,
806
806
  !1,
807
807
  null,
@@ -809,7 +809,7 @@ var _t = function() {
809
809
  null,
810
810
  null
811
811
  );
812
- const ke = gt.exports, yt = /* @__PURE__ */ le({
812
+ const Re = yt.exports, wt = /* @__PURE__ */ oe({
813
813
  __name: "TreeSelect",
814
814
  props: {
815
815
  value: null,
@@ -827,106 +827,106 @@ const ke = gt.exports, yt = /* @__PURE__ */ le({
827
827
  },
828
828
  emits: ["input"],
829
829
  setup(c, { emit: e }) {
830
- const n = c, t = D(), o = D(), s = D(!1), r = D(!1), _ = D(""), u = D([]), g = D({}), z = S(() => ({
830
+ const n = c, t = z(), o = z(), r = z(!1), a = z(!1), v = z(""), u = z([]), P = z({}), $ = C(() => ({
831
831
  label: n.labelField,
832
832
  children: n.childrenField
833
833
  }));
834
- function y(M) {
835
- const T = n.labelField ?? "label", K = n.valueField ?? "value", U = n.childrenField ?? "children", H = M[U], Q = {};
836
- return Q[n.labelField ?? "label"] = M[T] ?? M.label, Q[n.valueField ?? "value"] = M[K] ?? M.value, Array.isArray(H) && H.length && (Q[n.childrenField ?? "children"] = H.map((G) => y(G))), Q;
834
+ function m(M) {
835
+ const D = n.labelField ?? "label", j = n.valueField ?? "value", G = n.childrenField ?? "children", H = M[G], Y = {};
836
+ return Y[n.labelField ?? "label"] = M[D] ?? M.label, Y[n.valueField ?? "value"] = M[j] ?? M.value, Array.isArray(H) && H.length && (Y[n.childrenField ?? "children"] = H.map((X) => m(X))), Y;
837
837
  }
838
- function k(M, T = "") {
839
- const K = {}, U = n.labelField ?? "label", H = n.valueField ?? "value", Q = n.childrenField ?? "children";
840
- for (const G of M) {
841
- const ee = String(G[U] ?? G.label ?? ""), J = G[H] ?? G.value;
842
- J != null && (K[String(J)] = T ? T + " / " + ee : ee);
843
- const te = G[Q] ?? G.children;
844
- Array.isArray(te) && te.length && Object.assign(K, k(te, ee));
838
+ function S(M, D = "") {
839
+ const j = {}, G = n.labelField ?? "label", H = n.valueField ?? "value", Y = n.childrenField ?? "children";
840
+ for (const X of M) {
841
+ const ee = String(X[G] ?? X.label ?? ""), J = X[H] ?? X.value;
842
+ J != null && (j[String(J)] = D ? D + " / " + ee : ee);
843
+ const te = X[Y] ?? X.children;
844
+ Array.isArray(te) && te.length && Object.assign(j, S(te, ee));
845
845
  }
846
- return K;
846
+ return j;
847
847
  }
848
848
  function p() {
849
849
  const M = n.treeData;
850
850
  return Array.isArray(M) && M.length > 0;
851
851
  }
852
- function C(M) {
853
- u.value = M, g.value = k(M);
852
+ function x(M) {
853
+ u.value = M, P.value = S(M);
854
854
  }
855
- function b() {
855
+ function g() {
856
856
  const M = n.treeData;
857
857
  if (!Array.isArray(M) || M.length === 0)
858
858
  return;
859
- const T = M.map((K) => y(K));
860
- C(T);
859
+ const D = M.map((j) => m(j));
860
+ x(D);
861
861
  }
862
- const j = S(() => n.value == null || n.value === "" ? "" : g.value[String(n.value)] ?? String(n.value)), N = (M, T) => {
862
+ const V = C(() => n.value == null || n.value === "" ? "" : P.value[String(n.value)] ?? String(n.value)), O = (M, D) => {
863
863
  if (!M)
864
864
  return !0;
865
- const K = n.labelField ?? "label";
866
- return String(T[K] ?? T.label ?? "").toLowerCase().includes(M.toLowerCase());
865
+ const j = n.labelField ?? "label";
866
+ return String(D[j] ?? D.label ?? "").toLowerCase().includes(M.toLowerCase());
867
867
  };
868
- Y(_, (M) => {
869
- var T;
870
- (T = o.value) == null || T.filter(M);
868
+ U(v, (M) => {
869
+ var D;
870
+ (D = o.value) == null || D.filter(M);
871
871
  });
872
- let x = null;
872
+ let y = null;
873
873
  function q() {
874
- n.disabled || (s.value = !0, n.lazy && !p() && L(), We(() => {
875
- x = (M) => {
874
+ n.disabled || (r.value = !0, n.lazy && !p() && K(), Ke(() => {
875
+ y = (M) => {
876
876
  t.value && !t.value.contains(M.target) && A();
877
- }, document.addEventListener("click", x);
877
+ }, document.addEventListener("click", y);
878
878
  }));
879
879
  }
880
880
  function A() {
881
- s.value = !1, _.value = "", x && (document.removeEventListener("click", x), x = null);
881
+ r.value = !1, v.value = "", y && (document.removeEventListener("click", y), y = null);
882
882
  }
883
- function P() {
883
+ function F() {
884
884
  e("input", void 0);
885
885
  }
886
886
  function f(M) {
887
- const T = n.valueField ?? "value", K = M[T] ?? M.value;
888
- e("input", K), A();
887
+ const D = n.valueField ?? "value", j = M[D] ?? M.value;
888
+ e("input", j), A();
889
889
  }
890
- async function L() {
890
+ async function K() {
891
891
  if (!(!n.api || p())) {
892
- r.value = !0;
892
+ a.value = !0;
893
893
  try {
894
- const M = await n.api(n.params), T = Array.isArray(M) ? M : (M == null ? void 0 : M.list) ?? (M == null ? void 0 : M.data) ?? [];
895
- u.value = T.map((K) => y(K)), g.value = k(u.value);
894
+ const M = await n.api(n.params), D = Array.isArray(M) ? M : (M == null ? void 0 : M.list) ?? (M == null ? void 0 : M.data) ?? [];
895
+ u.value = D.map((j) => m(j)), P.value = S(u.value);
896
896
  } finally {
897
- r.value = !1;
897
+ a.value = !1;
898
898
  }
899
899
  }
900
900
  }
901
901
  return me(() => {
902
- p() ? b() : n.lazy || L();
903
- }), Y(() => n.treeData, () => {
904
- p() ? b() : (u.value = [], g.value = {}, !n.lazy && n.api && L());
905
- }, { deep: !0 }), Y(() => n.api, () => {
906
- p() || (n.lazy ? (u.value = [], g.value = {}) : L());
907
- }, { deep: !0 }), Y(() => n.params, () => {
908
- p() || (n.lazy ? (u.value = [], g.value = {}) : L());
909
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: s, loading: r, filterText: _, treeData: u, flatLabelMap: g, treeProps: z, normalizeNode: y, buildFlatLabelMap: k, hasTreeDataProp: p, applyTreeData: C, syncFromTreeDataProp: b, displayText: j, filterNodeMethod: N, clickOutsideHandler: x, openDropdown: q, closeDropdown: A, clearValue: P, onNodeClick: f, fetchData: L };
902
+ p() ? g() : n.lazy || K();
903
+ }), U(() => n.treeData, () => {
904
+ p() ? g() : (u.value = [], P.value = {}, !n.lazy && n.api && K());
905
+ }, { deep: !0 }), U(() => n.api, () => {
906
+ p() || (n.lazy ? (u.value = [], P.value = {}) : K());
907
+ }, { deep: !0 }), U(() => n.params, () => {
908
+ p() || (n.lazy ? (u.value = [], P.value = {}) : K());
909
+ }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: v, treeData: u, flatLabelMap: P, treeProps: $, normalizeNode: m, buildFlatLabelMap: S, hasTreeDataProp: p, applyTreeData: x, syncFromTreeDataProp: g, displayText: V, filterNodeMethod: O, clickOutsideHandler: y, openDropdown: q, closeDropdown: A, clearValue: F, onNodeClick: f, fetchData: K };
910
910
  }
911
911
  });
912
- var wt = function() {
912
+ var Ct = function() {
913
913
  var e = this, n = e._self._c, t = e._self._setupProxy;
914
914
  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(o) {
915
915
  o.stopPropagation();
916
916
  } }, model: { value: t.filterText, callback: function(o) {
917
917
  t.filterText = o;
918
918
  }, 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);
919
- }, Ct = [], xt = /* @__PURE__ */ ae(
920
- yt,
919
+ }, xt = [], Pt = /* @__PURE__ */ ae(
921
920
  wt,
922
921
  Ct,
922
+ xt,
923
923
  !1,
924
924
  null,
925
925
  "f30bba11",
926
926
  null,
927
927
  null
928
928
  );
929
- const Pt = xt.exports, St = /* @__PURE__ */ le({
929
+ const St = Pt.exports, Ft = /* @__PURE__ */ oe({
930
930
  __name: "ProFormItem",
931
931
  props: {
932
932
  schema: null,
@@ -953,79 +953,79 @@ const Pt = xt.exports, St = /* @__PURE__ */ le({
953
953
  "cascader",
954
954
  "checkbox",
955
955
  "radio"
956
- ]), t = D(null);
956
+ ]), t = z(null);
957
957
  me(() => {
958
958
  var f;
959
959
  e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, t.value));
960
- }), Fe(() => {
960
+ }), ke(() => {
961
961
  var f;
962
962
  e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, null));
963
963
  });
964
- const o = Ae(), s = S(() => ({
964
+ const o = Fe(), r = C(() => ({
965
965
  schema: e.schema,
966
966
  values: e.formModel,
967
967
  model: e.formModel,
968
968
  field: e.schema.field
969
- })), r = S(() => {
969
+ })), a = C(() => {
970
970
  const f = e.schema.ifShow;
971
- return f === void 0 ? !0 : typeof f == "boolean" ? f : f(s.value);
972
- }), _ = S(() => {
971
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
972
+ }), v = C(() => {
973
973
  const f = e.schema.show;
974
- return f === void 0 ? !0 : typeof f == "boolean" ? f : f(s.value);
975
- }), u = S(() => {
974
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
975
+ }), u = C(() => {
976
976
  if (e.formDisabled)
977
977
  return !0;
978
978
  const f = e.schema.dynamicDisabled;
979
- return f === void 0 ? !1 : typeof f == "boolean" ? f : f(s.value);
980
- }), g = S(() => {
979
+ return f === void 0 ? !1 : typeof f == "boolean" ? f : f(r.value);
980
+ }), P = C(() => {
981
981
  const f = e.schema.dynamicRules;
982
- return f ? Array.isArray(f) ? f : f(s.value) : e.schema.rules;
983
- }), z = S(() => {
982
+ return f ? Array.isArray(f) ? f : f(r.value) : e.schema.rules;
983
+ }), $ = C(() => {
984
984
  const f = e.schema.componentProps;
985
985
  if (!f)
986
986
  return { props: {}, listeners: {} };
987
- const L = typeof f == "function" ? f({
988
- ...s.value,
987
+ const K = typeof f == "function" ? f({
988
+ ...r.value,
989
989
  formActionType: e.formActionType
990
- }) : { ...f }, M = {}, T = {};
991
- for (const [K, U] of Object.entries(L))
992
- if (K.length > 2 && /^on[A-Za-z]/.test(K) && typeof U == "function") {
993
- const H = K.slice(2).charAt(0).toLowerCase() + K.slice(3);
994
- T[H] = U;
990
+ }) : { ...f }, M = {}, D = {};
991
+ for (const [j, G] of Object.entries(K))
992
+ if (j.length > 2 && /^on[A-Za-z]/.test(j) && typeof G == "function") {
993
+ const H = j.slice(2).charAt(0).toLowerCase() + j.slice(3);
994
+ D[H] = G;
995
995
  } else
996
- M[K] = U;
997
- return { props: M, listeners: T };
998
- }), y = S(() => z.value.props), k = S(() => z.value.listeners), p = S(() => e.schema.colon ?? e.colon ?? !1), C = S(() => {
996
+ M[j] = G;
997
+ return { props: M, listeners: D };
998
+ }), m = C(() => $.value.props), S = C(() => $.value.listeners), p = C(() => e.schema.colon ?? e.colon ?? !1), x = C(() => {
999
999
  const f = e.schema.tooltip;
1000
1000
  if (!f)
1001
1001
  return null;
1002
- const L = typeof f == "function" ? f(s.value) : f;
1003
- return Te(L, e.formModel[e.schema.field]);
1004
- }), b = S(() => C.value ? "el-tooltip" : "span"), j = S(() => C.value || {}), N = S(() => !!o.default), x = (f) => {
1005
- const L = f == null ? void 0 : f.options;
1006
- return Array.isArray(L) ? L : void 0;
1007
- }, q = S(() => {
1002
+ const K = typeof f == "function" ? f(r.value) : f;
1003
+ return Te(K, e.formModel[e.schema.field]);
1004
+ }), g = C(() => x.value ? "el-tooltip" : "span"), V = C(() => x.value || {}), O = C(() => !!o.default), y = (f) => {
1005
+ const K = f == null ? void 0 : f.options;
1006
+ return Array.isArray(K) ? K : void 0;
1007
+ }, q = C(() => {
1008
1008
  const f = e.schema.component;
1009
1009
  return f == null ? null : typeof f == "string" ? n.has(f) ? null : e.customComponents && e.customComponents[f] || f : f;
1010
1010
  }), A = (f) => {
1011
- var L;
1012
- (L = e.onFieldChange) == null || L.call(e, e.schema.field, f);
1013
- }, P = S(() => {
1011
+ var K;
1012
+ (K = e.onFieldChange) == null || K.call(e, e.schema.field, f);
1013
+ }, F = C(() => {
1014
1014
  const f = e.schema.render;
1015
1015
  return f ? {
1016
1016
  render() {
1017
- const L = f(s.value);
1018
- return Array.isArray(L) ? ue("span", L) : L;
1017
+ const K = f(r.value);
1018
+ return Array.isArray(K) ? ue("span", K) : K;
1019
1019
  }
1020
1020
  } : null;
1021
1021
  });
1022
- return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: s, shouldRender: r, shouldShow: _, effectiveDisabled: u, effectiveRules: g, effectiveComponentPropsAndListeners: z, effectiveComponentProps: y, effectiveComponentListeners: k, showColon: p, normalizedTooltip: C, fieldWrapperComponent: b, fieldWrapperProps: j, hasSlot: N, getOptions: x, resolvedCustomComponent: q, setFieldValue: A, renderComponent: P, ApiSelect: ut, FormattedNumberInput: ke, TreeSelect: Pt };
1022
+ return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow: v, effectiveDisabled: u, effectiveRules: P, effectiveComponentPropsAndListeners: $, effectiveComponentProps: m, effectiveComponentListeners: S, showColon: p, normalizedTooltip: x, fieldWrapperComponent: g, fieldWrapperProps: V, hasSlot: O, getOptions: y, resolvedCustomComponent: q, setFieldValue: A, renderComponent: F, ApiSelect: dt, FormattedNumberInput: Re, TreeSelect: St };
1023
1023
  }
1024
1024
  });
1025
- var Ft = function() {
1025
+ var kt = function() {
1026
1026
  var e = this, n = e._self._c, t = e._self._setupProxy;
1027
- 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(o, s) {
1028
- return n("div", { key: s, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(o) + " ")]);
1027
+ 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(o, r) {
1028
+ return n("div", { key: r, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(o) + " ")]);
1029
1029
  }) : n("span", [e._v(e._s(e.schema.helpMessage))])], 2), n("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [n(t.renderComponent, { tag: "component" })] : t.hasSlot ? e._t("default", null, { model: e.formModel, schema: e.schema, field: e.schema.field, values: e.formModel }) : [n(t.fieldWrapperComponent, e._b({ tag: "component" }, "component", t.fieldWrapperProps, !1), [t.resolvedCustomComponent ? n(t.resolvedCustomComponent, e._g(e._b({ tag: "component", attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "component", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input" || !e.schema.component ? n("el-input", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1030
1030
  e.$set(e.formModel, e.schema.field, o);
1031
1031
  }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? n("el-input-number", e._g(e._b({ attrs: { placeholder: e.schema.placeholder, disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
@@ -1051,17 +1051,17 @@ var Ft = function() {
1051
1051
  }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1052
1052
  return n("el-radio", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
1053
1053
  }), 1) : e._e()], 1)]], 2) : e._e();
1054
- }, kt = [], Rt = /* @__PURE__ */ ae(
1055
- St,
1054
+ }, Bt = [], Rt = /* @__PURE__ */ ae(
1056
1055
  Ft,
1057
1056
  kt,
1057
+ Bt,
1058
1058
  !1,
1059
1059
  null,
1060
1060
  "48d7960b",
1061
1061
  null,
1062
1062
  null
1063
1063
  );
1064
- const qe = Rt.exports, Bt = /* @__PURE__ */ le({
1064
+ const qe = Rt.exports, Mt = /* @__PURE__ */ oe({
1065
1065
  __name: "FormActions",
1066
1066
  props: {
1067
1067
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -1082,24 +1082,24 @@ const qe = Rt.exports, Bt = /* @__PURE__ */ le({
1082
1082
  return { __sfc: !0 };
1083
1083
  }
1084
1084
  });
1085
- var Mt = function() {
1085
+ var At = function() {
1086
1086
  var e = this, n = e._self._c;
1087
1087
  return e._self._setupProxy, n("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? n("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
1088
1088
  return e.$emit("submit");
1089
1089
  } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? n("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
1090
1090
  return e.$emit("reset");
1091
1091
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
1092
- }, At = [], $t = /* @__PURE__ */ ae(
1093
- Bt,
1092
+ }, $t = [], Tt = /* @__PURE__ */ ae(
1094
1093
  Mt,
1095
1094
  At,
1095
+ $t,
1096
1096
  !1,
1097
1097
  null,
1098
1098
  "489c88d2",
1099
1099
  null,
1100
1100
  null
1101
1101
  );
1102
- const He = $t.exports, Tt = /* @__PURE__ */ le({
1102
+ const He = Tt.exports, Dt = /* @__PURE__ */ oe({
1103
1103
  __name: "ProForm",
1104
1104
  props: {
1105
1105
  schemas: null,
@@ -1133,156 +1133,156 @@ const He = $t.exports, Tt = /* @__PURE__ */ le({
1133
1133
  },
1134
1134
  emits: ["submit", "reset", "register", "update:modelValue"],
1135
1135
  setup(c, { expose: e, emit: n }) {
1136
- const t = c, o = Ae(), s = D(), r = D(), _ = D(!1), u = D(!0), g = D({}), z = D({}), y = D([]), k = D({}), p = D(/* @__PURE__ */ new Map()), C = { xl: 1920, lg: 1200, md: 992, sm: 768 }, b = (d, w, R) => {
1137
- const l = R ?? (typeof window < "u" ? window.innerWidth : 1920), a = d ?? {}, v = w ?? {}, F = v.span ?? 8;
1138
- return l >= C.xl ? a.xl ?? v.xl ?? a.lg ?? v.lg ?? a.md ?? v.md ?? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : l >= C.lg ? a.lg ?? v.lg ?? a.md ?? v.md ?? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : l >= C.md ? a.md ?? v.md ?? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : l >= C.sm ? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : a.xs ?? v.xs ?? a.span ?? F;
1139
- }, { getSetting: j } = $e(), N = S(() => ({ ...j("ProForm"), ...t, ...k.value })), x = S(() => N.value.modelValue), q = S(() => x.value !== void 0), A = S(() => q.value ? x.value ?? {} : g.value), P = S(() => ({
1140
- ...j("ProForm").components ?? {},
1141
- ...N.value.components ?? {},
1142
- ...k.value.components ?? {}
1143
- })), f = S(() => N.value.actionColOptions ?? { span: 24 }), L = D(typeof window < "u" ? window.innerWidth : 1920), M = (d, w, R, l) => {
1144
- let a = 24, v = 1, F = 0;
1145
- for (const E of d) {
1146
- const V = b(E.colProps, w, l);
1147
- if (V > a) {
1148
- if (v++, v > R)
1136
+ const t = c, o = Fe(), r = z(), a = z(), v = z(!1), u = z(!0), P = z({}), $ = z({}), m = z([]), S = z({}), p = z(/* @__PURE__ */ new Map()), x = { xl: 1920, lg: 1200, md: 992, sm: 768 }, g = (d, w, B) => {
1137
+ const l = B ?? (typeof window < "u" ? window.innerWidth : 1920), s = d ?? {}, _ = w ?? {}, k = _.span ?? 8;
1138
+ return l >= x.xl ? s.xl ?? _.xl ?? s.lg ?? _.lg ?? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.lg ? s.lg ?? _.lg ?? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.md ? s.md ?? _.md ?? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : l >= x.sm ? s.sm ?? _.sm ?? s.xs ?? _.xs ?? s.span ?? k : s.xs ?? _.xs ?? s.span ?? k;
1139
+ }, { getSetting: V } = Be(), O = C(() => ({ ...V("ProForm"), ...t, ...S.value })), y = C(() => O.value.modelValue), q = C(() => y.value !== void 0), A = C(() => q.value ? y.value ?? {} : P.value), F = C(() => ({
1140
+ ...V("ProForm").components ?? {},
1141
+ ...O.value.components ?? {},
1142
+ ...S.value.components ?? {}
1143
+ })), f = C(() => O.value.actionColOptions ?? { span: 24 }), K = z(typeof window < "u" ? window.innerWidth : 1920), M = (d, w, B, l) => {
1144
+ let s = 24, _ = 1, k = 0;
1145
+ for (const W of d) {
1146
+ const I = g(W.colProps, w, l);
1147
+ if (I > s) {
1148
+ if (_++, _ > B)
1149
1149
  break;
1150
- a = 24 - V;
1150
+ s = 24 - I;
1151
1151
  } else
1152
- a -= V;
1153
- F++;
1152
+ s -= I;
1153
+ k++;
1154
1154
  }
1155
- return F;
1156
- }, T = S(() => {
1157
- const d = y.value.filter((a) => H(a));
1158
- if (!N.value.showAdvancedButton)
1155
+ return k;
1156
+ }, D = C(() => {
1157
+ const d = m.value.filter((s) => H(s));
1158
+ if (!O.value.showAdvancedButton)
1159
1159
  return !1;
1160
- const w = N.value.alwaysShowLines ?? 1, R = N.value.baseColProps, l = M(d, R, w, L.value);
1160
+ const w = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1161
1161
  return d.length > l;
1162
- }), K = S(() => N.value.formListeners ?? {}), U = S(() => {
1163
- const d = y.value.filter((a) => H(a));
1164
- if (!N.value.showAdvancedButton || !u.value)
1162
+ }), j = C(() => O.value.formListeners ?? {}), G = C(() => {
1163
+ const d = m.value.filter((s) => H(s));
1164
+ if (!O.value.showAdvancedButton || !u.value)
1165
1165
  return d;
1166
- const w = N.value.alwaysShowLines ?? 1, R = N.value.baseColProps, l = M(d, R, w, L.value);
1166
+ const w = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1167
1167
  return d.slice(0, l);
1168
1168
  }), H = (d) => {
1169
- let w = !0, R = !0;
1170
- return typeof d.ifShow == "function" && (w = d.ifShow({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.ifShow == "boolean" && (w = d.ifShow), typeof d.show == "function" && (R = d.show({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.show == "boolean" && (R = d.show), w && R;
1171
- }, Q = (d) => d.colProps ?? N.value.baseColProps ?? {}, G = (d) => d.slot || d.field, ee = (d, w = !0) => {
1172
- const R = w ? { ...d ?? {} } : {}, l = N.value.initialValues ?? t.initialValues;
1173
- return y.value.forEach((a) => {
1174
- if (!(w && Object.prototype.hasOwnProperty.call(R, a.field))) {
1175
- if (a.defaultValue !== void 0) {
1176
- R[a.field] = a.defaultValue;
1169
+ let w = !0, B = !0;
1170
+ return typeof d.ifShow == "function" && (w = d.ifShow({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.ifShow == "boolean" && (w = d.ifShow), typeof d.show == "function" && (B = d.show({ schema: d, values: A.value, model: A.value, field: d.field })), typeof d.show == "boolean" && (B = d.show), w && B;
1171
+ }, Y = (d) => d.colProps ?? O.value.baseColProps ?? {}, X = (d) => d.slot || d.field, ee = (d, w = !0) => {
1172
+ const B = w ? { ...d ?? {} } : {}, l = O.value.initialValues ?? t.initialValues;
1173
+ return m.value.forEach((s) => {
1174
+ if (!(w && Object.prototype.hasOwnProperty.call(B, s.field))) {
1175
+ if (s.defaultValue !== void 0) {
1176
+ B[s.field] = s.defaultValue;
1177
1177
  return;
1178
1178
  }
1179
- l && Object.prototype.hasOwnProperty.call(l, a.field) && (R[a.field] = l[a.field]);
1179
+ l && Object.prototype.hasOwnProperty.call(l, s.field) && (B[s.field] = l[s.field]);
1180
1180
  }
1181
- }), R;
1181
+ }), B;
1182
1182
  }, J = (d, w = !0) => {
1183
- g.value = d, w && n("update:modelValue", d);
1183
+ P.value = d, w && n("update:modelValue", d);
1184
1184
  }, te = (d) => {
1185
1185
  const w = ee({ ...A.value, ...d });
1186
1186
  return J(w), w;
1187
1187
  }, ne = () => {
1188
1188
  const d = {};
1189
- y.value.forEach((w) => {
1190
- var R;
1191
- (R = w.rules) != null && R.length && (d[w.field] = w.rules);
1192
- }), J(ee(A.value), !1), z.value = d;
1193
- }, h = (d) => {
1189
+ m.value.forEach((w) => {
1190
+ var B;
1191
+ (B = w.rules) != null && B.length && (d[w.field] = w.rules);
1192
+ }), J(ee(A.value), !1), $.value = d;
1193
+ }, b = (d) => {
1194
1194
  const w = { ...d };
1195
- return y.value.forEach((R) => {
1196
- const l = R.ifShow;
1195
+ return m.value.forEach((B) => {
1196
+ const l = B.ifShow;
1197
1197
  if (l === void 0)
1198
1198
  return;
1199
- (typeof l == "boolean" ? l : l({ schema: R, values: d, model: d, field: R.field })) || delete w[R.field];
1199
+ (typeof l == "boolean" ? l : l({ schema: B, values: d, model: d, field: B.field })) || delete w[B.field];
1200
1200
  }), w;
1201
- }, I = (d) => {
1202
- const w = h(d), R = k.value.fieldMapToTime;
1203
- if (!(R != null && R.length))
1201
+ }, N = (d) => {
1202
+ const w = b(d), B = S.value.fieldMapToTime;
1203
+ if (!(B != null && B.length))
1204
1204
  return w;
1205
1205
  const l = { ...w };
1206
- return R.forEach(([a, [v, F]]) => {
1207
- const E = l[a];
1208
- Array.isArray(E) && E.length === 2 && (delete l[a], l[v] = E[0], l[F] = E[1]);
1206
+ return B.forEach(([s, [_, k]]) => {
1207
+ const W = l[s];
1208
+ Array.isArray(W) && W.length === 2 && (delete l[s], l[_] = W[0], l[k] = W[1]);
1209
1209
  }), l;
1210
- }, $ = async () => {
1210
+ }, T = async () => {
1211
1211
  var d;
1212
1212
  try {
1213
- await ((d = s.value) == null ? void 0 : d.validate()), N.value.submitFunc ? await N.value.submitFunc() : (_.value = !0, n("submit", I({ ...A.value })));
1213
+ await ((d = r.value) == null ? void 0 : d.validate()), O.value.submitFunc ? await O.value.submitFunc() : (v.value = !0, n("submit", N({ ...A.value })));
1214
1214
  } catch (w) {
1215
1215
  console.error("Form validation failed:", w);
1216
1216
  } finally {
1217
- _.value = !1;
1217
+ v.value = !1;
1218
1218
  }
1219
1219
  }, i = async () => {
1220
1220
  var d;
1221
- N.value.resetFunc ? await N.value.resetFunc() : ((d = s.value) == null || d.resetFields(), ne(), n("reset"), N.value.submitOnReset && await $());
1222
- }, m = (d) => (te(d), Promise.resolve()), B = () => I({ ...A.value }), W = async () => {
1221
+ O.value.resetFunc ? await O.value.resetFunc() : ((d = r.value) == null || d.resetFields(), ne(), n("reset"), O.value.submitOnReset && await T());
1222
+ }, h = (d) => (te(d), Promise.resolve()), R = () => N({ ...A.value }), L = async () => {
1223
1223
  var d;
1224
- (d = s.value) == null || d.resetFields(), J(ee(void 0, !1));
1225
- }, O = (d, w) => {
1224
+ (d = r.value) == null || d.resetFields(), J(ee(void 0, !1));
1225
+ }, E = (d, w) => {
1226
1226
  te({ [d]: w });
1227
- }, X = (d) => {
1227
+ }, Z = (d) => {
1228
1228
  var w;
1229
- return ((w = s.value) == null ? void 0 : w.validate(d)) ?? Promise.resolve();
1230
- }, se = (d) => s.value ? d != null && d.length ? Promise.all(d.map((w) => new Promise((R, l) => {
1231
- s.value.validateField(w, (a) => a ? R(void 0) : l(new Error("Validation failed")));
1232
- }))) : s.value.validate() : Promise.resolve(), he = async (d, w) => {
1229
+ return ((w = r.value) == null ? void 0 : w.validate(d)) ?? Promise.resolve();
1230
+ }, re = (d) => r.value ? d != null && d.length ? Promise.all(d.map((w) => new Promise((B, l) => {
1231
+ r.value.validateField(w, (s) => s ? B(void 0) : l(new Error("Validation failed")));
1232
+ }))) : r.value.validate() : Promise.resolve(), he = async (d, w) => {
1233
1233
  var l;
1234
- const R = (l = r.value) == null ? void 0 : l.querySelector(`[data-field="${d}"]`);
1235
- return R && R.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
1236
- }, re = (d) => {
1234
+ const B = (l = a.value) == null ? void 0 : l.querySelector(`[data-field="${d}"]`);
1235
+ return B && B.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
1236
+ }, se = (d) => {
1237
1237
  var w;
1238
- (w = s.value) == null || w.clearValidate(d);
1238
+ (w = r.value) == null || w.clearValidate(d);
1239
1239
  }, _e = async (d) => {
1240
- (Array.isArray(d) ? d : [d]).forEach((R) => {
1241
- const l = y.value.findIndex((a) => a.field === R.field);
1242
- l >= 0 && (y.value[l] = { ...y.value[l], ...R });
1240
+ (Array.isArray(d) ? d : [d]).forEach((B) => {
1241
+ const l = m.value.findIndex((s) => s.field === B.field);
1242
+ l >= 0 && (m.value[l] = { ...m.value[l], ...B });
1243
1243
  });
1244
- }, be = async (d, w, R) => {
1245
- if (R)
1246
- y.value.unshift(d);
1244
+ }, ge = async (d, w, B) => {
1245
+ if (B)
1246
+ m.value.unshift(d);
1247
1247
  else if (w) {
1248
- const l = y.value.findIndex((a) => a.field === w);
1249
- y.value.splice(l + 1, 0, d);
1248
+ const l = m.value.findIndex((s) => s.field === w);
1249
+ m.value.splice(l + 1, 0, d);
1250
1250
  } else
1251
- y.value.push(d);
1251
+ m.value.push(d);
1252
1252
  ne();
1253
- }, ge = async (d) => {
1253
+ }, be = async (d) => {
1254
1254
  const w = Array.isArray(d) ? d : [d];
1255
- y.value = y.value.filter((R) => !w.includes(R.field));
1255
+ m.value = m.value.filter((B) => !w.includes(B.field));
1256
1256
  }, ye = async (d) => {
1257
- k.value = { ...k.value, ...d }, d.schemas && (y.value = [...d.schemas], ne());
1257
+ S.value = { ...S.value, ...d }, d.schemas && (m.value = [...d.schemas], ne());
1258
1258
  }, we = (d, w) => {
1259
1259
  w ? p.value.set(d, w) : p.value.delete(d);
1260
1260
  }, Ce = (d) => p.value.get(d) ?? null;
1261
1261
  function xe(d, w = !1) {
1262
- const R = p.value.get(d);
1263
- if (!R)
1262
+ const B = p.value.get(d);
1263
+ if (!B)
1264
1264
  return [];
1265
- const l = R;
1265
+ const l = B;
1266
1266
  return w ? (l == null ? void 0 : l.rawOptions) ?? [] : (l == null ? void 0 : l.options) ?? [];
1267
1267
  }
1268
1268
  const ve = (d) => {
1269
1269
  const w = p.value.get(d);
1270
1270
  if (!w)
1271
1271
  return !1;
1272
- const R = w;
1273
- return (R == null ? void 0 : R.loading) ?? !1;
1272
+ const B = w;
1273
+ return (B == null ? void 0 : B.loading) ?? !1;
1274
1274
  }, ie = {
1275
- getFieldsValue: B,
1276
- setFieldsValue: m,
1277
- resetFields: W,
1278
- validate: X,
1279
- validateFields: se,
1280
- submit: $,
1275
+ getFieldsValue: R,
1276
+ setFieldsValue: h,
1277
+ resetFields: L,
1278
+ validate: Z,
1279
+ validateFields: re,
1280
+ submit: T,
1281
1281
  scrollToField: he,
1282
- clearValidate: re,
1282
+ clearValidate: se,
1283
1283
  updateSchema: _e,
1284
- appendSchemaByField: be,
1285
- removeSchemaByField: ge,
1284
+ appendSchemaByField: ge,
1285
+ removeSchemaByField: be,
1286
1286
  setProps: ye,
1287
1287
  getComponentInstance: Ce,
1288
1288
  getFieldOptions: xe,
@@ -1293,33 +1293,33 @@ const He = $t.exports, Tt = /* @__PURE__ */ le({
1293
1293
  registerFieldInstance: we
1294
1294
  });
1295
1295
  const ce = () => {
1296
- y.value = [...t.schemas ?? []], ne();
1296
+ m.value = [...t.schemas ?? []], ne();
1297
1297
  }, de = () => {
1298
- typeof window < "u" && (L.value = window.innerWidth);
1298
+ typeof window < "u" && (K.value = window.innerWidth);
1299
1299
  };
1300
1300
  return me(() => {
1301
1301
  ce(), n("register", ie), typeof window < "u" && window.addEventListener("resize", de);
1302
- }), Fe(() => {
1302
+ }), ke(() => {
1303
1303
  typeof window < "u" && window.removeEventListener("resize", de);
1304
- }), Y(() => x.value, (d) => {
1304
+ }), U(() => y.value, (d) => {
1305
1305
  !q.value || d === void 0 || J(ee(d), !1);
1306
- }, { deep: !0, immediate: !0 }), Y(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: s, formWrapRef: r, submitLoading: _, collapsed: u, formModel: g, formRules: z, innerSchemas: y, innerProps: k, fieldInstanceMap: p, BREAKPOINTS: C, getEffectiveSpan: b, getComponentSetting: j, effectiveProps: N, controlledModelValue: x, isControlled: q, currentFormModel: A, formCustomComponents: P, effectiveActionColOptions: f, windowWidth: L, getVisibleSchemaCount: M, hasMoreFields: T, formListeners: K, displaySchemas: U, shouldShow: H, getColProps: Q, getSlotName: G, resolveSchemaModel: ee, applyFormModel: J, updateFormModel: te, initForm: ne, filterByIfShow: h, processFieldMapToTime: I, handleSubmit: $, handleReset: i, setFieldsValue: m, getFieldsValue: B, resetFields: W, handleFieldChange: O, validate: X, validateFields: se, scrollToField: he, clearValidate: re, updateSchema: _e, appendSchemaByField: be, removeSchemaByField: ge, setProps: ye, registerFieldInstance: we, getComponentInstance: Ce, getFieldOptions: xe, isFieldLoading: ve, formActionRef: ie, syncSchemas: ce, handleResize: de, ProFormItem: qe, FormActions: He };
1306
+ }, { deep: !0, immediate: !0 }), U(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: v, collapsed: u, formModel: P, formRules: $, innerSchemas: m, innerProps: S, fieldInstanceMap: p, BREAKPOINTS: x, getEffectiveSpan: g, getComponentSetting: V, effectiveProps: O, controlledModelValue: y, isControlled: q, currentFormModel: A, formCustomComponents: F, effectiveActionColOptions: f, windowWidth: K, getVisibleSchemaCount: M, hasMoreFields: D, formListeners: j, displaySchemas: G, shouldShow: H, getColProps: Y, getSlotName: X, resolveSchemaModel: ee, applyFormModel: J, updateFormModel: te, initForm: ne, filterByIfShow: b, processFieldMapToTime: N, handleSubmit: T, handleReset: i, setFieldsValue: h, getFieldsValue: R, resetFields: L, handleFieldChange: E, validate: Z, validateFields: re, scrollToField: he, clearValidate: se, updateSchema: _e, appendSchemaByField: ge, removeSchemaByField: be, setProps: ye, registerFieldInstance: we, getComponentInstance: Ce, getFieldOptions: xe, isFieldLoading: ve, formActionRef: ie, syncSchemas: ce, handleResize: de, ProFormItem: qe, FormActions: He };
1307
1307
  }
1308
1308
  });
1309
- var Dt = function() {
1309
+ var zt = function() {
1310
1310
  var e = this, n = e._self._c, t = e._self._setupProxy;
1311
1311
  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(o) {
1312
- var s, r;
1313
- return [t.shouldShow(o) ? n("el-col", e._b({ key: o.field, attrs: { offset: ((s = o.colProps) == null ? void 0 : s.offset) ?? ((r = t.effectiveProps.baseColProps) == null ? void 0 : r.offset) ?? 0, "data-field": o.field } }, "el-col", t.getColProps(o), !1), [n(t.ProFormItem, { attrs: { schema: o, "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(o)] ? [e._t(t.getSlotName(o), null, { model: t.currentFormModel, schema: o, field: o.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1312
+ var r, a;
1313
+ return [t.shouldShow(o) ? n("el-col", e._b({ key: o.field, attrs: { offset: ((r = o.colProps) == null ? void 0 : r.offset) ?? ((a = t.effectiveProps.baseColProps) == null ? void 0 : a.offset) ?? 0, "data-field": o.field } }, "el-col", t.getColProps(o), !1), [n(t.ProFormItem, { attrs: { schema: o, "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(o)] ? [e._t(t.getSlotName(o), null, { model: t.currentFormModel, schema: o, field: o.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1314
1314
  }), 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(o) {
1315
1315
  t.collapsed = !t.collapsed;
1316
1316
  } } }, [n("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), n("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), n("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), n("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), n("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? n("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(o) {
1317
1317
  t.collapsed = !t.collapsed;
1318
1318
  } } }, [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);
1319
- }, zt = [], Ot = /* @__PURE__ */ ae(
1320
- Tt,
1319
+ }, Et = [], Ot = /* @__PURE__ */ ae(
1321
1320
  Dt,
1322
1321
  zt,
1322
+ Et,
1323
1323
  !1,
1324
1324
  null,
1325
1325
  "80bac8be",
@@ -1327,86 +1327,86 @@ var Dt = function() {
1327
1327
  null
1328
1328
  );
1329
1329
  const Je = Ot.exports;
1330
- function Zt(c) {
1331
- const e = D(null), n = D(c ? pe(c) : void 0), t = () => c ? pe(c) : void 0, o = (P) => {
1332
- e.value = P;
1330
+ function nn(c) {
1331
+ const e = z(null), n = z(c ? pe(c) : void 0), t = () => c ? pe(c) : void 0, o = (F) => {
1332
+ e.value = F;
1333
1333
  const f = t();
1334
- f && Object.keys(f).length > 0 && P.setProps(f);
1334
+ f && Object.keys(f).length > 0 && F.setProps(f);
1335
1335
  };
1336
- c && Y(
1336
+ c && U(
1337
1337
  () => t(),
1338
- (P) => {
1339
- n.value = P, P && e.value && e.value.setProps(P);
1338
+ (F) => {
1339
+ n.value = F, F && e.value && e.value.setProps(F);
1340
1340
  },
1341
1341
  { deep: !0 }
1342
1342
  );
1343
- const s = () => {
1344
- var P;
1345
- return ((P = e.value) == null ? void 0 : P.getFieldsValue()) ?? {};
1346
- }, r = async (P) => {
1343
+ const r = () => {
1344
+ var F;
1345
+ return ((F = e.value) == null ? void 0 : F.getFieldsValue()) ?? {};
1346
+ }, a = async (F) => {
1347
1347
  var f;
1348
- await ((f = e.value) == null ? void 0 : f.setFieldsValue(P));
1349
- }, _ = async () => {
1350
- var P;
1351
- await ((P = e.value) == null ? void 0 : P.resetFields());
1352
- }, u = (P) => {
1348
+ await ((f = e.value) == null ? void 0 : f.setFieldsValue(F));
1349
+ }, v = async () => {
1350
+ var F;
1351
+ await ((F = e.value) == null ? void 0 : F.resetFields());
1352
+ }, u = (F) => {
1353
1353
  var f;
1354
- return ((f = e.value) == null ? void 0 : f.validate(P)) ?? Promise.resolve();
1355
- }, g = (P) => {
1354
+ return ((f = e.value) == null ? void 0 : f.validate(F)) ?? Promise.resolve();
1355
+ }, P = (F) => {
1356
1356
  var f;
1357
- return ((f = e.value) == null ? void 0 : f.validateFields(P)) ?? Promise.resolve();
1358
- }, z = () => {
1359
- var P;
1360
- return ((P = e.value) == null ? void 0 : P.submit()) ?? Promise.resolve();
1361
- }, y = (P, f) => {
1362
- var L;
1363
- return ((L = e.value) == null ? void 0 : L.scrollToField(P, f)) ?? Promise.resolve();
1364
- }, k = (P) => {
1357
+ return ((f = e.value) == null ? void 0 : f.validateFields(F)) ?? Promise.resolve();
1358
+ }, $ = () => {
1359
+ var F;
1360
+ return ((F = e.value) == null ? void 0 : F.submit()) ?? Promise.resolve();
1361
+ }, m = (F, f) => {
1362
+ var K;
1363
+ return ((K = e.value) == null ? void 0 : K.scrollToField(F, f)) ?? Promise.resolve();
1364
+ }, S = (F) => {
1365
1365
  var f;
1366
- (f = e.value) == null || f.clearValidate(P);
1367
- }, p = (P) => {
1366
+ (f = e.value) == null || f.clearValidate(F);
1367
+ }, p = (F) => {
1368
1368
  var f;
1369
- return ((f = e.value) == null ? void 0 : f.updateSchema(P)) ?? Promise.resolve();
1370
- }, C = (P, f, L) => {
1369
+ return ((f = e.value) == null ? void 0 : f.updateSchema(F)) ?? Promise.resolve();
1370
+ }, x = (F, f, K) => {
1371
1371
  var M;
1372
- return ((M = e.value) == null ? void 0 : M.appendSchemaByField(P, f, L)) ?? Promise.resolve();
1373
- }, b = (P) => {
1372
+ return ((M = e.value) == null ? void 0 : M.appendSchemaByField(F, f, K)) ?? Promise.resolve();
1373
+ }, g = (F) => {
1374
1374
  var f;
1375
- return ((f = e.value) == null ? void 0 : f.removeSchemaByField(P)) ?? Promise.resolve();
1376
- }, j = async (P) => {
1375
+ return ((f = e.value) == null ? void 0 : f.removeSchemaByField(F)) ?? Promise.resolve();
1376
+ }, V = async (F) => {
1377
1377
  var f;
1378
- n.value = { ...n.value, ...P }, await ((f = e.value) == null ? void 0 : f.setProps(P));
1379
- }, N = (P) => {
1378
+ n.value = { ...n.value, ...F }, await ((f = e.value) == null ? void 0 : f.setProps(F));
1379
+ }, O = (F) => {
1380
1380
  var f;
1381
- return ((f = e.value) == null ? void 0 : f.getComponentInstance(P)) ?? null;
1381
+ return ((f = e.value) == null ? void 0 : f.getComponentInstance(F)) ?? null;
1382
1382
  };
1383
- function x(P, f = !1) {
1384
- return e.value ? f ? e.value.getFieldOptions(P, !0) : e.value.getFieldOptions(P) : [];
1383
+ function y(F, f = !1) {
1384
+ return e.value ? f ? e.value.getFieldOptions(F, !0) : e.value.getFieldOptions(F) : [];
1385
1385
  }
1386
1386
  return [o, {
1387
1387
  register: o,
1388
1388
  formAction: e,
1389
- getFieldsValue: s,
1390
- setFieldsValue: r,
1391
- resetFields: _,
1389
+ getFieldsValue: r,
1390
+ setFieldsValue: a,
1391
+ resetFields: v,
1392
1392
  validate: u,
1393
- validateFields: g,
1394
- submit: z,
1395
- scrollToField: y,
1396
- clearValidate: k,
1393
+ validateFields: P,
1394
+ submit: $,
1395
+ scrollToField: m,
1396
+ clearValidate: S,
1397
1397
  updateSchema: p,
1398
- appendSchemaByField: C,
1399
- removeSchemaByField: b,
1400
- setProps: j,
1401
- getComponentInstance: N,
1402
- getFieldOptions: x,
1403
- isFieldLoading: (P) => {
1398
+ appendSchemaByField: x,
1399
+ removeSchemaByField: g,
1400
+ setProps: V,
1401
+ getComponentInstance: O,
1402
+ getFieldOptions: y,
1403
+ isFieldLoading: (F) => {
1404
1404
  var f;
1405
- return ((f = e.value) == null ? void 0 : f.isFieldLoading(P)) ?? !1;
1405
+ return ((f = e.value) == null ? void 0 : f.isFieldLoading(F)) ?? !1;
1406
1406
  }
1407
1407
  }];
1408
1408
  }
1409
- const Nt = /* @__PURE__ */ le({
1409
+ const Nt = /* @__PURE__ */ oe({
1410
1410
  __name: "ProDescriptions",
1411
1411
  props: {
1412
1412
  title: null,
@@ -1422,7 +1422,7 @@ const Nt = /* @__PURE__ */ le({
1422
1422
  },
1423
1423
  emits: ["register"],
1424
1424
  setup(c, { expose: e, emit: n }) {
1425
- const t = c, o = D({}), s = D({}), r = D([]), _ = D(typeof window < "u" ? window.innerWidth : 1920), u = D(!0), g = le({
1425
+ const t = c, o = z({}), r = z({}), a = z([]), v = z(typeof window < "u" ? window.innerWidth : 1920), u = z(!0), P = oe({
1426
1426
  name: "EcpDescriptionValueRenderer",
1427
1427
  props: {
1428
1428
  schema: { type: Object, required: !0 },
@@ -1430,117 +1430,117 @@ const Nt = /* @__PURE__ */ le({
1430
1430
  record: { type: Object, required: !0 },
1431
1431
  emptyText: { type: String, default: "-" }
1432
1432
  },
1433
- setup(h) {
1433
+ setup(b) {
1434
1434
  return () => {
1435
- const I = h.schema, $ = h.record, i = h.value, m = (B) => {
1436
- const W = z(I, B === h.emptyText ? i : B, $), O = ue("span", B);
1437
- return W ? ue("el-tooltip", { props: W }, [O]) : O;
1435
+ const N = b.schema, T = b.record, i = b.value, h = (R) => {
1436
+ const L = $(N, R === b.emptyText ? i : R, T), E = ue("span", R);
1437
+ return L ? ue("el-tooltip", { props: L }, [E]) : E;
1438
1438
  };
1439
- if (I.render) {
1440
- const B = I.render(i, $);
1441
- return B == null || B === "" ? m(h.emptyText) : typeof B == "string" || typeof B == "number" ? m(String(B)) : B;
1439
+ if (N.render) {
1440
+ const R = N.render(i, T);
1441
+ return R == null || R === "" ? h(b.emptyText) : typeof R == "string" || typeof R == "number" ? h(String(R)) : R;
1442
1442
  }
1443
- return Array.isArray(i) ? m(i.length ? i.join(", ") : h.emptyText) : i == null || i === "" ? m(h.emptyText) : m(typeof i == "object" ? JSON.stringify(i) : String(i));
1443
+ return Array.isArray(i) ? h(i.length ? i.join(", ") : b.emptyText) : i == null || i === "" ? h(b.emptyText) : h(typeof i == "object" ? JSON.stringify(i) : String(i));
1444
1444
  };
1445
1445
  }
1446
- }), z = (h, I, $) => {
1447
- const i = h.tooltip;
1446
+ }), $ = (b, N, T) => {
1447
+ const i = b.tooltip;
1448
1448
  if (!i)
1449
1449
  return null;
1450
- const m = typeof i == "function" ? i({ value: I, record: $, schema: h }) : i;
1451
- return Te(m, I);
1452
- }, { mergeSettings: y } = $e(), k = S(() => y("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, C = (h, I) => {
1453
- if (typeof h == "number")
1454
- return Math.max(1, h);
1455
- const $ = h ?? {};
1456
- return I >= p.xxl ? $.xxl ?? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.xl ? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.lg ? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.md ? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.sm ? $.sm ?? $.xs ?? 2 : $.xs ?? 1;
1457
- }, b = S(() => C(k.value.column, _.value)), j = S(() => k.value.data ?? s.value ?? {}), N = S(() => (r.value.length ? r.value : k.value.schema ?? []).filter((h) => h.dataIndex || h.field ? typeof h.show == "function" ? h.show(j.value) : h.show !== !1 : !1).map((h) => ({
1458
- ...h,
1459
- dataIndex: h.dataIndex || h.field || ""
1460
- }))), x = S(() => {
1461
- const h = [];
1462
- let I = { items: [] }, $ = 0;
1463
- const i = b.value;
1464
- return N.value.forEach((m, B) => {
1465
- const W = N.value.length - B, O = Math.max(1, Math.min(m.span ?? 1, i)), X = W === 1 ? i - $ || i : O;
1466
- $ + X > i && (h.push(I), I = { items: [] }, $ = 0);
1467
- const se = W === 1 && $ < i ? Math.max(1, i - $) : X;
1468
- I.items.push({ ...m, _span: se }), $ += se, $ >= i && (h.push(I), I = { items: [] }, $ = 0);
1469
- }), I.items.length > 0 && h.push(I), h;
1470
- }), q = S(() => {
1471
- var I;
1450
+ const h = typeof i == "function" ? i({ value: N, record: T, schema: b }) : i;
1451
+ return Te(h, N);
1452
+ }, { mergeSettings: m } = Be(), S = C(() => m("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, x = (b, N) => {
1453
+ if (typeof b == "number")
1454
+ return Math.max(1, b);
1455
+ const T = b ?? {};
1456
+ return N >= p.xxl ? T.xxl ?? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.xl ? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.lg ? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.md ? T.md ?? T.sm ?? T.xs ?? 3 : N >= p.sm ? T.sm ?? T.xs ?? 2 : T.xs ?? 1;
1457
+ }, g = C(() => x(S.value.column, v.value)), V = C(() => S.value.data ?? r.value ?? {}), O = C(() => (a.value.length ? a.value : S.value.schema ?? []).filter((b) => b.dataIndex || b.field ? typeof b.show == "function" ? b.show(V.value) : b.show !== !1 : !1).map((b) => ({
1458
+ ...b,
1459
+ dataIndex: b.dataIndex || b.field || ""
1460
+ }))), y = C(() => {
1461
+ const b = [];
1462
+ let N = { items: [] }, T = 0;
1463
+ const i = g.value;
1464
+ return O.value.forEach((h, R) => {
1465
+ const L = O.value.length - R, E = Math.max(1, Math.min(h.span ?? 1, i)), Z = L === 1 ? i - T || i : E;
1466
+ T + Z > i && (b.push(N), N = { items: [] }, T = 0);
1467
+ const re = L === 1 && T < i ? Math.max(1, i - T) : Z;
1468
+ N.items.push({ ...h, _span: re }), T += re, T >= i && (b.push(N), N = { items: [] }, T = 0);
1469
+ }), N.items.length > 0 && b.push(N), b;
1470
+ }), q = C(() => {
1471
+ var N;
1472
1472
  if (!A.value || u.value)
1473
- return x.value;
1474
- const h = Math.max(1, ((I = k.value.collapseOptions) == null ? void 0 : I.visibleRows) ?? 1);
1475
- return x.value.slice(0, h);
1476
- }), A = S(() => {
1477
- var I, $;
1478
- const h = Math.max(1, ((I = k.value.collapseOptions) == null ? void 0 : I.visibleRows) ?? 1);
1479
- return !!k.value.useCollapse && !!(($ = k.value.collapseOptions) != null && $.canExpand) && x.value.length > h;
1480
- }), P = S(() => !!k.value.title || !!k.value.helpMessage || A.value), f = S(() => {
1481
- var h, I;
1473
+ return y.value;
1474
+ const b = Math.max(1, ((N = S.value.collapseOptions) == null ? void 0 : N.visibleRows) ?? 1);
1475
+ return y.value.slice(0, b);
1476
+ }), A = C(() => {
1477
+ var N, T;
1478
+ const b = Math.max(1, ((N = S.value.collapseOptions) == null ? void 0 : N.visibleRows) ?? 1);
1479
+ return !!S.value.useCollapse && !!((T = S.value.collapseOptions) != null && T.canExpand) && y.value.length > b;
1480
+ }), F = C(() => !!S.value.title || !!S.value.helpMessage || A.value), f = C(() => {
1481
+ var b, N;
1482
1482
  return {
1483
- expand: ((h = k.value.collapseOptions) == null ? void 0 : h.expandButtonText) ?? "展开",
1484
- collapse: ((I = k.value.collapseOptions) == null ? void 0 : I.collapseButtonText) ?? "收起"
1483
+ expand: ((b = S.value.collapseOptions) == null ? void 0 : b.expandButtonText) ?? "展开",
1484
+ collapse: ((N = S.value.collapseOptions) == null ? void 0 : N.collapseButtonText) ?? "收起"
1485
1485
  };
1486
- }), L = S(() => ({
1487
- gridTemplateColumns: `repeat(${b.value}, minmax(0, 1fr))`
1488
- })), M = (h) => ({
1489
- gridColumn: `span ${h._span}`
1490
- }), T = (h) => ({
1491
- minWidth: h.labelMinWidth ? `${h.labelMinWidth}px` : void 0,
1492
- ...h.labelStyle ?? {}
1493
- }), K = (h) => ({
1494
- minWidth: h.contentMinWidth ? `${h.contentMinWidth}px` : void 0,
1495
- ...h.contentStyle ?? {}
1496
- }), U = (h) => j.value[h.dataIndex], H = () => {
1497
- r.value = [...k.value.schema ?? []];
1498
- }, Q = () => {
1499
- s.value = { ...k.value.data ?? {} };
1500
- }, G = async (h) => {
1501
- o.value = { ...o.value, ...h }, h.schema && (r.value = [...h.schema]), h.data && (s.value = { ...h.data });
1502
- }, ee = async (h) => {
1503
- s.value = { ...s.value, ...h }, o.value = { ...o.value, data: s.value };
1504
- }, J = () => ({ ...k.value.data ?? s.value ?? {} }), te = {
1505
- setProps: G,
1486
+ }), K = C(() => ({
1487
+ gridTemplateColumns: `repeat(${g.value}, minmax(0, 1fr))`
1488
+ })), M = (b) => ({
1489
+ gridColumn: `span ${b._span}`
1490
+ }), D = (b) => ({
1491
+ minWidth: b.labelMinWidth ? `${b.labelMinWidth}px` : void 0,
1492
+ ...b.labelStyle ?? {}
1493
+ }), j = (b) => ({
1494
+ minWidth: b.contentMinWidth ? `${b.contentMinWidth}px` : void 0,
1495
+ ...b.contentStyle ?? {}
1496
+ }), G = (b) => V.value[b.dataIndex], H = () => {
1497
+ a.value = [...S.value.schema ?? []];
1498
+ }, Y = () => {
1499
+ r.value = { ...S.value.data ?? {} };
1500
+ }, X = async (b) => {
1501
+ o.value = { ...o.value, ...b }, b.schema && (a.value = [...b.schema]), b.data && (r.value = { ...b.data });
1502
+ }, ee = async (b) => {
1503
+ r.value = { ...r.value, ...b }, o.value = { ...o.value, data: r.value };
1504
+ }, J = () => ({ ...S.value.data ?? r.value ?? {} }), te = {
1505
+ setProps: X,
1506
1506
  setData: ee,
1507
1507
  getData: J
1508
1508
  };
1509
1509
  e(te);
1510
1510
  const ne = () => {
1511
- typeof window < "u" && (_.value = window.innerWidth);
1511
+ typeof window < "u" && (v.value = window.innerWidth);
1512
1512
  };
1513
1513
  return me(() => {
1514
- var h;
1515
- H(), Q(), u.value = ((h = k.value.collapseOptions) == null ? void 0 : h.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", ne);
1516
- }), Fe(() => {
1514
+ var b;
1515
+ H(), Y(), u.value = ((b = S.value.collapseOptions) == null ? void 0 : b.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", ne);
1516
+ }), ke(() => {
1517
1517
  typeof window < "u" && window.removeEventListener("resize", ne);
1518
- }), Y(() => k.value.schema, H, { deep: !0 }), Y(() => k.value.data, Q, { deep: !0 }), Y(() => {
1519
- var h;
1520
- return (h = k.value.collapseOptions) == null ? void 0 : h.defaultExpand;
1521
- }, (h) => {
1522
- h !== void 0 && (u.value = h);
1523
- }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: s, innerSchema: r, windowWidth: _, expanded: u, DescriptionValueRenderer: g, normalizeTooltip: z, mergeSettings: y, effectiveProps: k, breakpoints: p, resolveColumn: C, currentColumn: b, effectiveData: j, visibleSchema: N, normalizedRows: x, renderedRows: q, showCollapseButton: A, showHeader: P, collapseButtonText: f, bodyStyle: L, getItemStyle: M, getLabelStyle: T, getContentStyle: K, getItemValue: U, syncSchema: H, syncData: Q, setProps: G, setData: ee, getData: J, descriptionAction: te, updateWindowWidth: ne };
1518
+ }), U(() => S.value.schema, H, { deep: !0 }), U(() => S.value.data, Y, { deep: !0 }), U(() => {
1519
+ var b;
1520
+ return (b = S.value.collapseOptions) == null ? void 0 : b.defaultExpand;
1521
+ }, (b) => {
1522
+ b !== void 0 && (u.value = b);
1523
+ }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: v, expanded: u, DescriptionValueRenderer: P, normalizeTooltip: $, mergeSettings: m, effectiveProps: S, breakpoints: p, resolveColumn: x, currentColumn: g, effectiveData: V, visibleSchema: O, normalizedRows: y, renderedRows: q, showCollapseButton: A, showHeader: F, collapseButtonText: f, bodyStyle: K, getItemStyle: M, getLabelStyle: D, getContentStyle: j, getItemValue: G, syncSchema: H, syncData: Y, setProps: X, setData: ee, getData: J, descriptionAction: te, updateWindowWidth: ne };
1524
1524
  }
1525
1525
  });
1526
1526
  var It = function() {
1527
1527
  var o;
1528
1528
  var e = this, n = e._self._c, t = e._self._setupProxy;
1529
- 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(s, r) {
1530
- return n("div", { key: r }, [e._v(e._s(s))]);
1531
- }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (o = t.effectiveProps.collapseOptions) != null && o.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(s, r) {
1532
- return n("div", { key: `collapse-${r}` }, [e._v(e._s(s))]);
1533
- }), 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(s) {
1529
+ 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(r, a) {
1530
+ return n("div", { key: a }, [e._v(e._s(r))]);
1531
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (o = t.effectiveProps.collapseOptions) != null && o.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(r, a) {
1532
+ return n("div", { key: `collapse-${a}` }, [e._v(e._s(r))]);
1533
+ }), 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(r) {
1534
1534
  t.expanded = !t.expanded;
1535
1535
  } } }, [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: [
1536
1536
  `is-${t.effectiveProps.size}`,
1537
1537
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1538
- ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(s, r) {
1539
- return [e._l(s.items, function(_) {
1540
- return [n("div", { key: `${r}-${_.dataIndex || _.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(_) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(_) }, [e._v(" " + e._s(_.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(_) }, [e.$scopedSlots[_.slot || _.dataIndex] ? e._t(_.slot || _.dataIndex, null, { value: t.getItemValue(_), record: t.effectiveData, schema: _ }) : n(t.DescriptionValueRenderer, { attrs: { schema: _, value: t.getItemValue(_), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1538
+ ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(r, a) {
1539
+ return [e._l(r.items, function(v) {
1540
+ return [n("div", { key: `${a}-${v.dataIndex || v.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(v) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(v) }, [e._v(" " + e._s(v.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(v) }, [e.$scopedSlots[v.slot || v.dataIndex] ? e._t(v.slot || v.dataIndex, null, { value: t.getItemValue(v), record: t.effectiveData, schema: v }) : n(t.DescriptionValueRenderer, { attrs: { schema: v, value: t.getItemValue(v), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1541
1541
  })];
1542
1542
  })], 2)]);
1543
- }, Vt = [], Et = /* @__PURE__ */ ae(
1543
+ }, Vt = [], Wt = /* @__PURE__ */ ae(
1544
1544
  Nt,
1545
1545
  It,
1546
1546
  Vt,
@@ -1550,38 +1550,113 @@ var It = function() {
1550
1550
  null,
1551
1551
  null
1552
1552
  );
1553
- const Ue = Et.exports;
1554
- function Qt(c) {
1555
- const e = D(null), n = () => c ? pe(c) : void 0, t = () => {
1556
- const r = pe(e);
1557
- if (!r)
1553
+ const Ue = Wt.exports;
1554
+ function on(c) {
1555
+ const e = z(null), n = () => c ? pe(c) : void 0, t = () => {
1556
+ const a = pe(e);
1557
+ if (!a)
1558
1558
  throw new Error("ProDescriptions instance has not been registered");
1559
- return r;
1560
- }, o = (r) => {
1561
- e.value = r;
1562
- const _ = n();
1563
- _ && Object.keys(_).length > 0 && r.setProps(_);
1559
+ return a;
1560
+ }, o = (a) => {
1561
+ e.value = a;
1562
+ const v = n();
1563
+ v && Object.keys(v).length > 0 && a.setProps(v);
1564
1564
  };
1565
- return c && Y(
1565
+ return c && U(
1566
1566
  () => n(),
1567
- (r) => {
1568
- r && e.value && e.value.setProps(r);
1567
+ (a) => {
1568
+ a && e.value && e.value.setProps(a);
1569
1569
  },
1570
1570
  { deep: !0 }
1571
1571
  ), [o, {
1572
- setProps: (r) => t().setProps(r),
1573
- setData: (r) => t().setData(r),
1572
+ setProps: (a) => t().setProps(a),
1573
+ setData: (a) => t().setData(a),
1574
1574
  getData: () => t().getData()
1575
1575
  }];
1576
1576
  }
1577
- const Lt = {
1577
+ const Kt = /* @__PURE__ */ oe({
1578
+ __name: "CollapseContainer",
1579
+ props: {
1580
+ title: null,
1581
+ loading: { type: Boolean, default: !1 },
1582
+ canExpan: { type: Boolean, default: !0 },
1583
+ canExpand: { type: Boolean, default: void 0 },
1584
+ helpMessage: null,
1585
+ triggerWindowResize: { type: Boolean, default: !0 },
1586
+ expanded: { type: Boolean, default: void 0 },
1587
+ defaultExpand: { type: Boolean, default: !0 },
1588
+ ghost: { type: Boolean, default: !1 },
1589
+ expandButtonText: { default: "展开" },
1590
+ collapseButtonText: { default: "收起" },
1591
+ wrapperProps: { default: () => ({}) },
1592
+ headerClass: { default: "" },
1593
+ headerStyle: { default: () => ({}) },
1594
+ contentClass: { default: "" },
1595
+ contentStyle: { default: () => ({}) }
1596
+ },
1597
+ emits: ["update:expanded", "change", "collapse", "expand"],
1598
+ setup(c, { expose: e, emit: n }) {
1599
+ const t = c, o = Fe(), { mergeSettings: r } = Be(), a = z(t.expanded ?? t.defaultExpand), v = C(() => r("CollapseContainer", { ...t })), u = C(() => v.value.canExpand ?? v.value.canExpan ?? !0), P = C(() => v.value.expanded !== void 0), $ = C(() => P.value ? !!v.value.expanded : a.value), m = C(() => !!o.title || !!o.action || !!v.value.title || !!v.value.helpMessage || u.value), S = C(() => u.value), p = C(() => {
1600
+ const y = v.value.wrapperProps ?? {}, q = y.class, A = y.style, F = { ...y };
1601
+ return delete F.class, delete F.style, {
1602
+ ...F,
1603
+ class: q,
1604
+ style: A
1605
+ };
1606
+ }), x = () => {
1607
+ !v.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1608
+ window.dispatchEvent(new Event("resize"));
1609
+ }, 220);
1610
+ }, g = (y) => {
1611
+ P.value || (a.value = y), n("update:expanded", y), n("change", y), n(y ? "expand" : "collapse"), x();
1612
+ }, V = () => {
1613
+ u.value && g(!$.value);
1614
+ }, O = () => {
1615
+ S.value && V();
1616
+ };
1617
+ return U(() => t.expanded, (y) => {
1618
+ y !== void 0 && (a.value = y);
1619
+ }), U(() => t.defaultExpand, (y) => {
1620
+ t.expanded === void 0 && (a.value = y);
1621
+ }), e({
1622
+ setExpanded: g,
1623
+ toggleExpand: V
1624
+ }), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: v, resolvedCanExpan: u, isControlled: P, mergedExpanded: $, showHeader: m, canToggleByHeader: S, wrapperProps: p, triggerWindowResize: x, setExpanded: g, toggleExpand: V, handleHeaderClick: O };
1625
+ }
1626
+ });
1627
+ var Lt = function() {
1628
+ var e = this, n = e._self._c, t = e._self._setupProxy;
1629
+ return n("div", e._b({ directives: [{ name: "loading", rawName: "v-loading", value: t.effectiveProps.loading, expression: "effectiveProps.loading" }], staticClass: "ecp-collapse-container", class: {
1630
+ "is-expanded": t.mergedExpanded,
1631
+ "is-ghost": t.effectiveProps.ghost,
1632
+ "is-header-clickable": t.canToggleByHeader
1633
+ } }, "div", t.wrapperProps, !1), [t.showHeader ? n("div", { staticClass: "ecp-collapse-container__header", class: t.effectiveProps.headerClass, style: t.effectiveProps.headerStyle }, [n("div", { staticClass: "ecp-collapse-container__header-main", on: { click: t.handleHeaderClick } }, [e.$slots.title || t.effectiveProps.title ? n("div", { staticClass: "ecp-collapse-container__title-wrap" }, [e._t("title", function() {
1634
+ return [n("span", { staticClass: "ecp-collapse-container__title" }, [e._v(e._s(t.effectiveProps.title))])];
1635
+ }), 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(o, r) {
1636
+ return n("div", { key: r }, [e._v(e._s(o))]);
1637
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-collapse-container__help" })], 2) : e._e()], 2) : e._e()]), e.$slots.action || t.resolvedCanExpan ? n("div", { staticClass: "ecp-collapse-container__header-extra", on: { click: function(o) {
1638
+ o.stopPropagation();
1639
+ } } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(o) {
1640
+ return o.stopPropagation(), t.toggleExpand.apply(null, arguments);
1641
+ } } }, [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);
1642
+ }, jt = [], qt = /* @__PURE__ */ ae(
1643
+ Kt,
1644
+ Lt,
1645
+ jt,
1646
+ !1,
1647
+ null,
1648
+ "087dba3a",
1649
+ null,
1650
+ null
1651
+ );
1652
+ const Ge = qt.exports, Ht = {
1578
1653
  name: "ProTableForm",
1579
1654
  model: {
1580
1655
  prop: "modelValue",
1581
1656
  event: "update:modelValue"
1582
1657
  }
1583
- }, Wt = /* @__PURE__ */ le({
1584
- ...Lt,
1658
+ }, Jt = /* @__PURE__ */ oe({
1659
+ ...Ht,
1585
1660
  props: {
1586
1661
  modelValue: { default: () => ({}) },
1587
1662
  columns: null,
@@ -1604,7 +1679,7 @@ const Lt = {
1604
1679
  },
1605
1680
  emits: ["update:modelValue"],
1606
1681
  setup(c, { expose: e, emit: n }) {
1607
- const t = c, o = D(null), s = () => t.competitorsKey ?? "competitors", r = () => t.competitorNameKey ?? "name", _ = S(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), u = S(() => "left"), g = S(() => {
1682
+ const t = c, o = z(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", v = C(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), u = C(() => "left"), P = C(() => {
1608
1683
  const i = t.actionColumn;
1609
1684
  return {
1610
1685
  width: (i == null ? void 0 : i.width) ?? t.actionWidth,
@@ -1613,180 +1688,180 @@ const Lt = {
1613
1688
  fixed: (i == null ? void 0 : i.fixed) === void 0 ? "right" : i.fixed
1614
1689
  };
1615
1690
  });
1616
- function z(i) {
1691
+ function $(i) {
1617
1692
  return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
1618
1693
  }
1619
- const y = S(() => {
1694
+ const m = C(() => {
1620
1695
  const i = [];
1621
- t.fixedRows.forEach((W) => {
1696
+ t.fixedRows.forEach((L) => {
1622
1697
  i.push({
1623
1698
  _type: "fixed",
1624
- rowKey: W.rowKey,
1625
- rowLabel: W.label
1699
+ rowKey: L.rowKey,
1700
+ rowLabel: L.label
1626
1701
  });
1627
1702
  });
1628
- const m = t.modelValue;
1629
- return ((m && typeof m == "object" ? m[s()] : void 0) ?? []).forEach((W, O) => {
1630
- i.push({ _type: "competitor", _index: O });
1703
+ const h = t.modelValue;
1704
+ return ((h && typeof h == "object" ? h[r()] : void 0) ?? []).forEach((L, E) => {
1705
+ i.push({ _type: "competitor", _index: E });
1631
1706
  }), i;
1632
- }), k = S(() => {
1707
+ }), S = C(() => {
1633
1708
  const i = t.modelValue;
1634
- return ((i && typeof i == "object" ? i[s()] : void 0) ?? []).length > t.minCompetitors;
1709
+ return ((i && typeof i == "object" ? i[r()] : void 0) ?? []).length > t.minCompetitors;
1635
1710
  });
1636
1711
  function p() {
1637
1712
  const i = t.modelValue;
1638
1713
  return !i || typeof i != "object" ? {} : JSON.parse(JSON.stringify(i));
1639
1714
  }
1640
- function C(i) {
1641
- const m = t.modelValue;
1642
- if (!m || typeof m != "object") {
1643
- const O = {};
1644
- for (const X of t.columns)
1645
- O[X.key] = "";
1646
- return O;
1715
+ function x(i) {
1716
+ const h = t.modelValue;
1717
+ if (!h || typeof h != "object") {
1718
+ const E = {};
1719
+ for (const Z of t.columns)
1720
+ E[Z.key] = "";
1721
+ return E;
1647
1722
  }
1648
- const B = m[i];
1649
- if (B && typeof B == "object" && !Array.isArray(B))
1650
- return B;
1651
- const W = {};
1652
- for (const O of t.columns)
1653
- W[O.key] = "";
1654
- return W;
1723
+ const R = h[i];
1724
+ if (R && typeof R == "object" && !Array.isArray(R))
1725
+ return R;
1726
+ const L = {};
1727
+ for (const E of t.columns)
1728
+ L[E.key] = "";
1729
+ return L;
1655
1730
  }
1656
- function b(i) {
1731
+ function g(i) {
1657
1732
  n("update:modelValue", i);
1658
1733
  }
1659
- function j(i, m) {
1660
- return C(i)[m] ?? "";
1734
+ function V(i, h) {
1735
+ return x(i)[h] ?? "";
1661
1736
  }
1662
- function N(i, m, B) {
1663
- const W = p(), O = { ...W[i] || {} };
1664
- O[m] = B, W[i] = O, b(W);
1737
+ function O(i, h, R) {
1738
+ const L = p(), E = { ...L[i] || {} };
1739
+ E[h] = R, L[i] = E, g(L);
1665
1740
  }
1666
- function x() {
1741
+ function y() {
1667
1742
  const i = t.modelValue;
1668
1743
  if (!i || typeof i != "object")
1669
1744
  return [];
1670
- const m = i[s()];
1671
- return Array.isArray(m) ? m : [];
1745
+ const h = i[r()];
1746
+ return Array.isArray(h) ? h : [];
1672
1747
  }
1673
1748
  function q(i) {
1674
- const m = x()[i], B = r();
1675
- return m ? String(m[B] ?? "") : "";
1749
+ const h = y()[i], R = a();
1750
+ return h ? String(h[R] ?? "") : "";
1676
1751
  }
1677
- function A(i, m) {
1678
- const B = p(), W = [...x()], O = { ...W[i] || {} };
1679
- O[r()] = m, W[i] = O, B[s()] = W, b(B);
1752
+ function A(i, h) {
1753
+ const R = p(), L = [...y()], E = { ...L[i] || {} };
1754
+ E[a()] = h, L[i] = E, R[r()] = L, g(R);
1680
1755
  }
1681
- function P(i, m) {
1682
- const B = x()[i];
1683
- return B ? B[m] ?? "" : "";
1756
+ function F(i, h) {
1757
+ const R = y()[i];
1758
+ return R ? R[h] ?? "" : "";
1684
1759
  }
1685
- function f(i, m, B) {
1686
- const W = p(), O = [...x()], X = { ...O[i] || {} };
1687
- X[m] = B, O[i] = X, W[s()] = O, b(W);
1760
+ function f(i, h, R) {
1761
+ const L = p(), E = [...y()], Z = { ...E[i] || {} };
1762
+ Z[h] = R, E[i] = Z, L[r()] = E, g(L);
1688
1763
  }
1689
- function L(i, m) {
1690
- return i._type === "fixed" ? j(i.rowKey, m.key) : P(i._index, m.key);
1764
+ function K(i, h) {
1765
+ return i._type === "fixed" ? V(i.rowKey, h.key) : F(i._index, h.key);
1691
1766
  }
1692
- function M(i, m, B) {
1693
- i._type === "fixed" ? N(i.rowKey, m.key, B) : f(i._index, m.key, B);
1767
+ function M(i, h, R) {
1768
+ i._type === "fixed" ? O(i.rowKey, h.key, R) : f(i._index, h.key, R);
1694
1769
  }
1695
- function T(i, m) {
1696
- return (B) => M(i.row, m, B);
1770
+ function D(i, h) {
1771
+ return (R) => M(i.row, h, R);
1697
1772
  }
1698
- function K() {
1699
- const i = { [r()]: "" };
1700
- for (const m of t.columns)
1701
- i[m.key] = "";
1773
+ function j() {
1774
+ const i = { [a()]: "" };
1775
+ for (const h of t.columns)
1776
+ i[h.key] = "";
1702
1777
  return i;
1703
1778
  }
1704
- function U() {
1705
- const i = p(), m = [...x()];
1706
- m.push(K()), i[s()] = m, b(i);
1779
+ function G() {
1780
+ const i = p(), h = [...y()];
1781
+ h.push(j()), i[r()] = h, g(i);
1707
1782
  }
1708
1783
  function H(i) {
1709
- if (!k.value)
1784
+ if (!S.value)
1710
1785
  return;
1711
- const m = p(), B = [...x()];
1712
- B.splice(i, 1), m[s()] = B, b(m);
1786
+ const h = p(), R = [...y()];
1787
+ R.splice(i, 1), h[r()] = R, g(h);
1713
1788
  }
1714
- function Q(i, m) {
1715
- return `${i}.${m}`;
1789
+ function Y(i, h) {
1790
+ return `${i}.${h}`;
1716
1791
  }
1717
- function G(i) {
1718
- return `${s()}.${i}.${r()}`;
1792
+ function X(i) {
1793
+ return `${r()}.${i}.${a()}`;
1719
1794
  }
1720
- function ee(i, m) {
1721
- return `${s()}.${i}.${m}`;
1795
+ function ee(i, h) {
1796
+ return `${r()}.${i}.${h}`;
1722
1797
  }
1723
1798
  function J(i) {
1724
- return i.component === "formatted-number" ? ke : "el-input";
1799
+ return i.component === "formatted-number" ? Re : "el-input";
1725
1800
  }
1726
1801
  function te(i) {
1727
- const m = i.componentProps || {};
1802
+ const h = i.componentProps || {};
1728
1803
  return i.component === "formatted-number" ? {
1729
1804
  integerDigits: 5,
1730
1805
  decimalPlaces: 6,
1731
1806
  rounding: "round",
1732
1807
  inputLimit: !0,
1733
- ...m
1734
- } : { ...m };
1808
+ ...h
1809
+ } : { ...h };
1735
1810
  }
1736
1811
  function ne(i) {
1737
- const m = i.row;
1738
- if (m._type === "fixed")
1812
+ const h = i.row;
1813
+ if (h._type === "fixed")
1739
1814
  return {
1740
- row: m,
1815
+ row: h,
1741
1816
  rowType: "fixed",
1742
- rowKey: m.rowKey,
1743
- rowLabel: m.rowLabel
1817
+ rowKey: h.rowKey,
1818
+ rowLabel: h.rowLabel
1744
1819
  };
1745
- const B = m._index;
1820
+ const R = h._index;
1746
1821
  return {
1747
- row: m,
1822
+ row: h,
1748
1823
  rowType: "competitor",
1749
- rowIndex: B,
1750
- value: q(B),
1751
- updateValue: (W) => A(B, W)
1824
+ rowIndex: R,
1825
+ value: q(R),
1826
+ updateValue: (L) => A(R, L)
1752
1827
  };
1753
1828
  }
1754
- const h = S(() => {
1755
- const i = {}, m = (W) => [{ required: !0, message: `请输入${W}`, trigger: "blur" }];
1756
- for (const W of t.fixedRows)
1757
- for (const O of t.columns)
1758
- O.rules ? i[`${W.rowKey}.${O.key}`] = O.rules : O.required && (i[`${W.rowKey}.${O.key}`] = m(O.title));
1759
- return x().forEach((W, O) => {
1760
- i[`${s()}.${O}.${r()}`] = m("友商名称");
1761
- for (const X of t.columns)
1762
- X.rules ? i[`${s()}.${O}.${X.key}`] = X.rules : X.required && (i[`${s()}.${O}.${X.key}`] = m(X.title));
1829
+ const b = C(() => {
1830
+ const i = {}, h = (L) => [{ required: !0, message: `请输入${L}`, trigger: "blur" }];
1831
+ for (const L of t.fixedRows)
1832
+ for (const E of t.columns)
1833
+ E.rules ? i[`${L.rowKey}.${E.key}`] = E.rules : E.required && (i[`${L.rowKey}.${E.key}`] = h(E.title));
1834
+ return y().forEach((L, E) => {
1835
+ i[`${r()}.${E}.${a()}`] = h("友商名称");
1836
+ for (const Z of t.columns)
1837
+ Z.rules ? i[`${r()}.${E}.${Z.key}`] = Z.rules : Z.required && (i[`${r()}.${E}.${Z.key}`] = h(Z.title));
1763
1838
  }), { ...i, ...t.rules || {} };
1764
1839
  });
1765
- function I() {
1840
+ function N() {
1766
1841
  return new Promise((i) => {
1767
- const m = o.value;
1768
- if (!m || typeof m.validate != "function") {
1842
+ const h = o.value;
1843
+ if (!h || typeof h.validate != "function") {
1769
1844
  i(!0);
1770
1845
  return;
1771
1846
  }
1772
- m.validate((B) => {
1773
- i(B);
1847
+ h.validate((R) => {
1848
+ i(R);
1774
1849
  });
1775
1850
  });
1776
1851
  }
1777
- function $(i) {
1778
- var m, B;
1779
- (B = (m = o.value) == null ? void 0 : m.clearValidate) == null || B.call(m, i);
1852
+ function T(i) {
1853
+ var h, R;
1854
+ (R = (h = o.value) == null ? void 0 : h.clearValidate) == null || R.call(h, i);
1780
1855
  }
1781
1856
  return e({
1782
- validate: I,
1783
- clearValidate: $,
1784
- addCompetitor: U,
1857
+ validate: N,
1858
+ clearValidate: T,
1859
+ addCompetitor: G,
1785
1860
  removeCompetitor: H
1786
- }), { __sfc: !0, props: t, emit: n, formRef: o, ck: s, nk: r, showFirstColumnComputed: _, firstColumnFixed: u, actionColumnBind: g, rowKeyFn: z, tableRows: y, canDeleteCompetitor: k, cloneModel: p, ensureFixedBlock: C, emitNext: b, getFixedMetric: j, setFixedMetric: N, competitorList: x, getCompetitorName: q, setCompetitorName: A, getCompetitorMetric: P, setCompetitorMetric: f, getCellValue: L, setCellValue: M, slotUpdateHandler: T, emptyCompetitorRow: K, addCompetitor: U, removeCompetitor: H, fixedMetricProp: Q, competitorNameProp: G, competitorMetricProp: ee, cellComponent: J, cellBind: te, firstColumnScope: ne, mergedRules: h, validate: I, clearValidate: $ };
1861
+ }), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: v, firstColumnFixed: u, actionColumnBind: P, rowKeyFn: $, tableRows: m, canDeleteCompetitor: S, cloneModel: p, ensureFixedBlock: x, emitNext: g, getFixedMetric: V, setFixedMetric: O, competitorList: y, getCompetitorName: q, setCompetitorName: A, getCompetitorMetric: F, setCompetitorMetric: f, getCellValue: K, setCellValue: M, slotUpdateHandler: D, emptyCompetitorRow: j, addCompetitor: G, removeCompetitor: H, fixedMetricProp: Y, competitorNameProp: X, competitorMetricProp: ee, cellComponent: J, cellBind: te, firstColumnScope: ne, mergedRules: b, validate: N, clearValidate: T };
1787
1862
  }
1788
1863
  });
1789
- var Kt = function() {
1864
+ var Ut = function() {
1790
1865
  var e = this, n = e._self._c, t = e._self._setupProxy;
1791
1866
  return n("div", { staticClass: "ecp-pro-table-form" }, [n("el-form", { ref: "formRef", staticClass: "ecp-pro-table-form__form", attrs: { model: e.modelValue, rules: t.mergedRules, "label-width": e.labelWidth } }, [n("el-table", { staticClass: "ecp-pro-table-form__table", attrs: { data: t.tableRows, border: e.bordered, "row-key": t.rowKeyFn, "header-cell-class-name": "ecp-pro-table-form__header-cell" } }, [t.showFirstColumnComputed ? n("el-table-column", { attrs: { "min-width": e.firstColMinWidth, fixed: t.firstColumnFixed }, scopedSlots: e._u([{ key: "header", fn: function() {
1792
1867
  return [e._t("firstColumnHeader", function() {
@@ -1794,8 +1869,8 @@ var Kt = function() {
1794
1869
  })];
1795
1870
  }, proxy: !0 }, { key: "default", fn: function(o) {
1796
1871
  return [e._t("firstColumn", function() {
1797
- return [o.row._type === "fixed" ? [n("span", { staticClass: "ecp-pro-table-form__fixed-label" }, [e._v(e._s(o.row.rowLabel))])] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorNameProp(o.row._index) } }, [n("el-input", { attrs: { value: t.getCompetitorName(o.row._index), placeholder: e.competitorNamePlaceholder }, on: { input: function(s) {
1798
- return t.setCompetitorName(o.row._index, s);
1872
+ return [o.row._type === "fixed" ? [n("span", { staticClass: "ecp-pro-table-form__fixed-label" }, [e._v(e._s(o.row.rowLabel))])] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorNameProp(o.row._index) } }, [n("el-input", { attrs: { value: t.getCompetitorName(o.row._index), placeholder: e.competitorNamePlaceholder }, on: { input: function(r) {
1873
+ return t.setCompetitorName(o.row._index, r);
1799
1874
  } } })], 1)];
1800
1875
  }, null, t.firstColumnScope(o))];
1801
1876
  } }], null, !0) }) : e._e(), e._l(e.columns, function(o) {
@@ -1803,11 +1878,11 @@ var Kt = function() {
1803
1878
  return [e._t("header-" + o.key, function() {
1804
1879
  return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [o.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(o.title) + " ")])];
1805
1880
  }, { column: o })];
1806
- }, proxy: !0 }, { key: "default", fn: function(s) {
1807
- return [o.component === "slot" && o.slotName ? [s.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(s.row.rowKey, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: s.row, value: t.getCellValue(s.row, o), updateValue: t.slotUpdateHandler(s, o) })], 2) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(s.row._index, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: s.row, value: t.getCellValue(s.row, o), updateValue: t.slotUpdateHandler(s, o) })], 2)] : [s.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(s.row.rowKey, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getFixedMetric(s.row.rowKey, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(r) {
1808
- return t.setFixedMetric(s.row.rowKey, o.key, r);
1809
- } } }, "component", t.cellBind(o), !1))], 1) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(s.row._index, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getCompetitorMetric(s.row._index, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(r) {
1810
- return t.setCompetitorMetric(s.row._index, o.key, r);
1881
+ }, proxy: !0 }, { key: "default", fn: function(r) {
1882
+ return [o.component === "slot" && o.slotName ? [r.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(r.row.rowKey, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: r.row, value: t.getCellValue(r.row, o), updateValue: t.slotUpdateHandler(r, o) })], 2) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(r.row._index, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: r.row, value: t.getCellValue(r.row, o), updateValue: t.slotUpdateHandler(r, o) })], 2)] : [r.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(r.row.rowKey, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getFixedMetric(r.row.rowKey, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(a) {
1883
+ return t.setFixedMetric(r.row.rowKey, o.key, a);
1884
+ } } }, "component", t.cellBind(o), !1))], 1) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(r.row._index, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getCompetitorMetric(r.row._index, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(a) {
1885
+ return t.setCompetitorMetric(r.row._index, o.key, a);
1811
1886
  } } }, "component", t.cellBind(o), !1))], 1)]];
1812
1887
  } }], null, !0) });
1813
1888
  }), e.showActionColumn ? n("el-table-column", e._b({ scopedSlots: e._u([{ key: "header", fn: function() {
@@ -1817,68 +1892,71 @@ var Kt = function() {
1817
1892
  })];
1818
1893
  }, proxy: !0 }, { key: "default", fn: function(o) {
1819
1894
  return [e._t("action", function() {
1820
- return [o.row._type === "competitor" ? n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: !t.canDeleteCompetitor }, on: { click: function(s) {
1895
+ return [o.row._type === "competitor" ? n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: !t.canDeleteCompetitor }, on: { click: function(r) {
1821
1896
  return t.removeCompetitor(o.row._index);
1822
1897
  } } }, [e._v(" 删除 ")]) : n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: "" } }, [e._v(" 删除 ")])];
1823
1898
  }, { row: o.row, canDelete: t.canDeleteCompetitor, addCompetitor: t.addCompetitor, removeCompetitor: t.removeCompetitor })];
1824
1899
  } }], null, !0) }, "el-table-column", t.actionColumnBind, !1)) : e._e()], 2)], 1)], 1);
1825
- }, jt = [], qt = /* @__PURE__ */ ae(
1826
- Wt,
1827
- Kt,
1828
- jt,
1900
+ }, Gt = [], Xt = /* @__PURE__ */ ae(
1901
+ Jt,
1902
+ Ut,
1903
+ Gt,
1829
1904
  !1,
1830
1905
  null,
1831
1906
  "44aa7592",
1832
1907
  null,
1833
1908
  null
1834
1909
  );
1835
- const Ge = qt.exports, Ht = [
1836
- { name: "ProTable", component: Ke },
1910
+ const Xe = Xt.exports, Zt = [
1911
+ { name: "ProTable", component: Le },
1837
1912
  { name: "TableAction", component: je },
1838
1913
  { name: "ProForm", component: Je },
1839
1914
  { name: "ProFormItem", component: qe },
1840
1915
  { name: "FormActions", component: He },
1841
- { name: "FormattedNumberInput", component: ke },
1916
+ { name: "FormattedNumberInput", component: Re },
1842
1917
  { name: "ProDescriptions", component: Ue },
1843
- { name: "ProTableForm", component: Ge }
1918
+ { name: "CollapseContainer", component: Ge },
1919
+ { name: "ProTableForm", component: Xe }
1844
1920
  ];
1845
- function Jt(c) {
1846
- Ht.forEach(({ name: e, component: n }) => {
1921
+ function Qt(c) {
1922
+ Zt.forEach(({ name: e, component: n }) => {
1847
1923
  c.component(e, n);
1848
1924
  });
1849
1925
  }
1850
- const Yt = {
1851
- install: Jt,
1852
- ProTable: Ke,
1926
+ const ln = {
1927
+ install: Qt,
1928
+ ProTable: Le,
1853
1929
  ProForm: Je,
1854
1930
  ProDescriptions: Ue,
1931
+ CollapseContainer: Ge,
1855
1932
  TableAction: je,
1856
- FormattedNumberInput: ke,
1857
- ProTableForm: Ge
1933
+ FormattedNumberInput: Re,
1934
+ ProTableForm: Xe
1858
1935
  };
1859
1936
  export {
1937
+ Ge as CollapseContainer,
1860
1938
  He as FormActions,
1861
- ke as FormattedNumberInput,
1939
+ Re as FormattedNumberInput,
1862
1940
  Ue as ProDescriptions,
1863
1941
  Je as ProForm,
1864
1942
  qe as ProFormItem,
1865
- Ke as ProTable,
1866
- Ge as ProTableForm,
1943
+ Le as ProTable,
1944
+ Xe as ProTableForm,
1867
1945
  je as TableAction,
1868
- dt as applyNumericInputDigitLimits,
1869
- Ee as clampByIntegerDigits,
1870
- Yt as default,
1871
- Le as formatWithThousands,
1872
- Jt as install,
1946
+ ft as applyNumericInputDigitLimits,
1947
+ Ve as clampByIntegerDigits,
1948
+ ln as default,
1949
+ We as formatWithThousands,
1950
+ Qt as install,
1873
1951
  Se as normalizeNumericValue,
1874
- vt as numberToEditString,
1875
- pt as roundToDecimals,
1876
- Ve as sanitizeNumericInput,
1877
- Be as stripNumberGrouping,
1878
- mt as toFixedDecimalString,
1879
- $e as useComponentSetting,
1880
- Qt as useDescription,
1881
- Zt as useForm,
1882
- Xt as useProTable
1952
+ ht as numberToEditString,
1953
+ mt as roundToDecimals,
1954
+ Ie as sanitizeNumericInput,
1955
+ Ae as stripNumberGrouping,
1956
+ vt as toFixedDecimalString,
1957
+ Be as useComponentSetting,
1958
+ on as useDescription,
1959
+ nn as useForm,
1960
+ tn as useProTable
1883
1961
  };
1884
1962
  //# sourceMappingURL=element-component-pro.es.js.map