@aspire-ui/element-component-pro 1.0.15 → 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 P, onMounted as me, nextTick as Ke, 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
- Ne(o) ? Ne(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 Ne(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;
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
120
  const I = { ...l.column };
121
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(), h = D(), u = D(), C = D(0), N = D(t.loading ?? !1), y = D([]), k = D({}), p = D([]), x = D({}), b = D([]), j = D(null), { mergeSettings: V } = $e(), f = P(() => V("ProTable", { ...t, ...x.value })), M = P(() => {
125
- const l = f.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
- }), R = D({
130
+ }), A = z({
131
131
  page: 1,
132
- pageSize: M.value.pageSize,
133
- pageSizes: M.value.pageSizes,
132
+ pageSize: q.value.pageSize,
133
+ pageSizes: q.value.pageSizes,
134
134
  total: 0
135
- }), q = P(() => !!f.value.title || !!r.tableTitle || !!r.toolbar), w = P(() => j.value !== null ? j.value : !!t.pagination && typeof t.pagination == "object"), K = P(() => f.value.pagination && typeof f.value.pagination == "object" ? !!f.value.pagination.small : !1), A = P(() => f.value.pagination && typeof f.value.pagination == "object" ? !!f.value.pagination.background : !1), T = P(() => f.value.rowKey || "id"), L = P(() => new Set(b.value.map((l) => l[T.value]))), U = P(
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 = P(() => {
138
- var a, v;
137
+ ), H = C(() => {
138
+ var s, _;
139
139
  let l = 0;
140
- return f.value.rowSelection && (l += Number(f.value.rowSelection.width) || 48), f.value.showIndexColumn && (l += Number((a = f.value.indexColumnProps) == null ? void 0 : a.width) || 60), f.value.actionColumn && (l += Number((v = f.value.actionColumn) == null ? void 0 : v.width) || 150), l;
141
- }), Q = (l) => typeof l == "number" && l > 0, G = P(() => U.value.filter((a) => ne(a) && Q(a.width)).reduce((a, v) => a + (typeof v.width == "number" ? v.width : 0), 0)), ee = P(() => 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 && C.value > 0 && typeof a == "number") {
144
- const v = C.value - H.value - ee.value;
145
- let F = Math.floor(v * a / G.value);
146
- const E = J(l.minWidth) ?? 60, I = J(l.maxWidth);
147
- return F = Math.max(E, F), I != null && (F = Math.min(I, 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 I = v;
152
- return F != null && (I = Math.max(F, I)), E != null && (I = Math.min(E, I)), I;
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, _ = P(() => {
156
- var a;
157
- const l = (a = f.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
- }), O = P(() => _.value.length > 0), $ = P(() => _.value.length === 0 ? !1 : _.value.every((l) => L.value.has(l[T.value]))), i = P(() => {
163
- const l = _.value.filter((a) => L.value.has(a[T.value])).length;
164
- return l > 0 && l < _.value.length;
165
- }), m = (l) => L.value.has(l[T.value]), B = (l) => {
166
- var a, v, F;
167
- return ((F = (v = (a = f.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 = f.value.rowSelection) == null ? void 0 : a.getRadioProps) == null ? void 0 : v.call(a, l)) == null ? void 0 : F.disabled) ?? !1;
171
- }, z = () => {
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), z();
177
- }, se = (l) => {
178
- b.value = [l], z();
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 = _.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
- z();
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
- N.value = !0;
195
+ $.value = !0;
196
196
  try {
197
- const a = f.value.fetchSetting ?? {}, v = a.pageField ?? "page", F = a.sizeField ?? "pageSize", E = a.listField ?? "list", I = a.totalField ?? "total", Z = {
198
- [v]: (l == null ? void 0 : l.page) ?? R.value.page,
199
- [F]: (l == null ? void 0 : l.pageSize) ?? R.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
- (l == null ? void 0 : l.page) != null && (R.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (R.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[I] ?? 0;
207
- y.value = De, R.value.total = ze, n("fetch-success", { items: De, total: ze });
208
- } catch (a) {
209
- n("fetch-error", a);
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 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
- N.value = !1;
211
+ $.value = !1;
212
212
  }
213
- }, _e = () => re(void 0), be = (l) => {
214
- f.value.clearSelectOnPageChange && (b.value = []), R.value.pageSize = l, R.value.page = 1, re(void 0);
215
- }, ge = (l) => {
216
- f.value.clearSelectOnPageChange && (b.value = []), R.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
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 = h.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
- N.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((I) => (I.key ?? I.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
- l != null && l.page && (R.value.page = l.page), l != null && l.pageSize && (R.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (R.value.total = l.total);
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 = [], z();
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, z();
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), z();
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
- getPaginationRef: () => w.value ? { page: R.value.page, pageSize: Number(R.value.pageSize) || 10, total: R.value.total } : !1,
276
- getShowPagination: () => w.value,
275
+ getPaginationRef: () => f.value ? { page: A.value.page, pageSize: Number(A.value.pageSize) || 10, total: A.value.total } : !1,
276
+ getShowPagination: () => f.value,
277
277
  setShowPagination: (l) => {
278
- j.value = l;
278
+ V.value = l;
279
279
  },
280
- getRowSelection: () => f.value.rowSelection,
280
+ getRowSelection: () => y.value.rowSelection,
281
281
  expandAll: () => {
282
- var F;
283
- const l = ((F = f.value.treeProps) == null ? void 0 : F.children) ?? "children", a = (E) => {
282
+ var k;
283
+ const l = ((k = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
284
284
  const I = [];
285
- return E.forEach((Z) => {
286
- I.push(Z);
287
- const oe = Z[l];
288
- Array.isArray(oe) && oe.length > 0 && I.push(...a(oe));
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
289
  }), I;
290
290
  };
291
- a(y.value).forEach((E) => {
292
- var I, Z;
293
- return (Z = (I = h.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Z.call(I, 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 = f.value.treeProps) == null ? void 0 : F.children) ?? "children", a = (E) => {
297
+ var k;
298
+ const l = ((k = y.value.treeProps) == null ? void 0 : k.children) ?? "children", s = (W) => {
299
299
  const I = [];
300
- return E.forEach((Z) => {
301
- I.push(Z);
302
- const oe = Z[l];
303
- Array.isArray(oe) && oe.length > 0 && I.push(...a(oe));
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
304
  }), I;
305
305
  };
306
- a(y.value).forEach((E) => {
307
- var I, Z;
308
- return (Z = (I = h.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : Z.call(I, 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,99 +313,99 @@ const Qe = /* @__PURE__ */ le({
313
313
  const ce = () => {
314
314
  p.value = [...t.columns ?? []];
315
315
  }, de = () => {
316
- t.api && f.value.immediate !== !1 ? re(void 0) : t.dataSource && (y.value = [...t.dataSource], !t.api && t.pagination !== !1 && (R.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 && (C.value = u.value.offsetWidth || 0);
318
+ u.value && (P.value = u.value.offsetWidth || 0);
319
319
  };
320
- let g = null, S = null;
320
+ let w = null, B = null;
321
321
  return me(() => {
322
- ce(), n("register", ie), de(), typeof window < "u" && (window.addEventListener("resize", d), g = new ResizeObserver(d), Ke(() => {
323
- d(), S = u.value, S && (g == null || g.observe(S));
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), g && S && (g.unobserve(S), S = 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
- N.value = l ?? !1;
331
- }), { __sfc: !0, DefaultCellRenderer: o, BodyCellRenderer: s, props: t, emit: n, slots: r, tableRef: h, tableWrapRef: u, containerWidth: C, loading: N, innerData: y, rawDataSource: k, innerColumns: p, innerProps: x, selectedRows: b, showPaginationRef: j, mergeSettings: V, effectiveProps: f, defaultPagination: M, pagination: R, showTitleBar: q, showPagination: w, paginationSmall: K, paginationBackground: A, rowKeyField: T, selectedKeysSet: L, displayColumns: U, fixedColumnsWidth: H, isRatioWidth: Q, totalRatio: G, fixedDataColumnsWidth: ee, parseWidthPx: J, getColumnWidth: te, shouldShowColumn: ne, selectableRows: _, hasSelectableRows: O, isAllCurrentPageSelected: $, isIndeterminate: i, isRowSelected: m, getCheckboxDisabled: B, getRadioDisabled: W, emitSelectionChange: z, 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: g, observedEl: S };
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, h) {
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 C;
338
- if (r ? (C = 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 = C) : o && (C = h ? 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), C)
347
+ } : o), P)
348
348
  if (u.functional) {
349
- u._injectStyles = C;
350
- var N = u.render;
349
+ u._injectStyles = P;
350
+ var $ = u.render;
351
351
  u.render = function(p, x) {
352
- return C.call(x), N(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, C) : [C];
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, h;
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, C) {
367
- return n("div", { key: C }, [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 C;
375
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(u.row), disabled: t.getCheckboxDisabled(u.row) }, on: { change: (N) => t.handleCheckboxChange(u.row, N) }, nativeOn: { click: function(N) {
376
- N.stopPropagation();
377
- } } }) : n("el-radio", { attrs: { value: (C = t.selectedRows[0]) == null ? void 0 : C[t.rowKeyField], label: u.row[t.rowKeyField], disabled: t.getRadioDisabled(u.row) }, on: { change: function(N) {
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(N) {
380
- N.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: ((h = t.effectiveProps.indexColumnProps) == null ? void 0 : h.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(C) {
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(N, y) {
385
- return n("div", { key: y }, [e._v(e._s(N))]);
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(C) {
388
- return [u.dataIndex && e.$scopedSlots[u.dataIndex] ? e._t(u.dataIndex, null, { row: C.row, column: u, index: C.$index, value: C.row[u.dataIndex] }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: u, record: C.row, index: C.$index, value: C.row[u.dataIndex], "custom-render": u.customRender, "value-enum": u.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: u, record: C.row, index: C.$index, value: C.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 Le = tt.exports, Oe = (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
411
  disabled: !Oe(e)
@@ -417,8 +417,8 @@ const Le = tt.exports, Oe = (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 = !Oe(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: () => [] },
@@ -427,123 +427,123 @@ const Le = tt.exports, Oe = (c) => Array.isArray(c) ? c.length > 0 : c != null &
427
427
  },
428
428
  setup(c) {
429
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: b } = x;
431
- return typeof b == "boolean" ? b : typeof b == "function" ? b(x) : !0;
432
- }), s = P(() => o(e.actions || [])), r = P(() => o(e.dropDownActions || [])), h = (p, x) => {
433
- var b;
434
- e.stopButtonPropagation && x.stopPropagation(), (b = p.onClick) == null || b.call(p, 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
435
  }, u = (p, x) => {
436
- h(p, x);
437
- }, C = (p, x, b) => {
438
- var j, V, f, M;
439
- e.stopButtonPropagation && b.stopPropagation(), p.popConfirm && (x === "confirm" ? (V = (j = p.popConfirm).confirm) == null || V.call(j) : (M = (f = p.popConfirm).cancel) == null || M.call(f));
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: h, handleActionClick: u, handlePopConfirm: C, handlePopConfirmConfirm: (p, x) => {
442
- C(p, "confirm", x);
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
443
  }, handlePopConfirmCancel: (p, x) => {
444
- C(p, "cancel", x);
444
+ P(p, "cancel", x);
445
445
  }, handleDropdownCommand: (p) => {
446
- var j;
447
- const x = Number(p), b = r.value[x];
448
- if (!(!b || b.disabled)) {
449
- if (b.popConfirm) {
450
- const V = b.popConfirm.title, f = b.popConfirm.okText || "确定", M = b.popConfirm.cancelText || "取消";
451
- Ze.confirm(V, "提示", {
452
- confirmButtonText: f,
453
- cancelButtonText: M,
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
+ cancelButtonText: q,
454
454
  type: "warning"
455
455
  }).then(() => {
456
- var R, q;
457
- return (q = (R = b.popConfirm) == null ? void 0 : R.confirm) == null ? void 0 : q.call(R);
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 R, q;
460
- return (q = (R = b.popConfirm) == null ? void 0 : R.cancel) == null ? void 0 : q.call(R);
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 h = n();
504
- h && Object.keys(h).length > 0 && r.setProps(h);
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, h, u) => t().updateTableData(r, h, u),
529
- updateTableDataRecord: (r, h) => t().updateTableDataRecord(r, h),
530
- deleteTableDataRecord: (r) => t().deleteTableDataRecord(r),
531
- insertTableDataRecord: (r, h) => t().insertTableDataRecord(r, h),
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, h;
538
- return (h = (r = t()).expandAll) == null ? void 0 : h.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, h;
542
- return (h = (r = t()).collapseAll) == null ? void 0 : h.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,20 +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 = (u) => {
564
- n.lazy && u && (JSON.stringify(n.params ?? {}) !== s.value || o.value.length === 0) && h();
565
- }, h = 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 u = await n.api(n.params), C = Array.isArray(u) ? u : (u == null ? void 0 : u.list) ?? (u == null ? void 0 : u.data) ?? [], N = n.labelField ?? "label", y = n.valueField ?? "value";
570
- o.value = C.map((k) => {
571
- const p = k;
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;
572
574
  return {
573
- label: String(p[N] ?? p.label ?? ""),
574
- value: p[y] ?? p.value
575
+ label: String(V[p] ?? V.label ?? ""),
576
+ value: V[x] ?? V.value
575
577
  };
576
- }), s.value = JSON.stringify(n.params ?? {});
578
+ }), u.value = a(n.params ?? null);
577
579
  } finally {
578
580
  t.value = !1;
579
581
  }
@@ -581,22 +583,23 @@ const rt = /* @__PURE__ */ le({
581
583
  };
582
584
  return e({
583
585
  options: o,
586
+ rawOptions: r,
584
587
  loading: t,
585
- fetchOptions: h
588
+ fetchOptions: $
586
589
  }), me(() => {
587
- n.lazy || h();
588
- }), Y(
590
+ n.lazy || $();
591
+ }), U(
589
592
  () => n.api,
590
593
  () => {
591
- n.lazy ? o.value = [] : h();
594
+ n.lazy ? (o.value = [], r.value = []) : $();
592
595
  },
593
596
  { deep: !0 }
594
- ), Y(() => n.params, () => {
595
- n.lazy ? o.value = [] : h();
596
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, cachedParams: s, onVisibleChange: r, fetchOptions: h };
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: $ };
597
600
  }
598
601
  });
599
- var st = function() {
602
+ var it = function() {
600
603
  var e = this, n = e._self._c, t = e._self._setupProxy;
601
604
  return n("el-select", e._b({ on: { input: function(o) {
602
605
  return e.$emit("input", o);
@@ -605,18 +608,18 @@ var st = function() {
605
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) {
606
609
  return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
607
610
  }), 1);
608
- }, it = [], ct = /* @__PURE__ */ ae(
611
+ }, ct = [], ut = /* @__PURE__ */ ae(
609
612
  rt,
610
- st,
611
613
  it,
614
+ ct,
612
615
  !1,
613
616
  null,
614
617
  null,
615
618
  null,
616
619
  null
617
620
  );
618
- const ut = ct.exports;
619
- function Ve(c) {
621
+ const dt = ut.exports;
622
+ function Ie(c) {
620
623
  const e = c.trim();
621
624
  if (!e)
622
625
  return "";
@@ -624,47 +627,47 @@ function Ve(c) {
624
627
  e[0] === "-" && (t = "-", n = 1);
625
628
  let o = !1;
626
629
  for (; n < e.length; n++) {
627
- const s = e[n];
628
- if (s >= "0" && s <= "9") {
629
- t += s;
630
+ const r = e[n];
631
+ if (r >= "0" && r <= "9") {
632
+ t += r;
630
633
  continue;
631
634
  }
632
- s === "." && !o && (o = !0, (t === "" || t === "-") && (t += "0"), t += ".");
635
+ r === "." && !o && (o = !0, (t === "" || t === "-") && (t += "0"), t += ".");
633
636
  }
634
637
  return t;
635
638
  }
636
- function Be(c) {
639
+ function Ae(c) {
637
640
  return c.replace(/,/g, "").trim();
638
641
  }
639
- function dt(c, e, n) {
642
+ function ft(c, e, n) {
640
643
  if (!c || c === "-")
641
644
  return c;
642
645
  const t = c[0] === "-";
643
646
  let o = t ? c.slice(1) : c;
644
- const s = o.indexOf(".");
645
- if (s === -1) {
646
- const N = Math.max(0, e);
647
- return o = N > 0 ? o.slice(0, N) : 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;
648
651
  }
649
- let r = o.slice(0, s);
650
- e > 0 && (r = r.slice(0, e));
651
- const h = o.slice(s + 1), u = h === "" && 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(".");
652
655
  if (n <= 0)
653
- return t ? "-" + r : r;
656
+ return t ? "-" + a : a;
654
657
  if (u)
655
- return (t ? "-" : "") + r + ".";
656
- const C = h.slice(0, n);
657
- return (t ? "-" : "") + r + "." + C;
658
+ return (t ? "-" : "") + a + ".";
659
+ const P = v.slice(0, n);
660
+ return (t ? "-" : "") + a + "." + P;
658
661
  }
659
- function ft(c, e) {
662
+ function pt(c, e) {
660
663
  const n = Math.pow(10, c) - 1;
661
664
  return e <= 0 ? n : n + (1 - Math.pow(10, -e));
662
665
  }
663
- function Ee(c, e, n) {
664
- 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;
665
668
  return Math.abs(c) <= t ? c : o * t;
666
669
  }
667
- function pt(c, e, n) {
670
+ function mt(c, e, n) {
668
671
  if (e <= 0)
669
672
  switch (n) {
670
673
  case "floor":
@@ -675,39 +678,39 @@ function pt(c, e, n) {
675
678
  return Math.round(c);
676
679
  }
677
680
  const t = Math.pow(10, e), o = c * t;
678
- let s;
681
+ let r;
679
682
  switch (n) {
680
683
  case "floor":
681
- s = Math.floor(o);
684
+ r = Math.floor(o);
682
685
  break;
683
686
  case "ceil":
684
- s = Math.ceil(o);
687
+ r = Math.ceil(o);
685
688
  break;
686
689
  default:
687
- s = Math.round(o);
690
+ r = Math.round(o);
688
691
  }
689
- return s / t;
692
+ return r / t;
690
693
  }
691
694
  function Se(c, e, n, t) {
692
- let o = Ee(c, e, n);
693
- 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;
694
697
  }
695
- function mt(c, e) {
698
+ function vt(c, e) {
696
699
  return Number.isNaN(c) || !Number.isFinite(c) ? "" : c.toFixed(Math.max(0, e));
697
700
  }
698
701
  function We(c, e) {
699
702
  if (Number.isNaN(c) || !Number.isFinite(c))
700
703
  return "";
701
- const n = c.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [s, r] = o.split("."), h = s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
702
- return e <= 0 || r === void 0 ? (t ? "-" : "") + h : (t ? "-" : "") + h + "." + 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;
703
706
  }
704
- function vt(c, e) {
707
+ function ht(c, e) {
705
708
  if (Number.isNaN(c) || !Number.isFinite(c))
706
709
  return "";
707
710
  let n = c.toFixed(Math.max(0, e));
708
711
  return n = n.replace(/(\.\d*?)0+$/, "$1"), n = n.replace(/\.$/, ""), n;
709
712
  }
710
- const ht = /* @__PURE__ */ le({
713
+ const _t = /* @__PURE__ */ oe({
711
714
  __name: "FormattedNumberInput",
712
715
  props: {
713
716
  value: null,
@@ -720,85 +723,85 @@ const ht = /* @__PURE__ */ le({
720
723
  },
721
724
  emits: ["input"],
722
725
  setup(c, { emit: e }) {
723
- 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));
724
- function h(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) {
725
728
  if (p == null || p === "")
726
729
  return null;
727
730
  if (typeof p == "number")
728
731
  return Number.isFinite(p) ? p : null;
729
- const x = Be(String(p));
732
+ const x = Ae(String(p));
730
733
  if (x === "" || x === "-")
731
734
  return null;
732
- const b = Number(x);
733
- return Number.isFinite(b) ? b : null;
735
+ const g = Number(x);
736
+ return Number.isFinite(g) ? g : null;
734
737
  }
735
738
  function u() {
736
739
  if (t.value)
737
740
  return;
738
- const p = h(n.value);
741
+ const p = v(n.value);
739
742
  if (p === null) {
740
743
  o.value = "";
741
744
  return;
742
745
  }
743
746
  o.value = We(
744
- Se(p, s(), r(), n.rounding),
745
- r()
747
+ Se(p, r(), a(), n.rounding),
748
+ a()
746
749
  );
747
750
  }
748
- Y(
751
+ U(
749
752
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
750
753
  () => u(),
751
754
  { immediate: !0, deep: !0 }
752
755
  );
753
- function C(p) {
754
- e("input", mt(p, r()));
756
+ function P(p) {
757
+ e("input", vt(p, a()));
755
758
  }
756
- function N(p) {
757
- let x = Ve(p);
758
- if (n.inputLimit !== !1 && (x = dt(x, s(), r())), o.value = x, x === "" || x === "-")
759
+ function $(p) {
760
+ let x = Ie(p);
761
+ if (n.inputLimit !== !1 && (x = ft(x, r(), a())), o.value = x, x === "" || x === "-")
759
762
  return;
760
- const b = Number(x);
761
- if (!Number.isFinite(b))
763
+ const g = Number(x);
764
+ if (!Number.isFinite(g))
762
765
  return;
763
- const j = Se(b, s(), r(), n.rounding);
764
- C(j);
766
+ const V = Se(g, r(), a(), n.rounding);
767
+ P(V);
765
768
  }
766
- function y() {
769
+ function m() {
767
770
  t.value = !0;
768
- const p = Be(o.value), x = h(p === "" ? n.value : p);
771
+ const p = Ae(o.value), x = v(p === "" ? n.value : p);
769
772
  if (x === null) {
770
773
  o.value = "";
771
774
  return;
772
775
  }
773
- o.value = vt(
774
- Se(x, s(), r(), n.rounding),
775
- r()
776
+ o.value = ht(
777
+ Se(x, r(), a(), n.rounding),
778
+ a()
776
779
  );
777
780
  }
778
- function k() {
781
+ function S() {
779
782
  t.value = !1;
780
- const p = Be(o.value);
783
+ const p = Ae(o.value);
781
784
  if (p === "" || p === "-") {
782
785
  o.value = "", e("input", void 0);
783
786
  return;
784
787
  }
785
- const x = Number(Ve(p));
788
+ const x = Number(Ie(p));
786
789
  if (!Number.isFinite(x)) {
787
790
  o.value = "", e("input", void 0);
788
791
  return;
789
792
  }
790
- const b = Se(x, s(), r(), n.rounding);
791
- o.value = We(b, r()), C(b);
793
+ const g = Se(x, r(), a(), n.rounding);
794
+ o.value = We(g, a()), P(g);
792
795
  }
793
- return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: s, decM: r, parseExternalToNumber: h, syncDisplayFromValue: u, emitStoredValue: C, onInput: N, 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 };
794
797
  }
795
798
  });
796
- var _t = function() {
799
+ var gt = function() {
797
800
  var e = this, n = e._self._c, t = e._self._setupProxy;
798
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));
799
- }, bt = [], gt = /* @__PURE__ */ ae(
800
- ht,
802
+ }, bt = [], yt = /* @__PURE__ */ ae(
801
803
  _t,
804
+ gt,
802
805
  bt,
803
806
  !1,
804
807
  null,
@@ -806,7 +809,7 @@ var _t = function() {
806
809
  null,
807
810
  null
808
811
  );
809
- const ke = gt.exports, yt = /* @__PURE__ */ le({
812
+ const Re = yt.exports, wt = /* @__PURE__ */ oe({
810
813
  __name: "TreeSelect",
811
814
  props: {
812
815
  value: null,
@@ -824,106 +827,106 @@ const ke = gt.exports, yt = /* @__PURE__ */ le({
824
827
  },
825
828
  emits: ["input"],
826
829
  setup(c, { emit: e }) {
827
- const n = c, t = D(), o = D(), s = D(!1), r = D(!1), h = D(""), u = D([]), C = D({}), N = P(() => ({
830
+ const n = c, t = z(), o = z(), r = z(!1), a = z(!1), v = z(""), u = z([]), P = z({}), $ = C(() => ({
828
831
  label: n.labelField,
829
832
  children: n.childrenField
830
833
  }));
831
- function y(A) {
832
- const T = n.labelField ?? "label", L = n.valueField ?? "value", U = n.childrenField ?? "children", H = A[U], Q = {};
833
- return Q[n.labelField ?? "label"] = A[T] ?? A.label, Q[n.valueField ?? "value"] = A[L] ?? A.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;
834
837
  }
835
- function k(A, T = "") {
836
- const L = {}, U = n.labelField ?? "label", H = n.valueField ?? "value", Q = n.childrenField ?? "children";
837
- for (const G of A) {
838
- const ee = String(G[U] ?? G.label ?? ""), J = G[H] ?? G.value;
839
- J != null && (L[String(J)] = T ? T + " / " + ee : ee);
840
- const te = G[Q] ?? G.children;
841
- Array.isArray(te) && te.length && Object.assign(L, 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));
842
845
  }
843
- return L;
846
+ return j;
844
847
  }
845
848
  function p() {
846
- const A = n.treeData;
847
- return Array.isArray(A) && A.length > 0;
849
+ const M = n.treeData;
850
+ return Array.isArray(M) && M.length > 0;
848
851
  }
849
- function x(A) {
850
- u.value = A, C.value = k(A);
852
+ function x(M) {
853
+ u.value = M, P.value = S(M);
851
854
  }
852
- function b() {
853
- const A = n.treeData;
854
- if (!Array.isArray(A) || A.length === 0)
855
+ function g() {
856
+ const M = n.treeData;
857
+ if (!Array.isArray(M) || M.length === 0)
855
858
  return;
856
- const T = A.map((L) => y(L));
857
- x(T);
859
+ const D = M.map((j) => m(j));
860
+ x(D);
858
861
  }
859
- const j = P(() => n.value == null || n.value === "" ? "" : C.value[String(n.value)] ?? String(n.value)), V = (A, T) => {
860
- if (!A)
862
+ const V = C(() => n.value == null || n.value === "" ? "" : P.value[String(n.value)] ?? String(n.value)), O = (M, D) => {
863
+ if (!M)
861
864
  return !0;
862
- const L = n.labelField ?? "label";
863
- return String(T[L] ?? T.label ?? "").toLowerCase().includes(A.toLowerCase());
865
+ const j = n.labelField ?? "label";
866
+ return String(D[j] ?? D.label ?? "").toLowerCase().includes(M.toLowerCase());
864
867
  };
865
- Y(h, (A) => {
866
- var T;
867
- (T = o.value) == null || T.filter(A);
868
+ U(v, (M) => {
869
+ var D;
870
+ (D = o.value) == null || D.filter(M);
868
871
  });
869
- let f = null;
870
- function M() {
871
- n.disabled || (s.value = !0, n.lazy && !p() && K(), Ke(() => {
872
- f = (A) => {
873
- t.value && !t.value.contains(A.target) && R();
874
- }, document.addEventListener("click", f);
872
+ let y = null;
873
+ function q() {
874
+ n.disabled || (r.value = !0, n.lazy && !p() && K(), Ke(() => {
875
+ y = (M) => {
876
+ t.value && !t.value.contains(M.target) && A();
877
+ }, document.addEventListener("click", y);
875
878
  }));
876
879
  }
877
- function R() {
878
- s.value = !1, h.value = "", f && (document.removeEventListener("click", f), f = null);
880
+ function A() {
881
+ r.value = !1, v.value = "", y && (document.removeEventListener("click", y), y = null);
879
882
  }
880
- function q() {
883
+ function F() {
881
884
  e("input", void 0);
882
885
  }
883
- function w(A) {
884
- const T = n.valueField ?? "value", L = A[T] ?? A.value;
885
- e("input", L), R();
886
+ function f(M) {
887
+ const D = n.valueField ?? "value", j = M[D] ?? M.value;
888
+ e("input", j), A();
886
889
  }
887
890
  async function K() {
888
891
  if (!(!n.api || p())) {
889
- r.value = !0;
892
+ a.value = !0;
890
893
  try {
891
- const A = await n.api(n.params), T = Array.isArray(A) ? A : (A == null ? void 0 : A.list) ?? (A == null ? void 0 : A.data) ?? [];
892
- u.value = T.map((L) => y(L)), C.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);
893
896
  } finally {
894
- r.value = !1;
897
+ a.value = !1;
895
898
  }
896
899
  }
897
900
  }
898
901
  return me(() => {
899
- p() ? b() : n.lazy || K();
900
- }), Y(() => n.treeData, () => {
901
- p() ? b() : (u.value = [], C.value = {}, !n.lazy && n.api && K());
902
- }, { deep: !0 }), Y(() => n.api, () => {
903
- p() || (n.lazy ? (u.value = [], C.value = {}) : K());
904
- }, { deep: !0 }), Y(() => n.params, () => {
905
- p() || (n.lazy ? (u.value = [], C.value = {}) : K());
906
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: s, loading: r, filterText: h, treeData: u, flatLabelMap: C, treeProps: N, normalizeNode: y, buildFlatLabelMap: k, hasTreeDataProp: p, applyTreeData: x, syncFromTreeDataProp: b, displayText: j, filterNodeMethod: V, clickOutsideHandler: f, openDropdown: M, closeDropdown: R, clearValue: q, onNodeClick: w, fetchData: K };
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 };
907
910
  }
908
911
  });
909
- var wt = function() {
912
+ var Ct = function() {
910
913
  var e = this, n = e._self._c, t = e._self._setupProxy;
911
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) {
912
915
  o.stopPropagation();
913
916
  } }, model: { value: t.filterText, callback: function(o) {
914
917
  t.filterText = o;
915
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);
916
- }, Ct = [], xt = /* @__PURE__ */ ae(
917
- yt,
919
+ }, xt = [], Pt = /* @__PURE__ */ ae(
918
920
  wt,
919
921
  Ct,
922
+ xt,
920
923
  !1,
921
924
  null,
922
925
  "f30bba11",
923
926
  null,
924
927
  null
925
928
  );
926
- const Pt = xt.exports, St = /* @__PURE__ */ le({
929
+ const St = Pt.exports, Ft = /* @__PURE__ */ oe({
927
930
  __name: "ProFormItem",
928
931
  props: {
929
932
  schema: null,
@@ -950,79 +953,79 @@ const Pt = xt.exports, St = /* @__PURE__ */ le({
950
953
  "cascader",
951
954
  "checkbox",
952
955
  "radio"
953
- ]), t = D(null);
956
+ ]), t = z(null);
954
957
  me(() => {
955
- var w;
956
- e.schema.component === "api-select" && ((w = e.registerFieldInstance) == null || w.call(e, e.schema.field, t.value));
957
- }), Fe(() => {
958
- var w;
959
- e.schema.component === "api-select" && ((w = e.registerFieldInstance) == null || w.call(e, e.schema.field, null));
958
+ var f;
959
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, t.value));
960
+ }), ke(() => {
961
+ var f;
962
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, null));
960
963
  });
961
- const o = Ae(), s = P(() => ({
964
+ const o = Fe(), r = C(() => ({
962
965
  schema: e.schema,
963
966
  values: e.formModel,
964
967
  model: e.formModel,
965
968
  field: e.schema.field
966
- })), r = P(() => {
967
- const w = e.schema.ifShow;
968
- return w === void 0 ? !0 : typeof w == "boolean" ? w : w(s.value);
969
- }), h = P(() => {
970
- const w = e.schema.show;
971
- return w === void 0 ? !0 : typeof w == "boolean" ? w : w(s.value);
972
- }), u = P(() => {
969
+ })), a = C(() => {
970
+ const f = e.schema.ifShow;
971
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
972
+ }), v = C(() => {
973
+ const f = e.schema.show;
974
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(r.value);
975
+ }), u = C(() => {
973
976
  if (e.formDisabled)
974
977
  return !0;
975
- const w = e.schema.dynamicDisabled;
976
- return w === void 0 ? !1 : typeof w == "boolean" ? w : w(s.value);
977
- }), C = P(() => {
978
- const w = e.schema.dynamicRules;
979
- return w ? Array.isArray(w) ? w : w(s.value) : e.schema.rules;
980
- }), N = P(() => {
981
- const w = e.schema.componentProps;
982
- if (!w)
978
+ const f = e.schema.dynamicDisabled;
979
+ return f === void 0 ? !1 : typeof f == "boolean" ? f : f(r.value);
980
+ }), P = C(() => {
981
+ const f = e.schema.dynamicRules;
982
+ return f ? Array.isArray(f) ? f : f(r.value) : e.schema.rules;
983
+ }), $ = C(() => {
984
+ const f = e.schema.componentProps;
985
+ if (!f)
983
986
  return { props: {}, listeners: {} };
984
- const K = typeof w == "function" ? w({
985
- ...s.value,
987
+ const K = typeof f == "function" ? f({
988
+ ...r.value,
986
989
  formActionType: e.formActionType
987
- }) : { ...w }, A = {}, T = {};
988
- for (const [L, U] of Object.entries(K))
989
- if (L.length > 2 && /^on[A-Za-z]/.test(L) && typeof U == "function") {
990
- const H = L.slice(2).charAt(0).toLowerCase() + L.slice(3);
991
- 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;
992
995
  } else
993
- A[L] = U;
994
- return { props: A, listeners: T };
995
- }), y = P(() => N.value.props), k = P(() => N.value.listeners), p = P(() => e.schema.colon ?? e.colon ?? !1), x = P(() => {
996
- const w = e.schema.tooltip;
997
- if (!w)
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
+ const f = e.schema.tooltip;
1000
+ if (!f)
998
1001
  return null;
999
- const K = typeof w == "function" ? w(s.value) : w;
1002
+ const K = typeof f == "function" ? f(r.value) : f;
1000
1003
  return Te(K, e.formModel[e.schema.field]);
1001
- }), b = P(() => x.value ? "el-tooltip" : "span"), j = P(() => x.value || {}), V = P(() => !!o.default), f = (w) => {
1002
- const K = w == null ? void 0 : w.options;
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;
1003
1006
  return Array.isArray(K) ? K : void 0;
1004
- }, M = P(() => {
1005
- const w = e.schema.component;
1006
- return w == null ? null : typeof w == "string" ? n.has(w) ? null : e.customComponents && e.customComponents[w] || w : w;
1007
- }), R = (w) => {
1007
+ }, q = C(() => {
1008
+ const f = e.schema.component;
1009
+ return f == null ? null : typeof f == "string" ? n.has(f) ? null : e.customComponents && e.customComponents[f] || f : f;
1010
+ }), A = (f) => {
1008
1011
  var K;
1009
- (K = e.onFieldChange) == null || K.call(e, e.schema.field, w);
1010
- }, q = P(() => {
1011
- const w = e.schema.render;
1012
- return w ? {
1012
+ (K = e.onFieldChange) == null || K.call(e, e.schema.field, f);
1013
+ }, F = C(() => {
1014
+ const f = e.schema.render;
1015
+ return f ? {
1013
1016
  render() {
1014
- const K = w(s.value);
1017
+ const K = f(r.value);
1015
1018
  return Array.isArray(K) ? ue("span", K) : K;
1016
1019
  }
1017
1020
  } : null;
1018
1021
  });
1019
- return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: s, shouldRender: r, shouldShow: h, effectiveDisabled: u, effectiveRules: C, effectiveComponentPropsAndListeners: N, effectiveComponentProps: y, effectiveComponentListeners: k, showColon: p, normalizedTooltip: x, fieldWrapperComponent: b, fieldWrapperProps: j, hasSlot: V, getOptions: f, resolvedCustomComponent: M, setFieldValue: R, renderComponent: q, 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 };
1020
1023
  }
1021
1024
  });
1022
- var Ft = function() {
1025
+ var kt = function() {
1023
1026
  var e = this, n = e._self._c, t = e._self._setupProxy;
1024
- 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) {
1025
- 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) + " ")]);
1026
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) {
1027
1030
  e.$set(e.formModel, e.schema.field, o);
1028
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) {
@@ -1048,17 +1051,17 @@ var Ft = function() {
1048
1051
  }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1049
1052
  return n("el-radio", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
1050
1053
  }), 1) : e._e()], 1)]], 2) : e._e();
1051
- }, kt = [], Rt = /* @__PURE__ */ ae(
1052
- St,
1054
+ }, Bt = [], Rt = /* @__PURE__ */ ae(
1053
1055
  Ft,
1054
1056
  kt,
1057
+ Bt,
1055
1058
  !1,
1056
1059
  null,
1057
1060
  "48d7960b",
1058
1061
  null,
1059
1062
  null
1060
1063
  );
1061
- const qe = Rt.exports, Bt = /* @__PURE__ */ le({
1064
+ const qe = Rt.exports, Mt = /* @__PURE__ */ oe({
1062
1065
  __name: "FormActions",
1063
1066
  props: {
1064
1067
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -1079,24 +1082,24 @@ const qe = Rt.exports, Bt = /* @__PURE__ */ le({
1079
1082
  return { __sfc: !0 };
1080
1083
  }
1081
1084
  });
1082
- var Mt = function() {
1085
+ var At = function() {
1083
1086
  var e = this, n = e._self._c;
1084
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) {
1085
1088
  return e.$emit("submit");
1086
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) {
1087
1090
  return e.$emit("reset");
1088
1091
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
1089
- }, At = [], $t = /* @__PURE__ */ ae(
1090
- Bt,
1092
+ }, $t = [], Tt = /* @__PURE__ */ ae(
1091
1093
  Mt,
1092
1094
  At,
1095
+ $t,
1093
1096
  !1,
1094
1097
  null,
1095
1098
  "489c88d2",
1096
1099
  null,
1097
1100
  null
1098
1101
  );
1099
- const He = $t.exports, Tt = /* @__PURE__ */ le({
1102
+ const He = Tt.exports, Dt = /* @__PURE__ */ oe({
1100
1103
  __name: "ProForm",
1101
1104
  props: {
1102
1105
  schemas: null,
@@ -1130,154 +1133,156 @@ const He = $t.exports, Tt = /* @__PURE__ */ le({
1130
1133
  },
1131
1134
  emits: ["submit", "reset", "register", "update:modelValue"],
1132
1135
  setup(c, { expose: e, emit: n }) {
1133
- const t = c, o = Ae(), s = D(), r = D(), h = D(!1), u = D(!0), C = D({}), N = D({}), y = D([]), k = D({}), p = D(/* @__PURE__ */ new Map()), x = { xl: 1920, lg: 1200, md: 992, sm: 768 }, b = (d, g, S) => {
1134
- const l = S ?? (typeof window < "u" ? window.innerWidth : 1920), a = d ?? {}, v = g ?? {}, F = v.span ?? 8;
1135
- return l >= x.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 >= x.lg ? a.lg ?? v.lg ?? a.md ?? v.md ?? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : l >= x.md ? a.md ?? v.md ?? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : l >= x.sm ? a.sm ?? v.sm ?? a.xs ?? v.xs ?? a.span ?? F : a.xs ?? v.xs ?? a.span ?? F;
1136
- }, { getSetting: j } = $e(), V = P(() => ({ ...j("ProForm"), ...t, ...k.value })), f = P(() => V.value.modelValue), M = P(() => f.value !== void 0), R = P(() => M.value ? f.value ?? {} : C.value), q = P(() => ({
1137
- ...j("ProForm").components ?? {},
1138
- ...V.value.components ?? {},
1139
- ...k.value.components ?? {}
1140
- })), w = P(() => V.value.actionColOptions ?? { span: 24 }), K = D(typeof window < "u" ? window.innerWidth : 1920), A = (d, g, S, l) => {
1141
- let a = 24, v = 1, F = 0;
1142
- for (const E of d) {
1143
- const I = b(E.colProps, g, l);
1144
- if (I > a) {
1145
- if (v++, v > S)
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)
1146
1149
  break;
1147
- a = 24 - I;
1150
+ s = 24 - I;
1148
1151
  } else
1149
- a -= I;
1150
- F++;
1152
+ s -= I;
1153
+ k++;
1151
1154
  }
1152
- return F;
1153
- }, T = P(() => {
1154
- const d = y.value.filter((a) => H(a));
1155
- if (!V.value.showAdvancedButton)
1155
+ return k;
1156
+ }, D = C(() => {
1157
+ const d = m.value.filter((s) => H(s));
1158
+ if (!O.value.showAdvancedButton)
1156
1159
  return !1;
1157
- const g = V.value.alwaysShowLines ?? 1, S = V.value.baseColProps, l = A(d, S, g, K.value);
1160
+ const w = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1158
1161
  return d.length > l;
1159
- }), L = P(() => V.value.formListeners ?? {}), U = P(() => {
1160
- const d = y.value.filter((a) => H(a));
1161
- if (!V.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)
1162
1165
  return d;
1163
- const g = V.value.alwaysShowLines ?? 1, S = V.value.baseColProps, l = A(d, S, g, K.value);
1166
+ const w = O.value.alwaysShowLines ?? 1, B = O.value.baseColProps, l = M(d, B, w, K.value);
1164
1167
  return d.slice(0, l);
1165
1168
  }), H = (d) => {
1166
- let g = !0, S = !0;
1167
- return typeof d.ifShow == "function" && (g = d.ifShow({ schema: d, values: R.value, model: R.value, field: d.field })), typeof d.ifShow == "boolean" && (g = d.ifShow), typeof d.show == "function" && (S = d.show({ schema: d, values: R.value, model: R.value, field: d.field })), typeof d.show == "boolean" && (S = d.show), g && S;
1168
- }, Q = (d) => d.colProps ?? V.value.baseColProps ?? {}, G = (d) => d.slot || d.field, ee = (d, g = !0) => {
1169
- const S = g ? { ...d ?? {} } : {}, l = V.value.initialValues ?? t.initialValues;
1170
- return y.value.forEach((a) => {
1171
- if (!(g && Object.prototype.hasOwnProperty.call(S, a.field))) {
1172
- if (a.defaultValue !== void 0) {
1173
- S[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;
1174
1177
  return;
1175
1178
  }
1176
- l && Object.prototype.hasOwnProperty.call(l, a.field) && (S[a.field] = l[a.field]);
1179
+ l && Object.prototype.hasOwnProperty.call(l, s.field) && (B[s.field] = l[s.field]);
1177
1180
  }
1178
- }), S;
1179
- }, J = (d, g = !0) => {
1180
- C.value = d, g && n("update:modelValue", d);
1181
+ }), B;
1182
+ }, J = (d, w = !0) => {
1183
+ P.value = d, w && n("update:modelValue", d);
1181
1184
  }, te = (d) => {
1182
- const g = ee({ ...R.value, ...d });
1183
- return J(g), g;
1185
+ const w = ee({ ...A.value, ...d });
1186
+ return J(w), w;
1184
1187
  }, ne = () => {
1185
1188
  const d = {};
1186
- y.value.forEach((g) => {
1187
- var S;
1188
- (S = g.rules) != null && S.length && (d[g.field] = g.rules);
1189
- }), J(ee(R.value), !1), N.value = d;
1190
- }, _ = (d) => {
1191
- const g = { ...d };
1192
- return y.value.forEach((S) => {
1193
- const l = S.ifShow;
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
+ const w = { ...d };
1195
+ return m.value.forEach((B) => {
1196
+ const l = B.ifShow;
1194
1197
  if (l === void 0)
1195
1198
  return;
1196
- (typeof l == "boolean" ? l : l({ schema: S, values: d, model: d, field: S.field })) || delete g[S.field];
1197
- }), g;
1198
- }, O = (d) => {
1199
- const g = _(d), S = k.value.fieldMapToTime;
1200
- if (!(S != null && S.length))
1201
- return g;
1202
- const l = { ...g };
1203
- return S.forEach(([a, [v, F]]) => {
1204
- const E = l[a];
1205
- Array.isArray(E) && E.length === 2 && (delete l[a], l[v] = E[0], l[F] = E[1]);
1199
+ (typeof l == "boolean" ? l : l({ schema: B, values: d, model: d, field: B.field })) || delete w[B.field];
1200
+ }), w;
1201
+ }, N = (d) => {
1202
+ const w = b(d), B = S.value.fieldMapToTime;
1203
+ if (!(B != null && B.length))
1204
+ return w;
1205
+ const l = { ...w };
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]);
1206
1209
  }), l;
1207
- }, $ = async () => {
1210
+ }, T = async () => {
1208
1211
  var d;
1209
1212
  try {
1210
- await ((d = s.value) == null ? void 0 : d.validate()), V.value.submitFunc ? await V.value.submitFunc() : (h.value = !0, n("submit", O({ ...R.value })));
1211
- } catch (g) {
1212
- console.error("Form validation failed:", g);
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
+ } catch (w) {
1215
+ console.error("Form validation failed:", w);
1213
1216
  } finally {
1214
- h.value = !1;
1217
+ v.value = !1;
1215
1218
  }
1216
1219
  }, i = async () => {
1217
1220
  var d;
1218
- V.value.resetFunc ? await V.value.resetFunc() : ((d = s.value) == null || d.resetFields(), ne(), n("reset"), V.value.submitOnReset && await $());
1219
- }, m = (d) => (te(d), Promise.resolve()), B = () => O({ ...R.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 () => {
1220
1223
  var d;
1221
- (d = s.value) == null || d.resetFields(), J(ee(void 0, !1));
1222
- }, z = (d, g) => {
1223
- te({ [d]: g });
1224
- }, X = (d) => {
1225
- var g;
1226
- return ((g = s.value) == null ? void 0 : g.validate(d)) ?? Promise.resolve();
1227
- }, se = (d) => s.value ? d != null && d.length ? Promise.all(d.map((g) => new Promise((S, l) => {
1228
- s.value.validateField(g, (a) => a ? S(void 0) : l(new Error("Validation failed")));
1229
- }))) : s.value.validate() : Promise.resolve(), he = async (d, g) => {
1224
+ (d = r.value) == null || d.resetFields(), J(ee(void 0, !1));
1225
+ }, E = (d, w) => {
1226
+ te({ [d]: w });
1227
+ }, Z = (d) => {
1228
+ var 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) => {
1230
1233
  var l;
1231
- const S = (l = r.value) == null ? void 0 : l.querySelector(`[data-field="${d}"]`);
1232
- return S && S.scrollIntoView({ behavior: (g == null ? void 0 : g.behavior) ?? "smooth", block: (g == null ? void 0 : g.block) ?? "nearest" }), Promise.resolve();
1233
- }, re = (d) => {
1234
- var g;
1235
- (g = s.value) == null || g.clearValidate(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
+ var w;
1238
+ (w = r.value) == null || w.clearValidate(d);
1236
1239
  }, _e = async (d) => {
1237
- (Array.isArray(d) ? d : [d]).forEach((S) => {
1238
- const l = y.value.findIndex((a) => a.field === S.field);
1239
- l >= 0 && (y.value[l] = { ...y.value[l], ...S });
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 });
1240
1243
  });
1241
- }, be = async (d, g, S) => {
1242
- if (S)
1243
- y.value.unshift(d);
1244
- else if (g) {
1245
- const l = y.value.findIndex((a) => a.field === g);
1246
- y.value.splice(l + 1, 0, d);
1244
+ }, ge = async (d, w, B) => {
1245
+ if (B)
1246
+ m.value.unshift(d);
1247
+ else if (w) {
1248
+ const l = m.value.findIndex((s) => s.field === w);
1249
+ m.value.splice(l + 1, 0, d);
1247
1250
  } else
1248
- y.value.push(d);
1251
+ m.value.push(d);
1249
1252
  ne();
1250
- }, ge = async (d) => {
1251
- const g = Array.isArray(d) ? d : [d];
1252
- y.value = y.value.filter((S) => !g.includes(S.field));
1253
+ }, be = async (d) => {
1254
+ const w = Array.isArray(d) ? d : [d];
1255
+ m.value = m.value.filter((B) => !w.includes(B.field));
1253
1256
  }, ye = async (d) => {
1254
- k.value = { ...k.value, ...d }, d.schemas && (y.value = [...d.schemas], ne());
1255
- }, we = (d, g) => {
1256
- g ? p.value.set(d, g) : p.value.delete(d);
1257
- }, Ce = (d) => p.value.get(d) ?? null, xe = (d) => {
1258
- const g = p.value.get(d);
1259
- if (!g)
1257
+ S.value = { ...S.value, ...d }, d.schemas && (m.value = [...d.schemas], ne());
1258
+ }, we = (d, w) => {
1259
+ w ? p.value.set(d, w) : p.value.delete(d);
1260
+ }, Ce = (d) => p.value.get(d) ?? null;
1261
+ function xe(d, w = !1) {
1262
+ const B = p.value.get(d);
1263
+ if (!B)
1260
1264
  return [];
1261
- const S = g;
1262
- return S != null && S.options ? S.options : [];
1263
- }, ve = (d) => {
1264
- const g = p.value.get(d);
1265
- if (!g)
1265
+ const l = B;
1266
+ return w ? (l == null ? void 0 : l.rawOptions) ?? [] : (l == null ? void 0 : l.options) ?? [];
1267
+ }
1268
+ const ve = (d) => {
1269
+ const w = p.value.get(d);
1270
+ if (!w)
1266
1271
  return !1;
1267
- const S = g;
1268
- return (S == null ? void 0 : S.loading) ?? !1;
1272
+ const B = w;
1273
+ return (B == null ? void 0 : B.loading) ?? !1;
1269
1274
  }, ie = {
1270
- getFieldsValue: B,
1271
- setFieldsValue: m,
1272
- resetFields: W,
1273
- validate: X,
1274
- validateFields: se,
1275
- submit: $,
1275
+ getFieldsValue: R,
1276
+ setFieldsValue: h,
1277
+ resetFields: L,
1278
+ validate: Z,
1279
+ validateFields: re,
1280
+ submit: T,
1276
1281
  scrollToField: he,
1277
- clearValidate: re,
1282
+ clearValidate: se,
1278
1283
  updateSchema: _e,
1279
- appendSchemaByField: be,
1280
- removeSchemaByField: ge,
1284
+ appendSchemaByField: ge,
1285
+ removeSchemaByField: be,
1281
1286
  setProps: ye,
1282
1287
  getComponentInstance: Ce,
1283
1288
  getFieldOptions: xe,
@@ -1288,106 +1293,120 @@ const He = $t.exports, Tt = /* @__PURE__ */ le({
1288
1293
  registerFieldInstance: we
1289
1294
  });
1290
1295
  const ce = () => {
1291
- y.value = [...t.schemas ?? []], ne();
1296
+ m.value = [...t.schemas ?? []], ne();
1292
1297
  }, de = () => {
1293
1298
  typeof window < "u" && (K.value = window.innerWidth);
1294
1299
  };
1295
1300
  return me(() => {
1296
1301
  ce(), n("register", ie), typeof window < "u" && window.addEventListener("resize", de);
1297
- }), Fe(() => {
1302
+ }), ke(() => {
1298
1303
  typeof window < "u" && window.removeEventListener("resize", de);
1299
- }), Y(() => f.value, (d) => {
1300
- !M.value || d === void 0 || J(ee(d), !1);
1301
- }, { 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: h, collapsed: u, formModel: C, formRules: N, innerSchemas: y, innerProps: k, fieldInstanceMap: p, BREAKPOINTS: x, getEffectiveSpan: b, getComponentSetting: j, effectiveProps: V, controlledModelValue: f, isControlled: M, currentFormModel: R, formCustomComponents: q, effectiveActionColOptions: w, windowWidth: K, getVisibleSchemaCount: A, hasMoreFields: T, formListeners: L, displaySchemas: U, shouldShow: H, getColProps: Q, getSlotName: G, resolveSchemaModel: ee, applyFormModel: J, updateFormModel: te, initForm: ne, filterByIfShow: _, processFieldMapToTime: O, handleSubmit: $, handleReset: i, setFieldsValue: m, getFieldsValue: B, resetFields: W, handleFieldChange: z, 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 };
1304
+ }), U(() => y.value, (d) => {
1305
+ !q.value || d === void 0 || J(ee(d), !1);
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 };
1302
1307
  }
1303
1308
  });
1304
- var Dt = function() {
1309
+ var zt = function() {
1305
1310
  var e = this, n = e._self._c, t = e._self._setupProxy;
1306
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) {
1307
- var s, r;
1308
- 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()];
1309
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) {
1310
1315
  t.collapsed = !t.collapsed;
1311
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) {
1312
1317
  t.collapsed = !t.collapsed;
1313
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);
1314
- }, zt = [], Nt = /* @__PURE__ */ ae(
1315
- Tt,
1319
+ }, Et = [], Ot = /* @__PURE__ */ ae(
1316
1320
  Dt,
1317
1321
  zt,
1322
+ Et,
1318
1323
  !1,
1319
1324
  null,
1320
- "7ee469dc",
1325
+ "80bac8be",
1321
1326
  null,
1322
1327
  null
1323
1328
  );
1324
- const Je = Nt.exports;
1325
- function Zt(c) {
1326
- const e = D(null), n = D(c ? pe(c) : void 0), t = () => c ? pe(c) : void 0, o = (f) => {
1327
- e.value = f;
1328
- const M = t();
1329
- M && Object.keys(M).length > 0 && f.setProps(M);
1329
+ const Je = Ot.exports;
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
+ const f = t();
1334
+ f && Object.keys(f).length > 0 && F.setProps(f);
1330
1335
  };
1331
- return c && Y(
1336
+ c && U(
1332
1337
  () => t(),
1333
- (f) => {
1334
- n.value = f, f && e.value && e.value.setProps(f);
1338
+ (F) => {
1339
+ n.value = F, F && e.value && e.value.setProps(F);
1335
1340
  },
1336
1341
  { deep: !0 }
1337
- ), [o, {
1342
+ );
1343
+ const r = () => {
1344
+ var F;
1345
+ return ((F = e.value) == null ? void 0 : F.getFieldsValue()) ?? {};
1346
+ }, a = async (F) => {
1347
+ var f;
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
+ var f;
1354
+ return ((f = e.value) == null ? void 0 : f.validate(F)) ?? Promise.resolve();
1355
+ }, P = (F) => {
1356
+ var f;
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
+ var f;
1366
+ (f = e.value) == null || f.clearValidate(F);
1367
+ }, p = (F) => {
1368
+ var f;
1369
+ return ((f = e.value) == null ? void 0 : f.updateSchema(F)) ?? Promise.resolve();
1370
+ }, x = (F, f, K) => {
1371
+ var M;
1372
+ return ((M = e.value) == null ? void 0 : M.appendSchemaByField(F, f, K)) ?? Promise.resolve();
1373
+ }, g = (F) => {
1374
+ var f;
1375
+ return ((f = e.value) == null ? void 0 : f.removeSchemaByField(F)) ?? Promise.resolve();
1376
+ }, V = async (F) => {
1377
+ var f;
1378
+ n.value = { ...n.value, ...F }, await ((f = e.value) == null ? void 0 : f.setProps(F));
1379
+ }, O = (F) => {
1380
+ var f;
1381
+ return ((f = e.value) == null ? void 0 : f.getComponentInstance(F)) ?? null;
1382
+ };
1383
+ function y(F, f = !1) {
1384
+ return e.value ? f ? e.value.getFieldOptions(F, !0) : e.value.getFieldOptions(F) : [];
1385
+ }
1386
+ return [o, {
1338
1387
  register: o,
1339
1388
  formAction: e,
1340
- getFieldsValue: () => {
1389
+ getFieldsValue: r,
1390
+ setFieldsValue: a,
1391
+ resetFields: v,
1392
+ validate: u,
1393
+ validateFields: P,
1394
+ submit: $,
1395
+ scrollToField: m,
1396
+ clearValidate: S,
1397
+ updateSchema: p,
1398
+ appendSchemaByField: x,
1399
+ removeSchemaByField: g,
1400
+ setProps: V,
1401
+ getComponentInstance: O,
1402
+ getFieldOptions: y,
1403
+ isFieldLoading: (F) => {
1341
1404
  var f;
1342
- return ((f = e.value) == null ? void 0 : f.getFieldsValue()) ?? {};
1343
- },
1344
- setFieldsValue: async (f) => {
1345
- var M;
1346
- await ((M = e.value) == null ? void 0 : M.setFieldsValue(f));
1347
- },
1348
- resetFields: async () => {
1349
- var f;
1350
- await ((f = e.value) == null ? void 0 : f.resetFields());
1351
- },
1352
- validate: (f) => {
1353
- var M;
1354
- return ((M = e.value) == null ? void 0 : M.validate(f)) ?? Promise.resolve();
1355
- },
1356
- validateFields: (f) => {
1357
- var M;
1358
- return ((M = e.value) == null ? void 0 : M.validateFields(f)) ?? Promise.resolve();
1359
- },
1360
- submit: () => {
1361
- var f;
1362
- return ((f = e.value) == null ? void 0 : f.submit()) ?? Promise.resolve();
1363
- },
1364
- scrollToField: (f, M) => {
1365
- var R;
1366
- return ((R = e.value) == null ? void 0 : R.scrollToField(f, M)) ?? Promise.resolve();
1367
- },
1368
- clearValidate: (f) => {
1369
- var M;
1370
- (M = e.value) == null || M.clearValidate(f);
1371
- },
1372
- updateSchema: (f) => {
1373
- var M;
1374
- return ((M = e.value) == null ? void 0 : M.updateSchema(f)) ?? Promise.resolve();
1375
- },
1376
- appendSchemaByField: (f, M, R) => {
1377
- var q;
1378
- return ((q = e.value) == null ? void 0 : q.appendSchemaByField(f, M, R)) ?? Promise.resolve();
1379
- },
1380
- removeSchemaByField: (f) => {
1381
- var M;
1382
- return ((M = e.value) == null ? void 0 : M.removeSchemaByField(f)) ?? Promise.resolve();
1383
- },
1384
- setProps: async (f) => {
1385
- var M;
1386
- n.value = { ...n.value, ...f }, await ((M = e.value) == null ? void 0 : M.setProps(f));
1405
+ return ((f = e.value) == null ? void 0 : f.isFieldLoading(F)) ?? !1;
1387
1406
  }
1388
1407
  }];
1389
1408
  }
1390
- const Ot = /* @__PURE__ */ le({
1409
+ const Nt = /* @__PURE__ */ oe({
1391
1410
  __name: "ProDescriptions",
1392
1411
  props: {
1393
1412
  title: null,
@@ -1403,7 +1422,7 @@ const Ot = /* @__PURE__ */ le({
1403
1422
  },
1404
1423
  emits: ["register"],
1405
1424
  setup(c, { expose: e, emit: n }) {
1406
- const t = c, o = D({}), s = D({}), r = D([]), h = D(typeof window < "u" ? window.innerWidth : 1920), u = D(!0), C = le({
1425
+ const t = c, o = z({}), r = z({}), a = z([]), v = z(typeof window < "u" ? window.innerWidth : 1920), u = z(!0), P = oe({
1407
1426
  name: "EcpDescriptionValueRenderer",
1408
1427
  props: {
1409
1428
  schema: { type: Object, required: !0 },
@@ -1411,118 +1430,118 @@ const Ot = /* @__PURE__ */ le({
1411
1430
  record: { type: Object, required: !0 },
1412
1431
  emptyText: { type: String, default: "-" }
1413
1432
  },
1414
- setup(_) {
1433
+ setup(b) {
1415
1434
  return () => {
1416
- const O = _.schema, $ = _.record, i = _.value, m = (B) => {
1417
- const W = N(O, B === _.emptyText ? i : B, $), z = ue("span", B);
1418
- return W ? ue("el-tooltip", { props: W }, [z]) : z;
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;
1419
1438
  };
1420
- if (O.render) {
1421
- const B = O.render(i, $);
1422
- return B == null || B === "" ? m(_.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;
1423
1442
  }
1424
- return Array.isArray(i) ? m(i.length ? i.join(", ") : _.emptyText) : i == null || i === "" ? m(_.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));
1425
1444
  };
1426
1445
  }
1427
- }), N = (_, O, $) => {
1428
- const i = _.tooltip;
1446
+ }), $ = (b, N, T) => {
1447
+ const i = b.tooltip;
1429
1448
  if (!i)
1430
1449
  return null;
1431
- const m = typeof i == "function" ? i({ value: O, record: $, schema: _ }) : i;
1432
- return Te(m, O);
1433
- }, { mergeSettings: y } = $e(), k = P(() => y("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, x = (_, O) => {
1434
- if (typeof _ == "number")
1435
- return Math.max(1, _);
1436
- const $ = _ ?? {};
1437
- return O >= p.xxl ? $.xxl ?? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.xl ? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.lg ? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.md ? $.md ?? $.sm ?? $.xs ?? 3 : O >= p.sm ? $.sm ?? $.xs ?? 2 : $.xs ?? 1;
1438
- }, b = P(() => x(k.value.column, h.value)), j = P(() => k.value.data ?? s.value ?? {}), V = P(() => (r.value.length ? r.value : k.value.schema ?? []).filter((_) => _.dataIndex || _.field ? typeof _.show == "function" ? _.show(j.value) : _.show !== !1 : !1).map((_) => ({
1439
- ..._,
1440
- dataIndex: _.dataIndex || _.field || ""
1441
- }))), f = P(() => {
1442
- const _ = [];
1443
- let O = { items: [] }, $ = 0;
1444
- const i = b.value;
1445
- return V.value.forEach((m, B) => {
1446
- const W = V.value.length - B, z = Math.max(1, Math.min(m.span ?? 1, i)), X = W === 1 ? i - $ || i : z;
1447
- $ + X > i && (_.push(O), O = { items: [] }, $ = 0);
1448
- const se = W === 1 && $ < i ? Math.max(1, i - $) : X;
1449
- O.items.push({ ...m, _span: se }), $ += se, $ >= i && (_.push(O), O = { items: [] }, $ = 0);
1450
- }), O.items.length > 0 && _.push(O), _;
1451
- }), M = P(() => {
1452
- var O;
1453
- if (!R.value || u.value)
1454
- return f.value;
1455
- const _ = Math.max(1, ((O = k.value.collapseOptions) == null ? void 0 : O.visibleRows) ?? 1);
1456
- return f.value.slice(0, _);
1457
- }), R = P(() => {
1458
- var O, $;
1459
- const _ = Math.max(1, ((O = k.value.collapseOptions) == null ? void 0 : O.visibleRows) ?? 1);
1460
- return !!k.value.useCollapse && !!(($ = k.value.collapseOptions) != null && $.canExpand) && f.value.length > _;
1461
- }), q = P(() => !!k.value.title || !!k.value.helpMessage || R.value), w = P(() => {
1462
- var _, O;
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
+ if (!A.value || u.value)
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;
1463
1482
  return {
1464
- expand: ((_ = k.value.collapseOptions) == null ? void 0 : _.expandButtonText) ?? "展开",
1465
- collapse: ((O = k.value.collapseOptions) == null ? void 0 : O.collapseButtonText) ?? "收起"
1483
+ expand: ((b = S.value.collapseOptions) == null ? void 0 : b.expandButtonText) ?? "展开",
1484
+ collapse: ((N = S.value.collapseOptions) == null ? void 0 : N.collapseButtonText) ?? "收起"
1466
1485
  };
1467
- }), K = P(() => ({
1468
- gridTemplateColumns: `repeat(${b.value}, minmax(0, 1fr))`
1469
- })), A = (_) => ({
1470
- gridColumn: `span ${_._span}`
1471
- }), T = (_) => ({
1472
- minWidth: _.labelMinWidth ? `${_.labelMinWidth}px` : void 0,
1473
- ..._.labelStyle ?? {}
1474
- }), L = (_) => ({
1475
- minWidth: _.contentMinWidth ? `${_.contentMinWidth}px` : void 0,
1476
- ..._.contentStyle ?? {}
1477
- }), U = (_) => j.value[_.dataIndex], H = () => {
1478
- r.value = [...k.value.schema ?? []];
1479
- }, Q = () => {
1480
- s.value = { ...k.value.data ?? {} };
1481
- }, G = async (_) => {
1482
- o.value = { ...o.value, ..._ }, _.schema && (r.value = [..._.schema]), _.data && (s.value = { ..._.data });
1483
- }, ee = async (_) => {
1484
- s.value = { ...s.value, ..._ }, o.value = { ...o.value, data: s.value };
1485
- }, J = () => ({ ...k.value.data ?? s.value ?? {} }), te = {
1486
- 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,
1487
1506
  setData: ee,
1488
1507
  getData: J
1489
1508
  };
1490
1509
  e(te);
1491
1510
  const ne = () => {
1492
- typeof window < "u" && (h.value = window.innerWidth);
1511
+ typeof window < "u" && (v.value = window.innerWidth);
1493
1512
  };
1494
1513
  return me(() => {
1495
- var _;
1496
- H(), Q(), u.value = ((_ = k.value.collapseOptions) == null ? void 0 : _.defaultExpand) !== !1, n("register", te), typeof window < "u" && window.addEventListener("resize", ne);
1497
- }), 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(() => {
1498
1517
  typeof window < "u" && window.removeEventListener("resize", ne);
1499
- }), Y(() => k.value.schema, H, { deep: !0 }), Y(() => k.value.data, Q, { deep: !0 }), Y(() => {
1500
- var _;
1501
- return (_ = k.value.collapseOptions) == null ? void 0 : _.defaultExpand;
1502
- }, (_) => {
1503
- _ !== void 0 && (u.value = _);
1504
- }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: s, innerSchema: r, windowWidth: h, expanded: u, DescriptionValueRenderer: C, normalizeTooltip: N, mergeSettings: y, effectiveProps: k, breakpoints: p, resolveColumn: x, currentColumn: b, effectiveData: j, visibleSchema: V, normalizedRows: f, renderedRows: M, showCollapseButton: R, showHeader: q, collapseButtonText: w, bodyStyle: K, getItemStyle: A, getLabelStyle: T, getContentStyle: L, 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 };
1505
1524
  }
1506
1525
  });
1507
1526
  var It = function() {
1508
1527
  var o;
1509
1528
  var e = this, n = e._self._c, t = e._self._setupProxy;
1510
- 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) {
1511
- return n("div", { key: r }, [e._v(e._s(s))]);
1512
- }), 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) {
1513
- return n("div", { key: `collapse-${r}` }, [e._v(e._s(s))]);
1514
- }), 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) {
1515
1534
  t.expanded = !t.expanded;
1516
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: [
1517
1536
  `is-${t.effectiveProps.size}`,
1518
1537
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1519
- ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(s, r) {
1520
- return [e._l(s.items, function(h) {
1521
- return [n("div", { key: `${r}-${h.dataIndex || h.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(h) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(h) }, [e._v(" " + e._s(h.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(h) }, [e.$scopedSlots[h.slot || h.dataIndex] ? e._t(h.slot || h.dataIndex, null, { value: t.getItemValue(h), record: t.effectiveData, schema: h }) : n(t.DescriptionValueRenderer, { attrs: { schema: h, value: t.getItemValue(h), 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)])];
1522
1541
  })];
1523
1542
  })], 2)]);
1524
- }, Vt = [], Et = /* @__PURE__ */ ae(
1525
- Ot,
1543
+ }, Vt = [], Wt = /* @__PURE__ */ ae(
1544
+ Nt,
1526
1545
  It,
1527
1546
  Vt,
1528
1547
  !1,
@@ -1531,38 +1550,113 @@ var It = function() {
1531
1550
  null,
1532
1551
  null
1533
1552
  );
1534
- const Ue = Et.exports;
1535
- function Qt(c) {
1536
- const e = D(null), n = () => c ? pe(c) : void 0, t = () => {
1537
- const r = pe(e);
1538
- 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)
1539
1558
  throw new Error("ProDescriptions instance has not been registered");
1540
- return r;
1541
- }, o = (r) => {
1542
- e.value = r;
1543
- const h = n();
1544
- h && Object.keys(h).length > 0 && r.setProps(h);
1559
+ return a;
1560
+ }, o = (a) => {
1561
+ e.value = a;
1562
+ const v = n();
1563
+ v && Object.keys(v).length > 0 && a.setProps(v);
1545
1564
  };
1546
- return c && Y(
1565
+ return c && U(
1547
1566
  () => n(),
1548
- (r) => {
1549
- r && e.value && e.value.setProps(r);
1567
+ (a) => {
1568
+ a && e.value && e.value.setProps(a);
1550
1569
  },
1551
1570
  { deep: !0 }
1552
1571
  ), [o, {
1553
- setProps: (r) => t().setProps(r),
1554
- setData: (r) => t().setData(r),
1572
+ setProps: (a) => t().setProps(a),
1573
+ setData: (a) => t().setData(a),
1555
1574
  getData: () => t().getData()
1556
1575
  }];
1557
1576
  }
1558
- const Wt = {
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 = {
1559
1653
  name: "ProTableForm",
1560
1654
  model: {
1561
1655
  prop: "modelValue",
1562
1656
  event: "update:modelValue"
1563
1657
  }
1564
- }, Kt = /* @__PURE__ */ le({
1565
- ...Wt,
1658
+ }, Jt = /* @__PURE__ */ oe({
1659
+ ...Ht,
1566
1660
  props: {
1567
1661
  modelValue: { default: () => ({}) },
1568
1662
  columns: null,
@@ -1585,7 +1679,7 @@ const Wt = {
1585
1679
  },
1586
1680
  emits: ["update:modelValue"],
1587
1681
  setup(c, { expose: e, emit: n }) {
1588
- const t = c, o = D(null), s = () => t.competitorsKey ?? "competitors", r = () => t.competitorNameKey ?? "name", h = P(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), u = P(() => "left"), C = P(() => {
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(() => {
1589
1683
  const i = t.actionColumn;
1590
1684
  return {
1591
1685
  width: (i == null ? void 0 : i.width) ?? t.actionWidth,
@@ -1594,180 +1688,180 @@ const Wt = {
1594
1688
  fixed: (i == null ? void 0 : i.fixed) === void 0 ? "right" : i.fixed
1595
1689
  };
1596
1690
  });
1597
- function N(i) {
1691
+ function $(i) {
1598
1692
  return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
1599
1693
  }
1600
- const y = P(() => {
1694
+ const m = C(() => {
1601
1695
  const i = [];
1602
- t.fixedRows.forEach((W) => {
1696
+ t.fixedRows.forEach((L) => {
1603
1697
  i.push({
1604
1698
  _type: "fixed",
1605
- rowKey: W.rowKey,
1606
- rowLabel: W.label
1699
+ rowKey: L.rowKey,
1700
+ rowLabel: L.label
1607
1701
  });
1608
1702
  });
1609
- const m = t.modelValue;
1610
- return ((m && typeof m == "object" ? m[s()] : void 0) ?? []).forEach((W, z) => {
1611
- i.push({ _type: "competitor", _index: z });
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 });
1612
1706
  }), i;
1613
- }), k = P(() => {
1707
+ }), S = C(() => {
1614
1708
  const i = t.modelValue;
1615
- 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;
1616
1710
  });
1617
1711
  function p() {
1618
1712
  const i = t.modelValue;
1619
1713
  return !i || typeof i != "object" ? {} : JSON.parse(JSON.stringify(i));
1620
1714
  }
1621
1715
  function x(i) {
1622
- const m = t.modelValue;
1623
- if (!m || typeof m != "object") {
1624
- const z = {};
1625
- for (const X of t.columns)
1626
- z[X.key] = "";
1627
- return z;
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;
1628
1722
  }
1629
- const B = m[i];
1630
- if (B && typeof B == "object" && !Array.isArray(B))
1631
- return B;
1632
- const W = {};
1633
- for (const z of t.columns)
1634
- W[z.key] = "";
1635
- 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;
1636
1730
  }
1637
- function b(i) {
1731
+ function g(i) {
1638
1732
  n("update:modelValue", i);
1639
1733
  }
1640
- function j(i, m) {
1641
- return x(i)[m] ?? "";
1734
+ function V(i, h) {
1735
+ return x(i)[h] ?? "";
1642
1736
  }
1643
- function V(i, m, B) {
1644
- const W = p(), z = { ...W[i] || {} };
1645
- z[m] = B, W[i] = z, b(W);
1737
+ function O(i, h, R) {
1738
+ const L = p(), E = { ...L[i] || {} };
1739
+ E[h] = R, L[i] = E, g(L);
1646
1740
  }
1647
- function f() {
1741
+ function y() {
1648
1742
  const i = t.modelValue;
1649
1743
  if (!i || typeof i != "object")
1650
1744
  return [];
1651
- const m = i[s()];
1652
- return Array.isArray(m) ? m : [];
1745
+ const h = i[r()];
1746
+ return Array.isArray(h) ? h : [];
1653
1747
  }
1654
- function M(i) {
1655
- const m = f()[i], B = r();
1656
- return m ? String(m[B] ?? "") : "";
1748
+ function q(i) {
1749
+ const h = y()[i], R = a();
1750
+ return h ? String(h[R] ?? "") : "";
1657
1751
  }
1658
- function R(i, m) {
1659
- const B = p(), W = [...f()], z = { ...W[i] || {} };
1660
- z[r()] = m, W[i] = z, 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);
1661
1755
  }
1662
- function q(i, m) {
1663
- const B = f()[i];
1664
- return B ? B[m] ?? "" : "";
1756
+ function F(i, h) {
1757
+ const R = y()[i];
1758
+ return R ? R[h] ?? "" : "";
1665
1759
  }
1666
- function w(i, m, B) {
1667
- const W = p(), z = [...f()], X = { ...z[i] || {} };
1668
- X[m] = B, z[i] = X, W[s()] = z, 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);
1669
1763
  }
1670
- function K(i, m) {
1671
- return i._type === "fixed" ? j(i.rowKey, m.key) : q(i._index, m.key);
1764
+ function K(i, h) {
1765
+ return i._type === "fixed" ? V(i.rowKey, h.key) : F(i._index, h.key);
1672
1766
  }
1673
- function A(i, m, B) {
1674
- i._type === "fixed" ? V(i.rowKey, m.key, B) : w(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);
1675
1769
  }
1676
- function T(i, m) {
1677
- return (B) => A(i.row, m, B);
1770
+ function D(i, h) {
1771
+ return (R) => M(i.row, h, R);
1678
1772
  }
1679
- function L() {
1680
- const i = { [r()]: "" };
1681
- for (const m of t.columns)
1682
- i[m.key] = "";
1773
+ function j() {
1774
+ const i = { [a()]: "" };
1775
+ for (const h of t.columns)
1776
+ i[h.key] = "";
1683
1777
  return i;
1684
1778
  }
1685
- function U() {
1686
- const i = p(), m = [...f()];
1687
- m.push(L()), i[s()] = m, b(i);
1779
+ function G() {
1780
+ const i = p(), h = [...y()];
1781
+ h.push(j()), i[r()] = h, g(i);
1688
1782
  }
1689
1783
  function H(i) {
1690
- if (!k.value)
1784
+ if (!S.value)
1691
1785
  return;
1692
- const m = p(), B = [...f()];
1693
- 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);
1694
1788
  }
1695
- function Q(i, m) {
1696
- return `${i}.${m}`;
1789
+ function Y(i, h) {
1790
+ return `${i}.${h}`;
1697
1791
  }
1698
- function G(i) {
1699
- return `${s()}.${i}.${r()}`;
1792
+ function X(i) {
1793
+ return `${r()}.${i}.${a()}`;
1700
1794
  }
1701
- function ee(i, m) {
1702
- return `${s()}.${i}.${m}`;
1795
+ function ee(i, h) {
1796
+ return `${r()}.${i}.${h}`;
1703
1797
  }
1704
1798
  function J(i) {
1705
- return i.component === "formatted-number" ? ke : "el-input";
1799
+ return i.component === "formatted-number" ? Re : "el-input";
1706
1800
  }
1707
1801
  function te(i) {
1708
- const m = i.componentProps || {};
1802
+ const h = i.componentProps || {};
1709
1803
  return i.component === "formatted-number" ? {
1710
1804
  integerDigits: 5,
1711
1805
  decimalPlaces: 6,
1712
1806
  rounding: "round",
1713
1807
  inputLimit: !0,
1714
- ...m
1715
- } : { ...m };
1808
+ ...h
1809
+ } : { ...h };
1716
1810
  }
1717
1811
  function ne(i) {
1718
- const m = i.row;
1719
- if (m._type === "fixed")
1812
+ const h = i.row;
1813
+ if (h._type === "fixed")
1720
1814
  return {
1721
- row: m,
1815
+ row: h,
1722
1816
  rowType: "fixed",
1723
- rowKey: m.rowKey,
1724
- rowLabel: m.rowLabel
1817
+ rowKey: h.rowKey,
1818
+ rowLabel: h.rowLabel
1725
1819
  };
1726
- const B = m._index;
1820
+ const R = h._index;
1727
1821
  return {
1728
- row: m,
1822
+ row: h,
1729
1823
  rowType: "competitor",
1730
- rowIndex: B,
1731
- value: M(B),
1732
- updateValue: (W) => R(B, W)
1824
+ rowIndex: R,
1825
+ value: q(R),
1826
+ updateValue: (L) => A(R, L)
1733
1827
  };
1734
1828
  }
1735
- const _ = P(() => {
1736
- const i = {}, m = (W) => [{ required: !0, message: `请输入${W}`, trigger: "blur" }];
1737
- for (const W of t.fixedRows)
1738
- for (const z of t.columns)
1739
- z.rules ? i[`${W.rowKey}.${z.key}`] = z.rules : z.required && (i[`${W.rowKey}.${z.key}`] = m(z.title));
1740
- return f().forEach((W, z) => {
1741
- i[`${s()}.${z}.${r()}`] = m("友商名称");
1742
- for (const X of t.columns)
1743
- X.rules ? i[`${s()}.${z}.${X.key}`] = X.rules : X.required && (i[`${s()}.${z}.${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));
1744
1838
  }), { ...i, ...t.rules || {} };
1745
1839
  });
1746
- function O() {
1840
+ function N() {
1747
1841
  return new Promise((i) => {
1748
- const m = o.value;
1749
- if (!m || typeof m.validate != "function") {
1842
+ const h = o.value;
1843
+ if (!h || typeof h.validate != "function") {
1750
1844
  i(!0);
1751
1845
  return;
1752
1846
  }
1753
- m.validate((B) => {
1754
- i(B);
1847
+ h.validate((R) => {
1848
+ i(R);
1755
1849
  });
1756
1850
  });
1757
1851
  }
1758
- function $(i) {
1759
- var m, B;
1760
- (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);
1761
1855
  }
1762
1856
  return e({
1763
- validate: O,
1764
- clearValidate: $,
1765
- addCompetitor: U,
1857
+ validate: N,
1858
+ clearValidate: T,
1859
+ addCompetitor: G,
1766
1860
  removeCompetitor: H
1767
- }), { __sfc: !0, props: t, emit: n, formRef: o, ck: s, nk: r, showFirstColumnComputed: h, firstColumnFixed: u, actionColumnBind: C, rowKeyFn: N, tableRows: y, canDeleteCompetitor: k, cloneModel: p, ensureFixedBlock: x, emitNext: b, getFixedMetric: j, setFixedMetric: V, competitorList: f, getCompetitorName: M, setCompetitorName: R, getCompetitorMetric: q, setCompetitorMetric: w, getCellValue: K, setCellValue: A, slotUpdateHandler: T, emptyCompetitorRow: L, addCompetitor: U, removeCompetitor: H, fixedMetricProp: Q, competitorNameProp: G, competitorMetricProp: ee, cellComponent: J, cellBind: te, firstColumnScope: ne, mergedRules: _, validate: O, 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 };
1768
1862
  }
1769
1863
  });
1770
- var Lt = function() {
1864
+ var Ut = function() {
1771
1865
  var e = this, n = e._self._c, t = e._self._setupProxy;
1772
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() {
1773
1867
  return [e._t("firstColumnHeader", function() {
@@ -1775,8 +1869,8 @@ var Lt = function() {
1775
1869
  })];
1776
1870
  }, proxy: !0 }, { key: "default", fn: function(o) {
1777
1871
  return [e._t("firstColumn", function() {
1778
- 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) {
1779
- 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);
1780
1874
  } } })], 1)];
1781
1875
  }, null, t.firstColumnScope(o))];
1782
1876
  } }], null, !0) }) : e._e(), e._l(e.columns, function(o) {
@@ -1784,11 +1878,11 @@ var Lt = function() {
1784
1878
  return [e._t("header-" + o.key, function() {
1785
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) + " ")])];
1786
1880
  }, { column: o })];
1787
- }, proxy: !0 }, { key: "default", fn: function(s) {
1788
- 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) {
1789
- return t.setFixedMetric(s.row.rowKey, o.key, r);
1790
- } } }, "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) {
1791
- 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);
1792
1886
  } } }, "component", t.cellBind(o), !1))], 1)]];
1793
1887
  } }], null, !0) });
1794
1888
  }), e.showActionColumn ? n("el-table-column", e._b({ scopedSlots: e._u([{ key: "header", fn: function() {
@@ -1798,68 +1892,71 @@ var Lt = function() {
1798
1892
  })];
1799
1893
  }, proxy: !0 }, { key: "default", fn: function(o) {
1800
1894
  return [e._t("action", function() {
1801
- 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) {
1802
1896
  return t.removeCompetitor(o.row._index);
1803
1897
  } } }, [e._v(" 删除 ")]) : n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: "" } }, [e._v(" 删除 ")])];
1804
1898
  }, { row: o.row, canDelete: t.canDeleteCompetitor, addCompetitor: t.addCompetitor, removeCompetitor: t.removeCompetitor })];
1805
1899
  } }], null, !0) }, "el-table-column", t.actionColumnBind, !1)) : e._e()], 2)], 1)], 1);
1806
- }, jt = [], qt = /* @__PURE__ */ ae(
1807
- Kt,
1808
- Lt,
1809
- jt,
1900
+ }, Gt = [], Xt = /* @__PURE__ */ ae(
1901
+ Jt,
1902
+ Ut,
1903
+ Gt,
1810
1904
  !1,
1811
1905
  null,
1812
1906
  "44aa7592",
1813
1907
  null,
1814
1908
  null
1815
1909
  );
1816
- const Ge = qt.exports, Ht = [
1910
+ const Xe = Xt.exports, Zt = [
1817
1911
  { name: "ProTable", component: Le },
1818
1912
  { name: "TableAction", component: je },
1819
1913
  { name: "ProForm", component: Je },
1820
1914
  { name: "ProFormItem", component: qe },
1821
1915
  { name: "FormActions", component: He },
1822
- { name: "FormattedNumberInput", component: ke },
1916
+ { name: "FormattedNumberInput", component: Re },
1823
1917
  { name: "ProDescriptions", component: Ue },
1824
- { name: "ProTableForm", component: Ge }
1918
+ { name: "CollapseContainer", component: Ge },
1919
+ { name: "ProTableForm", component: Xe }
1825
1920
  ];
1826
- function Jt(c) {
1827
- Ht.forEach(({ name: e, component: n }) => {
1921
+ function Qt(c) {
1922
+ Zt.forEach(({ name: e, component: n }) => {
1828
1923
  c.component(e, n);
1829
1924
  });
1830
1925
  }
1831
- const Yt = {
1832
- install: Jt,
1926
+ const ln = {
1927
+ install: Qt,
1833
1928
  ProTable: Le,
1834
1929
  ProForm: Je,
1835
1930
  ProDescriptions: Ue,
1931
+ CollapseContainer: Ge,
1836
1932
  TableAction: je,
1837
- FormattedNumberInput: ke,
1838
- ProTableForm: Ge
1933
+ FormattedNumberInput: Re,
1934
+ ProTableForm: Xe
1839
1935
  };
1840
1936
  export {
1937
+ Ge as CollapseContainer,
1841
1938
  He as FormActions,
1842
- ke as FormattedNumberInput,
1939
+ Re as FormattedNumberInput,
1843
1940
  Ue as ProDescriptions,
1844
1941
  Je as ProForm,
1845
1942
  qe as ProFormItem,
1846
1943
  Le as ProTable,
1847
- Ge as ProTableForm,
1944
+ Xe as ProTableForm,
1848
1945
  je as TableAction,
1849
- dt as applyNumericInputDigitLimits,
1850
- Ee as clampByIntegerDigits,
1851
- Yt as default,
1946
+ ft as applyNumericInputDigitLimits,
1947
+ Ve as clampByIntegerDigits,
1948
+ ln as default,
1852
1949
  We as formatWithThousands,
1853
- Jt as install,
1950
+ Qt as install,
1854
1951
  Se as normalizeNumericValue,
1855
- vt as numberToEditString,
1856
- pt as roundToDecimals,
1857
- Ve as sanitizeNumericInput,
1858
- Be as stripNumberGrouping,
1859
- mt as toFixedDecimalString,
1860
- $e as useComponentSetting,
1861
- Qt as useDescription,
1862
- Zt as useForm,
1863
- 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
1864
1961
  };
1865
1962
  //# sourceMappingURL=element-component-pro.es.js.map