@aspire-ui/element-component-pro 1.0.6 → 1.0.8

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,16 +1,16 @@
1
- import { reactive as ze, defineComponent as ae, h as oe, useSlots as Pe, ref as k, computed as x, onMounted as pe, nextTick as Be, onUnmounted as xe, watch as U, unref as ue } from "vue";
2
- import { MessageBox as Ee } from "element-ui";
3
- const we = ze({});
4
- function Se() {
1
+ import { reactive as je, defineComponent as oe, h as ue, useSlots as Se, ref as k, computed as S, onMounted as ve, nextTick as Oe, onUnmounted as Fe, watch as J, unref as fe } from "vue";
2
+ import { MessageBox as qe } from "element-ui";
3
+ const we = je({});
4
+ function Re() {
5
5
  return {
6
6
  getSetting: (l) => l === void 0 ? { ...we } : { ...we[l] ?? {} },
7
7
  setSetting: (l, t) => {
8
- const a = we[l];
9
- we[l] = a ? { ...a, ...t } : { ...t };
8
+ const n = we[l];
9
+ we[l] = n ? { ...n, ...t } : { ...t };
10
10
  }
11
11
  };
12
12
  }
13
- const Ie = /* @__PURE__ */ ae({
13
+ const He = /* @__PURE__ */ oe({
14
14
  __name: "ProTable",
15
15
  props: {
16
16
  columns: null,
@@ -54,8 +54,8 @@ const Ie = /* @__PURE__ */ ae({
54
54
  load: null
55
55
  },
56
56
  emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
57
- setup(S, { expose: e, emit: l }) {
58
- const t = S, a = ae({
57
+ setup(i, { expose: e, emit: l }) {
58
+ const t = i, n = oe({
59
59
  name: "EcpProTableDefaultCellRenderer",
60
60
  props: {
61
61
  column: { type: Object, required: !0 },
@@ -65,20 +65,20 @@ const Ie = /* @__PURE__ */ ae({
65
65
  },
66
66
  setup(o) {
67
67
  return () => {
68
- var f, C;
68
+ var _, P;
69
69
  const s = o.column;
70
70
  if (s != null && s.customRender) {
71
- const I = s.customRender({ text: o.value, record: o.record, index: o.index });
72
- return typeof I == "string" || typeof I == "number" ? oe("span", String(I)) : I;
71
+ const E = s.customRender({ text: o.value, record: o.record, index: o.index });
72
+ return typeof E == "string" || typeof E == "number" ? ue("span", String(E)) : E;
73
73
  }
74
74
  if (s != null && s.valueEnum) {
75
- const I = ((C = (f = s.valueEnum) == null ? void 0 : f[o.value]) == null ? void 0 : C.text) ?? o.value;
76
- return oe("span", I == null ? "" : String(I));
75
+ const E = ((P = (_ = s.valueEnum) == null ? void 0 : _[o.value]) == null ? void 0 : P.text) ?? o.value;
76
+ return ue("span", E == null ? "" : String(E));
77
77
  }
78
- return oe("span", o.value == null ? "" : String(o.value));
78
+ return ue("span", o.value == null ? "" : String(o.value));
79
79
  };
80
80
  }
81
- }), h = ae({
81
+ }), u = oe({
82
82
  name: "EcpProTableBodyCellRenderer",
83
83
  props: {
84
84
  slotRender: { type: Function, required: !0 },
@@ -91,412 +91,430 @@ const Ie = /* @__PURE__ */ ae({
91
91
  },
92
92
  setup(o) {
93
93
  return () => {
94
- const s = o.slotRender, f = s == null ? void 0 : s({ column: o.column, record: o.record, index: o.index, value: o.value });
95
- if (((H) => H == null ? [] : Array.isArray(H) ? H.filter((ee) => ee != null && ee !== !1 && !ee.isComment) : [H])(f).length > 0)
96
- return f;
97
- const M = { ...o.column };
98
- return o.customRender && (M.customRender = o.customRender), o.valueEnum && (M.valueEnum = o.valueEnum), oe(a, { props: { column: M, record: o.record, index: o.index, value: o.value } });
94
+ const s = o.slotRender, _ = s == null ? void 0 : s({ column: o.column, record: o.record, index: o.index, value: o.value });
95
+ if (((G) => G == null ? [] : Array.isArray(G) ? G.filter((te) => te != null && te !== !1 && !te.isComment) : [G])(_).length > 0)
96
+ return _;
97
+ const I = { ...o.column };
98
+ return o.customRender && (I.customRender = o.customRender), o.valueEnum && (I.valueEnum = o.valueEnum), ue(n, { props: { column: I, record: o.record, index: o.index, value: o.value } });
99
99
  };
100
100
  }
101
- }), n = Pe(), m = k(), r = k(), y = k(0), E = k(t.loading ?? !1), c = k([]), D = k({}), b = k([]), T = k({}), _ = k([]), A = k(null), u = k({
101
+ }), a = Se(), f = k(), r = k(), C = k(0), O = k(t.loading ?? !1), v = k([]), m = k({}), d = k([]), B = k({}), y = k([]), D = k(null), z = k({
102
102
  page: 1,
103
103
  pageSize: t.pagination && typeof t.pagination == "object" ? t.pagination.pageSize ?? 10 : 10,
104
104
  pageSizes: t.pagination && typeof t.pagination == "object" ? t.pagination.pageSizes ?? [10, 20, 50, 100] : [10, 20, 50, 100],
105
105
  total: 0
106
- }), { getSetting: p } = Se(), d = x(() => ({ ...p("ProTable"), ...t, ...T.value })), O = x(() => !!d.value.title || !!n.tableTitle || !!n.toolbar), V = x(() => A.value !== null ? A.value : !!t.pagination && typeof t.pagination == "object"), $ = x(() => d.value.rowKey || "id"), q = x(() => new Set(_.value.map((o) => o[$.value]))), F = x(
107
- () => b.value.filter((o) => !o.hideInTable && !o.defaultHidden)
108
- ), L = x(() => {
109
- var s, f;
106
+ }), { getSetting: g } = Re(), h = S(() => ({ ...g("ProTable"), ...t, ...B.value })), W = S(() => !!h.value.title || !!a.tableTitle || !!a.toolbar), b = S(() => D.value !== null ? D.value : !!t.pagination && typeof t.pagination == "object"), M = S(() => h.value.rowKey || "id"), j = S(() => new Set(y.value.map((o) => o[M.value]))), F = S(
107
+ () => d.value.filter((o) => !o.hideInTable && !o.defaultHidden)
108
+ ), N = S(() => {
109
+ var s, _;
110
110
  let o = 0;
111
- return d.value.rowSelection && (o += Number(d.value.rowSelection.width) || 48), d.value.showIndexColumn && (o += Number((s = d.value.indexColumnProps) == null ? void 0 : s.width) || 60), d.value.actionColumn && (o += Number((f = d.value.actionColumn) == null ? void 0 : f.width) || 150), o;
112
- }), K = (o) => typeof o == "number" && o > 0, X = x(() => F.value.filter((s) => J(s) && K(s.width)).reduce((s, f) => s + (typeof f.width == "number" ? f.width : 0), 0)), Q = x(() => F.value.filter((s) => J(s) && typeof s.width == "string").reduce((s, f) => s + (Number(N(f)) || 80), 0)), G = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, N = (o) => {
111
+ return h.value.rowSelection && (o += Number(h.value.rowSelection.width) || 48), h.value.showIndexColumn && (o += Number((s = h.value.indexColumnProps) == null ? void 0 : s.width) || 60), h.value.actionColumn && (o += Number((_ = h.value.actionColumn) == null ? void 0 : _.width) || 150), o;
112
+ }), L = (o) => typeof o == "number" && o > 0, Z = S(() => F.value.filter((s) => Q(s) && L(s.width)).reduce((s, _) => s + (typeof _.width == "number" ? _.width : 0), 0)), ee = S(() => F.value.filter((s) => Q(s) && typeof s.width == "string").reduce((s, _) => s + (Number(q(_)) || 80), 0)), H = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, q = (o) => {
113
113
  const s = o.width;
114
- if (K(s) && X.value > 0 && y.value > 0 && typeof s == "number") {
115
- const f = y.value - L.value - Q.value;
116
- let C = Math.floor(f * s / X.value);
117
- const I = G(o.minWidth) ?? 60, M = G(o.maxWidth);
118
- return C = Math.max(I, C), M != null && (C = Math.min(M, C)), C;
114
+ if (L(s) && Z.value > 0 && C.value > 0 && typeof s == "number") {
115
+ const _ = C.value - N.value - ee.value;
116
+ let P = Math.floor(_ * s / Z.value);
117
+ const E = H(o.minWidth) ?? 60, I = H(o.maxWidth);
118
+ return P = Math.max(E, P), I != null && (P = Math.min(I, P)), P;
119
119
  }
120
120
  if (typeof s == "string") {
121
- const f = G(s) ?? 80, C = G(o.minWidth), I = G(o.maxWidth);
122
- let M = f;
123
- return C != null && (M = Math.max(C, M)), I != null && (M = Math.min(I, M)), M;
121
+ const _ = H(s) ?? 80, P = H(o.minWidth), E = H(o.maxWidth);
122
+ let I = _;
123
+ return P != null && (I = Math.max(P, I)), E != null && (I = Math.min(E, I)), I;
124
124
  }
125
125
  return o.width;
126
- }, J = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, j = x(() => {
126
+ }, Q = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, U = S(() => {
127
127
  var s;
128
- const o = (s = d.value.rowSelection) == null ? void 0 : s.getCheckboxProps;
129
- return o ? c.value.filter((f) => {
130
- var C;
131
- return !((C = o(f)) != null && C.disabled);
132
- }) : c.value;
133
- }), Z = x(() => j.value.length > 0), v = x(() => j.value.length === 0 ? !1 : j.value.every((o) => q.value.has(o[$.value]))), z = x(() => {
134
- const o = j.value.filter((s) => q.value.has(s[$.value])).length;
135
- return o > 0 && o < j.value.length;
136
- }), B = (o) => q.value.has(o[$.value]), W = (o) => {
137
- var s, f, C;
138
- return ((C = (f = (s = d.value.rowSelection) == null ? void 0 : s.getCheckboxProps) == null ? void 0 : f.call(s, o)) == null ? void 0 : C.disabled) ?? !1;
139
- }, Y = (o) => {
140
- var s, f, C;
141
- return ((C = (f = (s = d.value.rowSelection) == null ? void 0 : s.getRadioProps) == null ? void 0 : f.call(s, o)) == null ? void 0 : C.disabled) ?? !1;
142
- }, te = () => {
143
- const o = _.value.map((s) => s[$.value]);
144
- l("selection-change", { keys: o, rows: _.value });
145
- }, se = (o, s) => {
146
- const f = o[$.value];
147
- s ? _.value = [..._.value.filter((C) => C[$.value] !== f), o] : _.value = _.value.filter((C) => C[$.value] !== f), te();
148
- }, de = (o) => {
149
- _.value = [o], te();
150
- }, re = (o) => {
128
+ const o = (s = h.value.rowSelection) == null ? void 0 : s.getCheckboxProps;
129
+ return o ? v.value.filter((_) => {
130
+ var P;
131
+ return !((P = o(_)) != null && P.disabled);
132
+ }) : v.value;
133
+ }), Y = S(() => U.value.length > 0), re = S(() => U.value.length === 0 ? !1 : U.value.every((o) => j.value.has(o[M.value]))), p = S(() => {
134
+ const o = U.value.filter((s) => j.value.has(s[M.value])).length;
135
+ return o > 0 && o < U.value.length;
136
+ }), $ = (o) => j.value.has(o[M.value]), T = (o) => {
137
+ var s, _, P;
138
+ return ((P = (_ = (s = h.value.rowSelection) == null ? void 0 : s.getCheckboxProps) == null ? void 0 : _.call(s, o)) == null ? void 0 : P.disabled) ?? !1;
139
+ }, V = (o) => {
140
+ var s, _, P;
141
+ return ((P = (_ = (s = h.value.rowSelection) == null ? void 0 : s.getRadioProps) == null ? void 0 : _.call(s, o)) == null ? void 0 : P.disabled) ?? !1;
142
+ }, K = () => {
143
+ const o = y.value.map((s) => s[M.value]);
144
+ l("selection-change", { keys: o, rows: y.value });
145
+ }, X = (o, s) => {
146
+ const _ = o[M.value];
147
+ s ? y.value = [...y.value.filter((P) => P[M.value] !== _), o] : y.value = y.value.filter((P) => P[M.value] !== _), K();
148
+ }, ne = (o) => {
149
+ y.value = [o], K();
150
+ }, ae = (o) => {
151
151
  if (o) {
152
- const s = new Set(_.value.map((C) => C[$.value])), f = j.value.filter((C) => !s.has(C[$.value]));
153
- _.value = [..._.value, ...f];
152
+ const s = new Set(y.value.map((P) => P[M.value])), _ = U.value.filter((P) => !s.has(P[M.value]));
153
+ y.value = [...y.value, ..._];
154
154
  } else {
155
- const s = new Set(c.value.map((f) => f[$.value]));
156
- _.value = _.value.filter((f) => !s.has(f[$.value]));
155
+ const s = new Set(v.value.map((_) => _[M.value]));
156
+ y.value = y.value.filter((_) => !s.has(_[M.value]));
157
157
  }
158
- te();
158
+ K();
159
159
  }, le = async (o) => {
160
160
  if (!t.api) {
161
161
  if (t.dataSource)
162
162
  return;
163
- c.value = [];
163
+ v.value = [];
164
164
  return;
165
165
  }
166
- E.value = !0;
166
+ O.value = !0;
167
167
  try {
168
- const s = d.value.fetchSetting ?? {}, f = s.pageField ?? "page", C = s.sizeField ?? "pageSize", I = s.listField ?? "list", M = s.totalField ?? "total", H = {
169
- [f]: (o == null ? void 0 : o.page) ?? u.value.page,
170
- [C]: (o == null ? void 0 : o.pageSize) ?? u.value.pageSize,
168
+ const s = h.value.fetchSetting ?? {}, _ = s.pageField ?? "page", P = s.sizeField ?? "pageSize", E = s.listField ?? "list", I = s.totalField ?? "total", G = {
169
+ [_]: (o == null ? void 0 : o.page) ?? z.value.page,
170
+ [P]: (o == null ? void 0 : o.pageSize) ?? z.value.pageSize,
171
171
  ...t.searchInfo,
172
172
  ...o == null ? void 0 : o.searchInfo
173
173
  };
174
- (o == null ? void 0 : o.page) != null && (u.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (u.value.pageSize = o.pageSize);
175
- const ee = t.beforeFetch ? t.beforeFetch(H) : H, Ce = await t.api(ee);
176
- D.value = Ce || {};
177
- const ye = t.afterFetch ? t.afterFetch(Ce) : Ce, Fe = ye[I] ?? ye.items ?? ye.list ?? [], Re = ye[M] ?? 0;
178
- c.value = Fe, u.value.total = Re, l("fetch-success", { items: Fe, total: Re });
174
+ (o == null ? void 0 : o.page) != null && (z.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (z.value.pageSize = o.pageSize);
175
+ const te = t.beforeFetch ? t.beforeFetch(G) : G, Ce = await t.api(te);
176
+ m.value = Ce || {};
177
+ const ye = t.afterFetch ? t.afterFetch(Ce) : Ce, Me = ye[E] ?? ye.items ?? ye.list ?? [], Te = ye[I] ?? 0;
178
+ v.value = Me, z.value.total = Te, l("fetch-success", { items: Me, total: Te });
179
179
  } catch (s) {
180
180
  l("fetch-error", s);
181
181
  } finally {
182
- E.value = !1;
182
+ O.value = !1;
183
183
  }
184
- }, ve = () => le(void 0), me = (o) => {
185
- d.value.clearSelectOnPageChange && (_.value = []), u.value.pageSize = o, u.value.page = 1, le(void 0);
184
+ }, ie = () => le(void 0), me = (o) => {
185
+ h.value.clearSelectOnPageChange && (y.value = []), z.value.pageSize = o, z.value.page = 1, le(void 0);
186
186
  }, he = (o) => {
187
- d.value.clearSelectOnPageChange && (_.value = []), u.value.page = o, le(void 0);
188
- }, _e = (o, s, f) => l("row-click", o, f), be = (o, s, f) => l("row-dblclick", o, f), ge = ({ prop: o, order: s }) => l("sort-change", { prop: o, order: s }), fe = (o, s) => l("expand-change", o, s), ce = (o) => c.value.findIndex((s) => s[$.value] === o), ie = {
187
+ h.value.clearSelectOnPageChange && (y.value = []), z.value.page = o, le(void 0);
188
+ }, _e = (o, s, _) => l("row-click", o, _), be = (o, s, _) => l("row-dblclick", o, _), ge = ({ prop: o, order: s }) => l("sort-change", { prop: o, order: s }), pe = (o, s) => l("expand-change", o, s), de = (o) => v.value.findIndex((s) => s[M.value] === o), ce = {
189
189
  setProps: (o) => {
190
- T.value = { ...T.value, ...o };
190
+ B.value = { ...B.value, ...o };
191
191
  },
192
192
  reload: (o) => le(o),
193
193
  redoHeight: () => {
194
194
  var o, s;
195
- (s = (o = m.value) == null ? void 0 : o.doLayout) == null || s.call(o);
195
+ (s = (o = f.value) == null ? void 0 : o.doLayout) == null || s.call(o);
196
196
  },
197
197
  setLoading: (o) => {
198
- E.value = o;
198
+ O.value = o;
199
199
  },
200
- getDataSource: () => c.value,
201
- getRawDataSource: () => D.value,
200
+ getDataSource: () => v.value,
201
+ getRawDataSource: () => m.value,
202
202
  setTableData: (o) => {
203
- c.value = o ?? [];
203
+ v.value = o ?? [];
204
204
  },
205
- getColumns: () => b.value,
205
+ getColumns: () => d.value,
206
206
  setColumns: (o) => {
207
207
  if (Array.isArray(o) && o.length > 0 && typeof o[0] == "string") {
208
- const s = o, f = (t.columns ?? []).filter((I) => s.includes(I.key ?? I.dataIndex)), C = s.map((I) => f.find((M) => (M.key ?? M.dataIndex) === I)).filter(Boolean);
209
- C.length && (b.value = C);
208
+ const s = o, _ = (t.columns ?? []).filter((E) => s.includes(E.key ?? E.dataIndex)), P = s.map((E) => _.find((I) => (I.key ?? I.dataIndex) === E)).filter(Boolean);
209
+ P.length && (d.value = P);
210
210
  } else
211
- b.value = o ?? [];
211
+ d.value = o ?? [];
212
212
  },
213
213
  setPagination: (o) => {
214
- o != null && o.page && (u.value.page = o.page), o != null && o.pageSize && (u.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (u.value.total = o.total);
214
+ o != null && o.page && (z.value.page = o.page), o != null && o.pageSize && (z.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (z.value.total = o.total);
215
215
  },
216
- getSelectRowKeys: () => _.value.map((o) => o[$.value]),
217
- getSelectRows: () => _.value,
216
+ getSelectRowKeys: () => y.value.map((o) => o[M.value]),
217
+ getSelectRows: () => y.value,
218
218
  clearSelectedRowKeys: () => {
219
- _.value = [], te();
219
+ y.value = [], K();
220
220
  },
221
221
  setSelectedRowKeys: (o) => {
222
- const s = new Set(o), f = c.value.filter((C) => s.has(C[$.value]));
223
- o.forEach((C) => {
224
- f.some((I) => I[$.value] === C) || f.push({ [$.value]: C });
225
- }), _.value = f, te();
222
+ const s = new Set(o), _ = v.value.filter((P) => s.has(P[M.value]));
223
+ o.forEach((P) => {
224
+ _.some((E) => E[M.value] === P) || _.push({ [M.value]: P });
225
+ }), y.value = _, K();
226
226
  },
227
227
  deleteSelectRowByKey: (o) => {
228
- _.value = _.value.filter((s) => s[$.value] !== o), te();
228
+ y.value = y.value.filter((s) => s[M.value] !== o), K();
229
229
  },
230
- updateTableData: (o, s, f) => {
231
- o < 0 || o >= c.value.length || (c.value = [...c.value], c.value[o] = { ...c.value[o], [s]: f });
230
+ updateTableData: (o, s, _) => {
231
+ o < 0 || o >= v.value.length || (v.value = [...v.value], v.value[o] = { ...v.value[o], [s]: _ });
232
232
  },
233
233
  updateTableDataRecord: (o, s) => {
234
- const f = ce(o);
235
- if (!(f < 0))
236
- return c.value = [...c.value], c.value[f] = { ...c.value[f], ...s }, c.value[f];
234
+ const _ = de(o);
235
+ if (!(_ < 0))
236
+ return v.value = [...v.value], v.value[_] = { ...v.value[_], ...s }, v.value[_];
237
237
  },
238
238
  deleteTableDataRecord: (o) => {
239
- const s = Array.isArray(o) ? o : [o], f = new Set(s);
240
- c.value = c.value.filter((C) => !f.has(C[$.value]));
239
+ const s = Array.isArray(o) ? o : [o], _ = new Set(s);
240
+ v.value = v.value.filter((P) => !_.has(P[M.value]));
241
241
  },
242
242
  insertTableDataRecord: (o, s) => {
243
- const f = [...c.value];
244
- return s == null || s >= f.length ? f.push(o) : f.splice(s, 0, o), c.value = f, o;
243
+ const _ = [...v.value];
244
+ return s == null || s >= _.length ? _.push(o) : _.splice(s, 0, o), v.value = _, o;
245
245
  },
246
- getPaginationRef: () => V.value ? { page: u.value.page, pageSize: Number(u.value.pageSize) || 10, total: u.value.total } : !1,
247
- getShowPagination: () => V.value,
246
+ getPaginationRef: () => b.value ? { page: z.value.page, pageSize: Number(z.value.pageSize) || 10, total: z.value.total } : !1,
247
+ getShowPagination: () => b.value,
248
248
  setShowPagination: (o) => {
249
- A.value = o;
249
+ D.value = o;
250
250
  },
251
- getRowSelection: () => d.value.rowSelection,
251
+ getRowSelection: () => h.value.rowSelection,
252
252
  expandAll: () => {
253
- var C;
254
- const o = ((C = d.value.treeProps) == null ? void 0 : C.children) ?? "children", s = (I) => {
255
- const M = [];
256
- return I.forEach((H) => {
257
- M.push(H);
258
- const ee = H[o];
259
- Array.isArray(ee) && ee.length > 0 && M.push(...s(ee));
260
- }), M;
253
+ var P;
254
+ const o = ((P = h.value.treeProps) == null ? void 0 : P.children) ?? "children", s = (E) => {
255
+ const I = [];
256
+ return E.forEach((G) => {
257
+ I.push(G);
258
+ const te = G[o];
259
+ Array.isArray(te) && te.length > 0 && I.push(...s(te));
260
+ }), I;
261
261
  };
262
- s(c.value).forEach((I) => {
263
- var M, H;
264
- return (H = (M = m.value) == null ? void 0 : M.toggleRowExpansion) == null ? void 0 : H.call(M, I, !0);
262
+ s(v.value).forEach((E) => {
263
+ var I, G;
264
+ return (G = (I = f.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : G.call(I, E, !0);
265
265
  });
266
266
  },
267
267
  collapseAll: () => {
268
- var C;
269
- const o = ((C = d.value.treeProps) == null ? void 0 : C.children) ?? "children", s = (I) => {
270
- const M = [];
271
- return I.forEach((H) => {
272
- M.push(H);
273
- const ee = H[o];
274
- Array.isArray(ee) && ee.length > 0 && M.push(...s(ee));
275
- }), M;
268
+ var P;
269
+ const o = ((P = h.value.treeProps) == null ? void 0 : P.children) ?? "children", s = (E) => {
270
+ const I = [];
271
+ return E.forEach((G) => {
272
+ I.push(G);
273
+ const te = G[o];
274
+ Array.isArray(te) && te.length > 0 && I.push(...s(te));
275
+ }), I;
276
276
  };
277
- s(c.value).forEach((I) => {
278
- var M, H;
279
- return (H = (M = m.value) == null ? void 0 : M.toggleRowExpansion) == null ? void 0 : H.call(M, I, !1);
277
+ s(v.value).forEach((E) => {
278
+ var I, G;
279
+ return (G = (I = f.value) == null ? void 0 : I.toggleRowExpansion) == null ? void 0 : G.call(I, E, !1);
280
280
  });
281
281
  }
282
282
  };
283
- e(ie);
284
- const i = () => {
285
- b.value = [...t.columns ?? []];
286
- }, g = () => {
287
- t.api && d.value.immediate !== !1 ? le(void 0) : t.dataSource && (c.value = [...t.dataSource], !t.api && t.pagination !== !1 && (u.value.total = t.dataSource.length));
288
- }, P = () => {
289
- r.value && (y.value = r.value.offsetWidth || 0);
283
+ e(ce);
284
+ const c = () => {
285
+ d.value = [...t.columns ?? []];
286
+ }, w = () => {
287
+ t.api && h.value.immediate !== !1 ? le(void 0) : t.dataSource && (v.value = [...t.dataSource], !t.api && t.pagination !== !1 && (z.value.total = t.dataSource.length));
288
+ }, R = () => {
289
+ r.value && (C.value = r.value.offsetWidth || 0);
290
290
  };
291
- let R = null, w = null;
292
- return pe(() => {
293
- i(), l("register", ie), g(), typeof window < "u" && (window.addEventListener("resize", P), R = new ResizeObserver(P), Be(() => {
294
- P(), w = r.value, w && (R == null || R.observe(w));
291
+ let A = null, x = null;
292
+ return ve(() => {
293
+ c(), l("register", ce), w(), typeof window < "u" && (window.addEventListener("resize", R), A = new ResizeObserver(R), Oe(() => {
294
+ R(), x = r.value, x && (A == null || A.observe(x));
295
295
  }));
296
- }), xe(() => {
297
- typeof window < "u" && (window.removeEventListener("resize", P), R && w && (R.unobserve(w), w = null));
298
- }), U(() => t.columns, i, { deep: !0 }), U(() => t.dataSource, () => {
299
- !t.api && t.dataSource && (c.value = [...t.dataSource]);
300
- }, { deep: !0 }), U(() => t.loading, (o) => {
301
- E.value = o ?? !1;
302
- }), { __sfc: !0, DefaultCellRenderer: a, BodyCellRenderer: h, props: t, emit: l, slots: n, tableRef: m, tableWrapRef: r, containerWidth: y, loading: E, innerData: c, rawDataSource: D, innerColumns: b, innerProps: T, selectedRows: _, showPaginationRef: A, pagination: u, getComponentSetting: p, effectiveProps: d, showTitleBar: O, showPagination: V, rowKeyField: $, selectedKeysSet: q, displayColumns: F, fixedColumnsWidth: L, isRatioWidth: K, totalRatio: X, fixedDataColumnsWidth: Q, parseWidthPx: G, getColumnWidth: N, shouldShowColumn: J, selectableRows: j, hasSelectableRows: Z, isAllCurrentPageSelected: v, isIndeterminate: z, isRowSelected: B, getCheckboxDisabled: W, getRadioDisabled: Y, emitSelectionChange: te, handleCheckboxChange: se, handleRadioSelect: de, handleSelectAll: re, fetchData: le, handleReload: ve, handleSizeChange: me, handleCurrentChange: he, handleRowClick: _e, handleRowDblclick: be, handleSortChange: ge, handleExpandChange: fe, findRowIndex: ce, tableAction: ie, syncColumns: i, loadData: g, updateContainerWidth: P, resizeObserver: R, observedEl: w };
296
+ }), Fe(() => {
297
+ typeof window < "u" && (window.removeEventListener("resize", R), A && x && (A.unobserve(x), x = null));
298
+ }), J(() => t.columns, c, { deep: !0 }), J(() => t.dataSource, () => {
299
+ !t.api && t.dataSource && (v.value = [...t.dataSource]);
300
+ }, { deep: !0 }), J(() => t.loading, (o) => {
301
+ O.value = o ?? !1;
302
+ }), { __sfc: !0, DefaultCellRenderer: n, BodyCellRenderer: u, props: t, emit: l, slots: a, tableRef: f, tableWrapRef: r, containerWidth: C, loading: O, innerData: v, rawDataSource: m, innerColumns: d, innerProps: B, selectedRows: y, showPaginationRef: D, pagination: z, getComponentSetting: g, effectiveProps: h, showTitleBar: W, showPagination: b, rowKeyField: M, selectedKeysSet: j, displayColumns: F, fixedColumnsWidth: N, isRatioWidth: L, totalRatio: Z, fixedDataColumnsWidth: ee, parseWidthPx: H, getColumnWidth: q, shouldShowColumn: Q, selectableRows: U, hasSelectableRows: Y, isAllCurrentPageSelected: re, isIndeterminate: p, isRowSelected: $, getCheckboxDisabled: T, getRadioDisabled: V, emitSelectionChange: K, handleCheckboxChange: X, handleRadioSelect: ne, handleSelectAll: ae, fetchData: le, handleReload: ie, handleSizeChange: me, handleCurrentChange: he, handleRowClick: _e, handleRowDblclick: be, handleSortChange: ge, handleExpandChange: pe, findRowIndex: de, tableAction: ce, syncColumns: c, loadData: w, updateContainerWidth: R, resizeObserver: A, observedEl: x };
303
303
  }
304
304
  });
305
- function ne(S, e, l, t, a, h, n, m) {
306
- var r = typeof S == "function" ? S.options : S;
307
- e && (r.render = e, r.staticRenderFns = l, r._compiled = !0), t && (r.functional = !0), h && (r._scopeId = "data-v-" + h);
308
- var y;
309
- if (n ? (y = function(D) {
310
- D = D || // cached call
305
+ function se(i, e, l, t, n, u, a, f) {
306
+ var r = typeof i == "function" ? i.options : i;
307
+ e && (r.render = e, r.staticRenderFns = l, r._compiled = !0), t && (r.functional = !0), u && (r._scopeId = "data-v-" + u);
308
+ var C;
309
+ if (a ? (C = function(m) {
310
+ m = m || // cached call
311
311
  this.$vnode && this.$vnode.ssrContext || // stateful
312
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !D && typeof __VUE_SSR_CONTEXT__ < "u" && (D = __VUE_SSR_CONTEXT__), a && a.call(this, D), D && D._registeredComponents && D._registeredComponents.add(n);
313
- }, r._ssrRegister = y) : a && (y = m ? function() {
314
- a.call(
312
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ < "u" && (m = __VUE_SSR_CONTEXT__), n && n.call(this, m), m && m._registeredComponents && m._registeredComponents.add(a);
313
+ }, r._ssrRegister = C) : n && (C = f ? function() {
314
+ n.call(
315
315
  this,
316
316
  (r.functional ? this.parent : this).$root.$options.shadowRoot
317
317
  );
318
- } : a), y)
318
+ } : n), C)
319
319
  if (r.functional) {
320
- r._injectStyles = y;
321
- var E = r.render;
322
- r.render = function(b, T) {
323
- return y.call(T), E(b, T);
320
+ r._injectStyles = C;
321
+ var O = r.render;
322
+ r.render = function(d, B) {
323
+ return C.call(B), O(d, B);
324
324
  };
325
325
  } else {
326
- var c = r.beforeCreate;
327
- r.beforeCreate = c ? [].concat(c, y) : [y];
326
+ var v = r.beforeCreate;
327
+ r.beforeCreate = v ? [].concat(v, C) : [C];
328
328
  }
329
329
  return {
330
- exports: S,
330
+ exports: i,
331
331
  options: r
332
332
  };
333
333
  }
334
- var Oe = function() {
335
- var a, h, n, m;
334
+ var Ge = function() {
335
+ var n, u, a, f;
336
336
  var e = this, l = e._self._c, t = e._self._setupProxy;
337
- return l("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? l("div", { staticClass: "ecp-pro-table__header" }, [l("div", { staticClass: "ecp-pro-table__title-wrapper" }, [l("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? l("span", e._l(t.effectiveProps.titleHelpMessage, function(r, y) {
338
- return l("div", { key: y }, [e._v(e._s(r))]);
337
+ return l("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? l("div", { staticClass: "ecp-pro-table__header" }, [l("div", { staticClass: "ecp-pro-table__title-wrapper" }, [l("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? l("span", e._l(t.effectiveProps.titleHelpMessage, function(r, C) {
338
+ return l("div", { key: C }, [e._v(e._s(r))]);
339
339
  }), 0) : l("span", [e._v(e._s(t.effectiveProps.titleHelpMessage))])]), l("i", { staticClass: "el-icon-question" })], 2) : e._e()], 1), l("div", { staticClass: "ecp-pro-table__toolbar" }, [e._t("tableTitle"), e._t("toolbar"), e._t("toolbar-right", function() {
340
340
  var r;
341
341
  return [((r = t.effectiveProps.tableSetting) == null ? void 0 : r.redo) !== !1 ? l("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
342
342
  })], 2)]) : e._e(), l("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [l("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 ? l("el-table-column", { attrs: { width: t.effectiveProps.rowSelection.width || 48, fixed: t.effectiveProps.rowSelection.fixed, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function(r) {
343
343
  return [t.effectiveProps.rowSelection.type !== "radio" ? l("el-checkbox", { attrs: { value: t.isAllCurrentPageSelected, indeterminate: t.isIndeterminate, disabled: !t.hasSelectableRows }, on: { change: t.handleSelectAll } }) : l("span")];
344
344
  } }, { key: "default", fn: function(r) {
345
- var y;
346
- return [t.effectiveProps.rowSelection.type !== "radio" ? l("el-checkbox", { attrs: { value: t.isRowSelected(r.row), disabled: t.getCheckboxDisabled(r.row) }, on: { change: (E) => t.handleCheckboxChange(r.row, E) }, nativeOn: { click: function(E) {
347
- E.stopPropagation();
348
- } } }) : l("el-radio", { attrs: { value: (y = t.selectedRows[0]) == null ? void 0 : y[t.rowKeyField], label: r.row[t.rowKeyField], disabled: t.getRadioDisabled(r.row) }, on: { change: function(E) {
345
+ var C;
346
+ return [t.effectiveProps.rowSelection.type !== "radio" ? l("el-checkbox", { attrs: { value: t.isRowSelected(r.row), disabled: t.getCheckboxDisabled(r.row) }, on: { change: (O) => t.handleCheckboxChange(r.row, O) }, nativeOn: { click: function(O) {
347
+ O.stopPropagation();
348
+ } } }) : l("el-radio", { attrs: { value: (C = t.selectedRows[0]) == null ? void 0 : C[t.rowKeyField], label: r.row[t.rowKeyField], disabled: t.getRadioDisabled(r.row) }, on: { change: function(O) {
349
349
  return t.handleRadioSelect(r.row);
350
- } }, nativeOn: { click: function(E) {
351
- E.stopPropagation();
350
+ } }, nativeOn: { click: function(O) {
351
+ O.stopPropagation();
352
352
  } } }, [l("span")])];
353
- } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? l("el-table-column", { attrs: { type: "index", label: ((a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.title) || "序号", width: ((h = t.effectiveProps.indexColumnProps) == null ? void 0 : h.width) || 60, fixed: (n = t.effectiveProps.indexColumnProps) == null ? void 0 : n.fixed, align: ((m = t.effectiveProps.indexColumnProps) == null ? void 0 : m.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(r) {
354
- return [t.shouldShowColumn(r) ? l("el-table-column", { key: r.dataIndex || r.key || r.title, attrs: { prop: r.dataIndex, label: r.title, width: t.getColumnWidth(r), "min-width": t.isRatioWidth(r.width) ? void 0 : r.minWidth, fixed: r.fixed, align: r.align || "left", sortable: r.sortable, formatter: r.formatter, "show-overflow-tooltip": r.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(y) {
355
- return [r.dataIndex && e.$scopedSlots[`header-${r.dataIndex}`] ? e._t(`header-${r.dataIndex}`, null, { column: r }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: r }) : [l("span", [e._v(e._s(r.title))]), r.helpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(r.helpMessage) ? l("span", e._l(r.helpMessage, function(E, c) {
356
- return l("div", { key: c }, [e._v(e._s(E))]);
353
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? l("el-table-column", { attrs: { type: "index", label: ((n = t.effectiveProps.indexColumnProps) == null ? void 0 : n.title) || "序号", width: ((u = t.effectiveProps.indexColumnProps) == null ? void 0 : u.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((f = t.effectiveProps.indexColumnProps) == null ? void 0 : f.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(r) {
354
+ return [t.shouldShowColumn(r) ? l("el-table-column", { key: r.dataIndex || r.key || r.title, attrs: { prop: r.dataIndex, label: r.title, width: t.getColumnWidth(r), "min-width": t.isRatioWidth(r.width) ? void 0 : r.minWidth, fixed: r.fixed, align: r.align || "left", sortable: r.sortable, formatter: r.formatter, "show-overflow-tooltip": r.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(C) {
355
+ return [r.dataIndex && e.$scopedSlots[`header-${r.dataIndex}`] ? e._t(`header-${r.dataIndex}`, null, { column: r }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: r }) : [l("span", [e._v(e._s(r.title))]), r.helpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(r.helpMessage) ? l("span", e._l(r.helpMessage, function(O, v) {
356
+ return l("div", { key: v }, [e._v(e._s(O))]);
357
357
  }), 0) : l("span", [e._v(e._s(r.helpMessage))])]), l("i", { staticClass: "el-icon-question" })], 2) : e._e()]];
358
- } }, { key: "default", fn: function(y) {
359
- return [r.dataIndex && e.$scopedSlots[r.dataIndex] ? e._t(r.dataIndex, null, { row: y.row, column: r, index: y.$index, value: y.row[r.dataIndex] }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: r, record: y.row, index: y.$index, value: y.row[r.dataIndex], "custom-render": r.customRender, "value-enum": r.valueEnum } }) : l(t.DefaultCellRenderer, { attrs: { column: r, record: y.row, index: y.$index, value: y.row[r.dataIndex] } })];
358
+ } }, { key: "default", fn: function(C) {
359
+ return [r.dataIndex && e.$scopedSlots[r.dataIndex] ? e._t(r.dataIndex, null, { row: C.row, column: r, index: C.$index, value: C.row[r.dataIndex] }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: r, record: C.row, index: C.$index, value: C.row[r.dataIndex], "custom-render": r.customRender, "value-enum": r.valueEnum } }) : l(t.DefaultCellRenderer, { attrs: { column: r, record: C.row, index: C.$index, value: C.row[r.dataIndex] } })];
360
360
  } }], null, !0) }) : e._e()];
361
361
  }), t.effectiveProps.actionColumn ? l("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(r) {
362
362
  return [e.$scopedSlots.action ? e._t("action", null, { record: r.row, column: t.effectiveProps.actionColumn, index: r.$index }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: r.row, index: r.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
363
363
  } }], null, !0) }) : e._e()], 2)], 1), t.showPagination ? l("div", { staticClass: "ecp-pro-table__pagination" }, [l("el-pagination", e._b({ attrs: { "current-page": t.pagination.page, "page-sizes": t.pagination.pageSizes, "page-size": t.pagination.pageSize, total: t.pagination.total, 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()]);
364
- }, Ve = [], Le = /* @__PURE__ */ ne(
365
- Ie,
366
- Oe,
367
- Ve,
364
+ }, Ue = [], Je = /* @__PURE__ */ se(
365
+ He,
366
+ Ge,
367
+ Ue,
368
368
  !1,
369
369
  null,
370
370
  "c5638c20",
371
371
  null,
372
372
  null
373
373
  );
374
- const Ae = Le.exports, We = /* @__PURE__ */ ae({
374
+ const Ee = Je.exports, ke = (i) => Array.isArray(i) ? i.length > 0 : i != null && String(i).trim() !== "", De = (i) => Array.isArray(i) ? i.map((e) => String(e)).join(", ") : i == null ? "" : typeof i == "object" ? JSON.stringify(i) : String(i), Be = (i, e) => {
375
+ if (!i)
376
+ return null;
377
+ if (i === !0)
378
+ return {
379
+ content: De(e),
380
+ placement: "top",
381
+ effect: "dark",
382
+ disabled: !ke(e)
383
+ };
384
+ if (typeof i == "string")
385
+ return {
386
+ content: i,
387
+ placement: "top",
388
+ effect: "dark"
389
+ };
390
+ const l = { ...i };
391
+ return Object.prototype.hasOwnProperty.call(l, "content") || (l.content = De(e)), Object.prototype.hasOwnProperty.call(l, "placement") || (l.placement = "top"), Object.prototype.hasOwnProperty.call(l, "effect") || (l.effect = "dark"), Object.prototype.hasOwnProperty.call(l, "disabled") || (l.disabled = !ke(l.content)), l;
392
+ }, Xe = /* @__PURE__ */ oe({
375
393
  __name: "TableAction",
376
394
  props: {
377
395
  actions: { default: () => [] },
378
396
  dropDownActions: { default: () => [] },
379
397
  stopButtonPropagation: { type: Boolean, default: !1 }
380
398
  },
381
- setup(S) {
382
- const e = S, l = (b) => b ? typeof b == "string" ? { content: b } : b : {}, t = (b) => b.type ? b.type : b.color === "error" ? "danger" : b.color === "success" ? "success" : b.color === "warning" ? "warning" : "text", a = (b) => b.filter((T) => {
383
- const { ifShow: _ } = T;
384
- return typeof _ == "boolean" ? _ : typeof _ == "function" ? _(T) : !0;
385
- }), h = x(() => a(e.actions || [])), n = x(() => a(e.dropDownActions || [])), m = (b, T) => {
386
- var _;
387
- e.stopButtonPropagation && T.stopPropagation(), (_ = b.onClick) == null || _.call(b, T);
388
- }, r = (b, T) => {
389
- m(b, T);
390
- }, y = (b, T, _) => {
391
- var A, u, p, d;
392
- e.stopButtonPropagation && _.stopPropagation(), b.popConfirm && (T === "confirm" ? (u = (A = b.popConfirm).confirm) == null || u.call(A) : (d = (p = b.popConfirm).cancel) == null || d.call(p));
399
+ setup(i) {
400
+ const e = i, l = (d) => Be(d) || {}, t = (d) => d.type ? d.type : d.color === "error" ? "danger" : d.color === "success" ? "success" : d.color === "warning" ? "warning" : "text", n = (d) => d.filter((B) => {
401
+ const { ifShow: y } = B;
402
+ return typeof y == "boolean" ? y : typeof y == "function" ? y(B) : !0;
403
+ }), u = S(() => n(e.actions || [])), a = S(() => n(e.dropDownActions || [])), f = (d, B) => {
404
+ var y;
405
+ e.stopButtonPropagation && B.stopPropagation(), (y = d.onClick) == null || y.call(d, B);
406
+ }, r = (d, B) => {
407
+ f(d, B);
408
+ }, C = (d, B, y) => {
409
+ var D, z, g, h;
410
+ e.stopButtonPropagation && y.stopPropagation(), d.popConfirm && (B === "confirm" ? (z = (D = d.popConfirm).confirm) == null || z.call(D) : (h = (g = d.popConfirm).cancel) == null || h.call(g));
393
411
  };
394
- return { __sfc: !0, props: e, normalizeTooltip: l, getButtonType: t, filterVisible: a, visibleActions: h, visibleDropDownActions: n, handleClick: m, handleActionClick: r, handlePopConfirm: y, handlePopConfirmConfirm: (b, T) => {
395
- y(b, "confirm", T);
396
- }, handlePopConfirmCancel: (b, T) => {
397
- y(b, "cancel", T);
398
- }, handleDropdownCommand: (b) => {
399
- var A;
400
- const T = Number(b), _ = n.value[T];
401
- if (!(!_ || _.disabled)) {
402
- if (_.popConfirm) {
403
- const u = _.popConfirm.title, p = _.popConfirm.okText || "确定", d = _.popConfirm.cancelText || "取消";
404
- Ee.confirm(u, "提示", {
405
- confirmButtonText: p,
406
- cancelButtonText: d,
412
+ return { __sfc: !0, props: e, normalizeTooltip: l, getButtonType: t, filterVisible: n, visibleActions: u, visibleDropDownActions: a, handleClick: f, handleActionClick: r, handlePopConfirm: C, handlePopConfirmConfirm: (d, B) => {
413
+ C(d, "confirm", B);
414
+ }, handlePopConfirmCancel: (d, B) => {
415
+ C(d, "cancel", B);
416
+ }, handleDropdownCommand: (d) => {
417
+ var D;
418
+ const B = Number(d), y = a.value[B];
419
+ if (!(!y || y.disabled)) {
420
+ if (y.popConfirm) {
421
+ const z = y.popConfirm.title, g = y.popConfirm.okText || "确定", h = y.popConfirm.cancelText || "取消";
422
+ qe.confirm(z, "提示", {
423
+ confirmButtonText: g,
424
+ cancelButtonText: h,
407
425
  type: "warning"
408
426
  }).then(() => {
409
- var O, V;
410
- return (V = (O = _.popConfirm) == null ? void 0 : O.confirm) == null ? void 0 : V.call(O);
427
+ var W, b;
428
+ return (b = (W = y.popConfirm) == null ? void 0 : W.confirm) == null ? void 0 : b.call(W);
411
429
  }).catch(() => {
412
- var O, V;
413
- return (V = (O = _.popConfirm) == null ? void 0 : O.cancel) == null ? void 0 : V.call(O);
430
+ var W, b;
431
+ return (b = (W = y.popConfirm) == null ? void 0 : W.cancel) == null ? void 0 : b.call(W);
414
432
  });
415
433
  return;
416
434
  }
417
- (A = _.onClick) == null || A.call(_, {});
435
+ (D = y.onClick) == null || D.call(y, {});
418
436
  }
419
437
  } };
420
438
  }
421
439
  });
422
- var Ke = function() {
440
+ var Ze = function() {
423
441
  var e = this, l = e._self._c, t = e._self._setupProxy;
424
- return l("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(a, h) {
425
- return l("span", { key: `action-${h}`, staticClass: "ecp-table-action__item" }, [a.popConfirm ? l("el-popconfirm", { attrs: { title: a.popConfirm.title, "confirm-button-text": a.popConfirm.okText || "确定", "cancel-button-text": a.popConfirm.cancelText || "取消" }, on: { confirm: function(n) {
426
- return t.handlePopConfirmConfirm(a, n);
427
- }, cancel: function(n) {
428
- return t.handlePopConfirmCancel(a, n);
429
- } } }, [l("span", { attrs: { slot: "reference" }, slot: "reference" }, [l(a.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", a.tooltip ? t.normalizeTooltip(a.tooltip) : {}, !1), [l("el-button", e._b({ attrs: { type: t.getButtonType(a), size: "small", disabled: a.disabled }, on: { click: function(n) {
430
- return t.handleActionClick(a, n);
431
- } } }, "el-button", a.props, !1), [a.icon ? l("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), l("span", [e._v(e._s(a.label))])])], 1)], 1)]) : l(a.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", a.tooltip ? t.normalizeTooltip(a.tooltip) : {}, !1), [l("el-button", e._b({ attrs: { type: t.getButtonType(a), size: "small", disabled: a.disabled }, on: { click: function(n) {
432
- return t.handleActionClick(a, n);
433
- } } }, "el-button", a.props, !1), [a.icon ? l("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), l("span", [e._v(e._s(a.label))])])], 1), a.divider ? l("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
434
- }), t.visibleDropDownActions.length ? l("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [l("span", { staticClass: "ecp-table-action__more" }, [l("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), l("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), l("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(a, h) {
435
- return l("el-dropdown-item", { key: `dropdown-${h}`, attrs: { command: h, disabled: a.disabled, divided: !!a.divider } }, [l("span", { staticClass: "ecp-table-action__dropdown-item" }, [a.icon ? l("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), l("span", [e._v(e._s(a.label))])])]);
442
+ return l("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(n, u) {
443
+ return l("span", { key: `action-${u}`, staticClass: "ecp-table-action__item" }, [n.popConfirm ? l("el-popconfirm", { attrs: { title: n.popConfirm.title, "confirm-button-text": n.popConfirm.okText || "确定", "cancel-button-text": n.popConfirm.cancelText || "取消" }, on: { confirm: function(a) {
444
+ return t.handlePopConfirmConfirm(n, a);
445
+ }, cancel: function(a) {
446
+ return t.handlePopConfirmCancel(n, a);
447
+ } } }, [l("span", { attrs: { slot: "reference" }, slot: "reference" }, [l(n.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", n.tooltip ? t.normalizeTooltip(n.tooltip) : {}, !1), [l("el-button", e._b({ attrs: { type: t.getButtonType(n), size: "small", disabled: n.disabled }, on: { click: function(a) {
448
+ return t.handleActionClick(n, a);
449
+ } } }, "el-button", n.props, !1), [n.icon ? l("i", { class: ["ecp-table-action__icon", n.icon] }) : e._e(), l("span", [e._v(e._s(n.label))])])], 1)], 1)]) : l(n.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", n.tooltip ? t.normalizeTooltip(n.tooltip) : {}, !1), [l("el-button", e._b({ attrs: { type: t.getButtonType(n), size: "small", disabled: n.disabled }, on: { click: function(a) {
450
+ return t.handleActionClick(n, a);
451
+ } } }, "el-button", n.props, !1), [n.icon ? l("i", { class: ["ecp-table-action__icon", n.icon] }) : e._e(), l("span", [e._v(e._s(n.label))])])], 1), n.divider ? l("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
452
+ }), t.visibleDropDownActions.length ? l("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [l("span", { staticClass: "ecp-table-action__more" }, [l("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), l("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), l("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(n, u) {
453
+ return l("el-dropdown-item", { key: `dropdown-${u}`, attrs: { command: u, disabled: n.disabled, divided: !!n.divider } }, [l("span", { staticClass: "ecp-table-action__dropdown-item" }, [n.icon ? l("i", { class: ["ecp-table-action__icon", n.icon] }) : e._e(), l("span", [e._v(e._s(n.label))])])]);
436
454
  }), 1)], 1) : e._e()], 2);
437
- }, Ne = [], qe = /* @__PURE__ */ ne(
438
- We,
439
- Ke,
440
- Ne,
455
+ }, Qe = [], Ye = /* @__PURE__ */ se(
456
+ Xe,
457
+ Ze,
458
+ Qe,
441
459
  !1,
442
460
  null,
443
- "f319e73a",
461
+ "45a58e7c",
444
462
  null,
445
463
  null
446
464
  );
447
- const ke = qe.exports;
448
- function wt(S) {
449
- const e = k(null), l = () => S ? ue(S) : void 0, t = () => {
450
- const n = ue(e);
451
- if (!n)
465
+ const Ne = Ye.exports;
466
+ function Ot(i) {
467
+ const e = k(null), l = () => i ? fe(i) : void 0, t = () => {
468
+ const a = fe(e);
469
+ if (!a)
452
470
  throw new Error("ProTable instance has not been registered");
453
- return n;
454
- }, a = (n) => {
455
- e.value = n;
456
- const m = l();
457
- m && Object.keys(m).length > 0 && n.setProps(m);
471
+ return a;
472
+ }, n = (a) => {
473
+ e.value = a;
474
+ const f = l();
475
+ f && Object.keys(f).length > 0 && a.setProps(f);
458
476
  };
459
- return S && U(
477
+ return i && J(
460
478
  () => l(),
461
- (n) => {
462
- n && e.value && e.value.setProps(n);
479
+ (a) => {
480
+ a && e.value && e.value.setProps(a);
463
481
  },
464
482
  { deep: !0 }
465
- ), [a, {
466
- setProps: (n) => t().setProps(n),
467
- reload: (n) => t().reload(n),
483
+ ), [n, {
484
+ setProps: (a) => t().setProps(a),
485
+ reload: (a) => t().reload(a),
468
486
  redoHeight: () => t().redoHeight(),
469
- setLoading: (n) => t().setLoading(n),
487
+ setLoading: (a) => t().setLoading(a),
470
488
  getDataSource: () => t().getDataSource(),
471
489
  getRawDataSource: () => t().getRawDataSource(),
472
- setTableData: (n) => t().setTableData(n),
490
+ setTableData: (a) => t().setTableData(a),
473
491
  getColumns: () => t().getColumns(),
474
- setColumns: (n) => t().setColumns(n),
475
- setPagination: (n) => t().setPagination(n),
492
+ setColumns: (a) => t().setColumns(a),
493
+ setPagination: (a) => t().setPagination(a),
476
494
  getSelectRowKeys: () => t().getSelectRowKeys(),
477
495
  getSelectRows: () => t().getSelectRows(),
478
496
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
479
- setSelectedRowKeys: (n) => t().setSelectedRowKeys(n),
480
- deleteSelectRowByKey: (n) => t().deleteSelectRowByKey(n),
481
- updateTableData: (n, m, r) => t().updateTableData(n, m, r),
482
- updateTableDataRecord: (n, m) => t().updateTableDataRecord(n, m),
483
- deleteTableDataRecord: (n) => t().deleteTableDataRecord(n),
484
- insertTableDataRecord: (n, m) => t().insertTableDataRecord(n, m),
497
+ setSelectedRowKeys: (a) => t().setSelectedRowKeys(a),
498
+ deleteSelectRowByKey: (a) => t().deleteSelectRowByKey(a),
499
+ updateTableData: (a, f, r) => t().updateTableData(a, f, r),
500
+ updateTableDataRecord: (a, f) => t().updateTableDataRecord(a, f),
501
+ deleteTableDataRecord: (a) => t().deleteTableDataRecord(a),
502
+ insertTableDataRecord: (a, f) => t().insertTableDataRecord(a, f),
485
503
  getPaginationRef: () => t().getPaginationRef(),
486
504
  getShowPagination: () => t().getShowPagination(),
487
- setShowPagination: (n) => t().setShowPagination(n),
505
+ setShowPagination: (a) => t().setShowPagination(a),
488
506
  getRowSelection: () => t().getRowSelection(),
489
507
  expandAll: () => {
490
- var n, m;
491
- return (m = (n = t()).expandAll) == null ? void 0 : m.call(n);
508
+ var a, f;
509
+ return (f = (a = t()).expandAll) == null ? void 0 : f.call(a);
492
510
  },
493
511
  collapseAll: () => {
494
- var n, m;
495
- return (m = (n = t()).collapseAll) == null ? void 0 : m.call(n);
512
+ var a, f;
513
+ return (f = (a = t()).collapseAll) == null ? void 0 : f.call(a);
496
514
  }
497
515
  }];
498
516
  }
499
- const je = /* @__PURE__ */ ae({
517
+ const et = /* @__PURE__ */ oe({
500
518
  __name: "ApiSelect",
501
519
  props: {
502
520
  value: null,
@@ -512,19 +530,19 @@ const je = /* @__PURE__ */ ae({
512
530
  multiple: { type: Boolean }
513
531
  },
514
532
  emits: ["input"],
515
- setup(S) {
516
- const e = S, l = k(!1), t = k([]), a = (n) => {
517
- e.lazy && n && h();
518
- }, h = async () => {
533
+ setup(i) {
534
+ const e = i, l = k(!1), t = k([]), n = (a) => {
535
+ e.lazy && a && u();
536
+ }, u = async () => {
519
537
  if (e.api) {
520
538
  l.value = !0;
521
539
  try {
522
- const n = await e.api(e.params), m = Array.isArray(n) ? n : (n == null ? void 0 : n.list) ?? (n == null ? void 0 : n.data) ?? [], r = e.labelField ?? "label", y = e.valueField ?? "value";
523
- t.value = m.map((E) => {
524
- const c = E;
540
+ const a = await e.api(e.params), f = Array.isArray(a) ? a : (a == null ? void 0 : a.list) ?? (a == null ? void 0 : a.data) ?? [], r = e.labelField ?? "label", C = e.valueField ?? "value";
541
+ t.value = f.map((O) => {
542
+ const v = O;
525
543
  return {
526
- label: String(c[r] ?? c.label ?? ""),
527
- value: c[y] ?? c.value
544
+ label: String(v[r] ?? v.label ?? ""),
545
+ value: v[C] ?? v.value
528
546
  };
529
547
  });
530
548
  } finally {
@@ -532,37 +550,198 @@ const je = /* @__PURE__ */ ae({
532
550
  }
533
551
  }
534
552
  };
535
- return pe(() => {
536
- e.lazy || h();
537
- }), U(
553
+ return ve(() => {
554
+ e.lazy || u();
555
+ }), J(
538
556
  () => e.api,
539
557
  () => {
540
- e.lazy ? t.value = [] : h();
558
+ e.lazy ? t.value = [] : u();
541
559
  },
542
560
  { deep: !0 }
543
- ), U(() => e.params, () => {
544
- e.lazy ? t.value = [] : h();
545
- }, { deep: !0 }), { __sfc: !0, props: e, loading: l, options: t, onVisibleChange: a, fetchOptions: h };
561
+ ), J(() => e.params, () => {
562
+ e.lazy ? t.value = [] : u();
563
+ }, { deep: !0 }), { __sfc: !0, props: e, loading: l, options: t, onVisibleChange: n, fetchOptions: u };
546
564
  }
547
565
  });
548
- var He = function() {
566
+ var tt = function() {
549
567
  var e = this, l = e._self._c, t = e._self._setupProxy;
550
- return l("el-select", e._b({ attrs: { value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, on: { input: function(a) {
551
- return e.$emit("input", a);
552
- }, "visible-change": t.onVisibleChange } }, "el-select", e.$attrs, !1), e._l(t.options, function(a) {
553
- return l("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
568
+ return l("el-select", e._b({ attrs: { value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, on: { input: function(n) {
569
+ return e.$emit("input", n);
570
+ }, "visible-change": t.onVisibleChange } }, "el-select", e.$attrs, !1), e._l(t.options, function(n) {
571
+ return l("el-option", { key: String(n.value), attrs: { label: n.label, value: n.value } });
554
572
  }), 1);
555
- }, Ge = [], Ue = /* @__PURE__ */ ne(
556
- je,
557
- He,
558
- Ge,
573
+ }, lt = [], ot = /* @__PURE__ */ se(
574
+ et,
575
+ tt,
576
+ lt,
577
+ !1,
578
+ null,
579
+ null,
580
+ null,
581
+ null
582
+ );
583
+ const nt = ot.exports;
584
+ function $e(i) {
585
+ const e = i.trim();
586
+ if (!e)
587
+ return "";
588
+ let l = 0, t = "";
589
+ e[0] === "-" && (t = "-", l = 1);
590
+ let n = !1;
591
+ for (; l < e.length; l++) {
592
+ const u = e[l];
593
+ if (u >= "0" && u <= "9") {
594
+ t += u;
595
+ continue;
596
+ }
597
+ u === "." && !n && (n = !0, (t === "" || t === "-") && (t += "0"), t += ".");
598
+ }
599
+ return t;
600
+ }
601
+ function xe(i) {
602
+ return i.replace(/,/g, "").trim();
603
+ }
604
+ function at(i, e) {
605
+ const l = Math.pow(10, i) - 1;
606
+ return e <= 0 ? l : l + (1 - Math.pow(10, -e));
607
+ }
608
+ function ze(i, e, l) {
609
+ const t = at(e, l), n = i < 0 ? -1 : 1;
610
+ return Math.abs(i) <= t ? i : n * t;
611
+ }
612
+ function st(i, e, l) {
613
+ if (e <= 0)
614
+ switch (l) {
615
+ case "floor":
616
+ return Math.floor(i);
617
+ case "ceil":
618
+ return Math.ceil(i);
619
+ default:
620
+ return Math.round(i);
621
+ }
622
+ const t = Math.pow(10, e), n = i * t;
623
+ let u;
624
+ switch (l) {
625
+ case "floor":
626
+ u = Math.floor(n);
627
+ break;
628
+ case "ceil":
629
+ u = Math.ceil(n);
630
+ break;
631
+ default:
632
+ u = Math.round(n);
633
+ }
634
+ return u / t;
635
+ }
636
+ function Pe(i, e, l, t) {
637
+ let n = ze(i, e, l);
638
+ return n = st(n, l, t), n = ze(n, e, l), n;
639
+ }
640
+ function Ie(i, e) {
641
+ if (Number.isNaN(i) || !Number.isFinite(i))
642
+ return "";
643
+ const l = i.toFixed(Math.max(0, e)), t = l.startsWith("-"), n = t ? l.slice(1) : l, [u, a] = n.split("."), f = u.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
644
+ return e <= 0 || a === void 0 ? (t ? "-" : "") + f : (t ? "-" : "") + f + "." + a;
645
+ }
646
+ function rt(i, e) {
647
+ if (Number.isNaN(i) || !Number.isFinite(i))
648
+ return "";
649
+ let l = i.toFixed(Math.max(0, e));
650
+ return l = l.replace(/(\.\d*?)0+$/, "$1"), l = l.replace(/\.$/, ""), l;
651
+ }
652
+ const it = /* @__PURE__ */ oe({
653
+ __name: "FormattedNumberInput",
654
+ props: {
655
+ value: null,
656
+ placeholder: null,
657
+ disabled: { type: Boolean },
658
+ integerDigits: { default: 5 },
659
+ decimalPlaces: { default: 6 },
660
+ rounding: { default: "round" }
661
+ },
662
+ emits: ["input"],
663
+ setup(i, { emit: e }) {
664
+ const l = i, t = k(!1), n = k(""), u = () => Math.max(0, Math.floor(l.integerDigits ?? 5)), a = () => Math.max(0, Math.floor(l.decimalPlaces ?? 6));
665
+ function f(m) {
666
+ if (m == null || m === "")
667
+ return null;
668
+ if (typeof m == "number")
669
+ return Number.isFinite(m) ? m : null;
670
+ const d = xe(String(m));
671
+ if (d === "" || d === "-")
672
+ return null;
673
+ const B = Number(d);
674
+ return Number.isFinite(B) ? B : null;
675
+ }
676
+ function r() {
677
+ if (t.value)
678
+ return;
679
+ const m = f(l.value);
680
+ if (m === null) {
681
+ n.value = "";
682
+ return;
683
+ }
684
+ n.value = Ie(
685
+ Pe(m, u(), a(), l.rounding),
686
+ a()
687
+ );
688
+ }
689
+ J(
690
+ () => [l.value, l.integerDigits, l.decimalPlaces, l.rounding],
691
+ () => r(),
692
+ { immediate: !0, deep: !0 }
693
+ );
694
+ function C(m) {
695
+ const d = $e(m);
696
+ if (n.value = d, d === "" || d === "-")
697
+ return;
698
+ const B = Number(d);
699
+ Number.isFinite(B) && e("input", B);
700
+ }
701
+ function O() {
702
+ t.value = !0;
703
+ const m = xe(n.value), d = f(m === "" ? l.value : m);
704
+ if (d === null) {
705
+ n.value = "";
706
+ return;
707
+ }
708
+ n.value = rt(
709
+ Pe(d, u(), a(), l.rounding),
710
+ a()
711
+ );
712
+ }
713
+ function v() {
714
+ t.value = !1;
715
+ const m = xe(n.value);
716
+ if (m === "" || m === "-") {
717
+ n.value = "", e("input", void 0);
718
+ return;
719
+ }
720
+ const d = Number($e(m));
721
+ if (!Number.isFinite(d)) {
722
+ n.value = "", e("input", void 0);
723
+ return;
724
+ }
725
+ const B = Pe(d, u(), a(), l.rounding);
726
+ n.value = Ie(B, a()), e("input", B);
727
+ }
728
+ return { __sfc: !0, props: l, emit: e, focused: t, displayText: n, intN: u, decM: a, parseExternalToNumber: f, syncDisplayFromValue: r, onInput: C, onFocus: O, onBlur: v };
729
+ }
730
+ });
731
+ var ct = function() {
732
+ var e = this, l = e._self._c, t = e._self._setupProxy;
733
+ return l("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));
734
+ }, ut = [], dt = /* @__PURE__ */ se(
735
+ it,
736
+ ct,
737
+ ut,
559
738
  !1,
560
739
  null,
561
740
  null,
562
741
  null,
563
742
  null
564
743
  );
565
- const Xe = Ue.exports, Je = /* @__PURE__ */ ae({
744
+ const Ae = dt.exports, ft = /* @__PURE__ */ oe({
566
745
  __name: "TreeSelect",
567
746
  props: {
568
747
  value: null,
@@ -579,119 +758,120 @@ const Xe = Ue.exports, Je = /* @__PURE__ */ ae({
579
758
  clearable: { type: Boolean }
580
759
  },
581
760
  emits: ["input"],
582
- setup(S, { emit: e }) {
583
- const l = S, t = k(), a = k(), h = k(!1), n = k(!1), m = k(""), r = k([]), y = k({}), E = x(() => ({
761
+ setup(i, { emit: e }) {
762
+ const l = i, t = k(), n = k(), u = k(!1), a = k(!1), f = k(""), r = k([]), C = k({}), O = S(() => ({
584
763
  label: l.labelField,
585
764
  children: l.childrenField
586
765
  }));
587
- function c(F) {
588
- const L = l.labelField ?? "label", K = l.valueField ?? "value", X = l.childrenField ?? "children", Q = F[X], G = {};
589
- return G[l.labelField ?? "label"] = F[L] ?? F.label, G[l.valueField ?? "value"] = F[K] ?? F.value, Array.isArray(Q) && Q.length && (G[l.childrenField ?? "children"] = Q.map((N) => c(N))), G;
766
+ function v(F) {
767
+ const N = l.labelField ?? "label", L = l.valueField ?? "value", Z = l.childrenField ?? "children", ee = F[Z], H = {};
768
+ return H[l.labelField ?? "label"] = F[N] ?? F.label, H[l.valueField ?? "value"] = F[L] ?? F.value, Array.isArray(ee) && ee.length && (H[l.childrenField ?? "children"] = ee.map((q) => v(q))), H;
590
769
  }
591
- function D(F, L = "") {
592
- const K = {}, X = l.labelField ?? "label", Q = l.valueField ?? "value", G = l.childrenField ?? "children";
593
- for (const N of F) {
594
- const J = String(N[X] ?? N.label ?? ""), j = N[Q] ?? N.value;
595
- j != null && (K[String(j)] = L ? L + " / " + J : J);
596
- const Z = N[G] ?? N.children;
597
- Array.isArray(Z) && Z.length && Object.assign(K, D(Z, J));
770
+ function m(F, N = "") {
771
+ const L = {}, Z = l.labelField ?? "label", ee = l.valueField ?? "value", H = l.childrenField ?? "children";
772
+ for (const q of F) {
773
+ const Q = String(q[Z] ?? q.label ?? ""), U = q[ee] ?? q.value;
774
+ U != null && (L[String(U)] = N ? N + " / " + Q : Q);
775
+ const Y = q[H] ?? q.children;
776
+ Array.isArray(Y) && Y.length && Object.assign(L, m(Y, Q));
598
777
  }
599
- return K;
778
+ return L;
600
779
  }
601
- function b() {
780
+ function d() {
602
781
  const F = l.treeData;
603
782
  return Array.isArray(F) && F.length > 0;
604
783
  }
605
- function T(F) {
606
- r.value = F, y.value = D(F);
784
+ function B(F) {
785
+ r.value = F, C.value = m(F);
607
786
  }
608
- function _() {
787
+ function y() {
609
788
  const F = l.treeData;
610
789
  if (!Array.isArray(F) || F.length === 0)
611
790
  return;
612
- const L = F.map((K) => c(K));
613
- T(L);
791
+ const N = F.map((L) => v(L));
792
+ B(N);
614
793
  }
615
- const A = x(() => l.value == null || l.value === "" ? "" : y.value[String(l.value)] ?? String(l.value)), u = (F, L) => {
794
+ const D = S(() => l.value == null || l.value === "" ? "" : C.value[String(l.value)] ?? String(l.value)), z = (F, N) => {
616
795
  if (!F)
617
796
  return !0;
618
- const K = l.labelField ?? "label";
619
- return String(L[K] ?? L.label ?? "").toLowerCase().includes(F.toLowerCase());
797
+ const L = l.labelField ?? "label";
798
+ return String(N[L] ?? N.label ?? "").toLowerCase().includes(F.toLowerCase());
620
799
  };
621
- U(m, (F) => {
622
- var L;
623
- (L = a.value) == null || L.filter(F);
800
+ J(f, (F) => {
801
+ var N;
802
+ (N = n.value) == null || N.filter(F);
624
803
  });
625
- let p = null;
626
- function d() {
627
- l.disabled || (h.value = !0, l.lazy && !b() && q(), Be(() => {
628
- p = (F) => {
629
- t.value && !t.value.contains(F.target) && O();
630
- }, document.addEventListener("click", p);
804
+ let g = null;
805
+ function h() {
806
+ l.disabled || (u.value = !0, l.lazy && !d() && j(), Oe(() => {
807
+ g = (F) => {
808
+ t.value && !t.value.contains(F.target) && W();
809
+ }, document.addEventListener("click", g);
631
810
  }));
632
811
  }
633
- function O() {
634
- h.value = !1, m.value = "", p && (document.removeEventListener("click", p), p = null);
812
+ function W() {
813
+ u.value = !1, f.value = "", g && (document.removeEventListener("click", g), g = null);
635
814
  }
636
- function V() {
815
+ function b() {
637
816
  e("input", void 0);
638
817
  }
639
- function $(F) {
640
- const L = l.valueField ?? "value", K = F[L] ?? F.value;
641
- e("input", K), O();
818
+ function M(F) {
819
+ const N = l.valueField ?? "value", L = F[N] ?? F.value;
820
+ e("input", L), W();
642
821
  }
643
- async function q() {
644
- if (!(!l.api || b())) {
645
- n.value = !0;
822
+ async function j() {
823
+ if (!(!l.api || d())) {
824
+ a.value = !0;
646
825
  try {
647
- const F = await l.api(l.params), L = Array.isArray(F) ? F : (F == null ? void 0 : F.list) ?? (F == null ? void 0 : F.data) ?? [];
648
- r.value = L.map((K) => c(K)), y.value = D(r.value);
826
+ const F = await l.api(l.params), N = Array.isArray(F) ? F : (F == null ? void 0 : F.list) ?? (F == null ? void 0 : F.data) ?? [];
827
+ r.value = N.map((L) => v(L)), C.value = m(r.value);
649
828
  } finally {
650
- n.value = !1;
829
+ a.value = !1;
651
830
  }
652
831
  }
653
832
  }
654
- return pe(() => {
655
- b() ? _() : l.lazy || q();
656
- }), U(() => l.treeData, () => {
657
- b() ? _() : (r.value = [], y.value = {}, !l.lazy && l.api && q());
658
- }, { deep: !0 }), U(() => l.api, () => {
659
- b() || (l.lazy ? (r.value = [], y.value = {}) : q());
660
- }, { deep: !0 }), U(() => l.params, () => {
661
- b() || (l.lazy ? (r.value = [], y.value = {}) : q());
662
- }, { deep: !0 }), { __sfc: !0, props: l, emit: e, rootRef: t, treeRef: a, dropdownVisible: h, loading: n, filterText: m, treeData: r, flatLabelMap: y, treeProps: E, normalizeNode: c, buildFlatLabelMap: D, hasTreeDataProp: b, applyTreeData: T, syncFromTreeDataProp: _, displayText: A, filterNodeMethod: u, clickOutsideHandler: p, openDropdown: d, closeDropdown: O, clearValue: V, onNodeClick: $, fetchData: q };
833
+ return ve(() => {
834
+ d() ? y() : l.lazy || j();
835
+ }), J(() => l.treeData, () => {
836
+ d() ? y() : (r.value = [], C.value = {}, !l.lazy && l.api && j());
837
+ }, { deep: !0 }), J(() => l.api, () => {
838
+ d() || (l.lazy ? (r.value = [], C.value = {}) : j());
839
+ }, { deep: !0 }), J(() => l.params, () => {
840
+ d() || (l.lazy ? (r.value = [], C.value = {}) : j());
841
+ }, { deep: !0 }), { __sfc: !0, props: l, emit: e, rootRef: t, treeRef: n, dropdownVisible: u, loading: a, filterText: f, treeData: r, flatLabelMap: C, treeProps: O, normalizeNode: v, buildFlatLabelMap: m, hasTreeDataProp: d, applyTreeData: B, syncFromTreeDataProp: y, displayText: D, filterNodeMethod: z, clickOutsideHandler: g, openDropdown: h, closeDropdown: W, clearValue: b, onNodeClick: M, fetchData: j };
663
842
  }
664
843
  });
665
- var Ze = function() {
844
+ var pt = function() {
666
845
  var e = this, l = e._self._c, t = e._self._setupProxy;
667
- return l("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [l("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 } }), l("transition", { attrs: { name: "el-zoom-in-top" } }, [l("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? l("div", { staticClass: "ecp-tree-select__filter-inner" }, [l("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(a) {
668
- a.stopPropagation();
669
- } }, model: { value: t.filterText, callback: function(a) {
670
- t.filterText = a;
846
+ return l("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [l("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 } }), l("transition", { attrs: { name: "el-zoom-in-top" } }, [l("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? l("div", { staticClass: "ecp-tree-select__filter-inner" }, [l("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(n) {
847
+ n.stopPropagation();
848
+ } }, model: { value: t.filterText, callback: function(n) {
849
+ t.filterText = n;
671
850
  }, expression: "filterText" } })], 1) : e._e(), l("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 ? l("div", { staticClass: "ecp-tree-select__loading" }, [l("i", { staticClass: "el-icon-loading" }), e._v(" 加载中... ")]) : e._e()], 1)])], 1);
672
- }, Qe = [], Ye = /* @__PURE__ */ ne(
673
- Je,
674
- Ze,
675
- Qe,
851
+ }, vt = [], mt = /* @__PURE__ */ se(
852
+ ft,
853
+ pt,
854
+ vt,
676
855
  !1,
677
856
  null,
678
857
  "f30bba11",
679
858
  null,
680
859
  null
681
860
  );
682
- const et = Ye.exports, tt = /* @__PURE__ */ ae({
861
+ const ht = mt.exports, _t = /* @__PURE__ */ oe({
683
862
  __name: "ProFormItem",
684
863
  props: {
685
864
  schema: null,
686
865
  formModel: null,
687
866
  formDisabled: { type: Boolean },
688
867
  autoPlaceholder: { type: Boolean },
868
+ colon: { type: Boolean },
689
869
  formActionType: null,
690
870
  onFieldChange: null,
691
871
  customComponents: null
692
872
  },
693
- setup(S) {
694
- const e = S, l = /* @__PURE__ */ new Set([
873
+ setup(i) {
874
+ const e = i, l = /* @__PURE__ */ new Set([
695
875
  "input",
696
876
  "select",
697
877
  "api-select",
@@ -699,105 +879,112 @@ const et = Ye.exports, tt = /* @__PURE__ */ ae({
699
879
  "date-picker",
700
880
  "date-range",
701
881
  "input-number",
882
+ "formatted-number",
702
883
  "switch",
703
884
  "cascader",
704
885
  "checkbox",
705
886
  "radio"
706
- ]), t = Pe(), a = x(() => ({
887
+ ]), t = Se(), n = S(() => ({
707
888
  schema: e.schema,
708
889
  values: e.formModel,
709
890
  model: e.formModel,
710
891
  field: e.schema.field
711
- })), h = x(() => {
712
- const u = e.schema.ifShow;
713
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(a.value);
714
- }), n = x(() => {
715
- const u = e.schema.show;
716
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(a.value);
717
- }), m = x(() => {
892
+ })), u = S(() => {
893
+ const b = e.schema.ifShow;
894
+ return b === void 0 ? !0 : typeof b == "boolean" ? b : b(n.value);
895
+ }), a = S(() => {
896
+ const b = e.schema.show;
897
+ return b === void 0 ? !0 : typeof b == "boolean" ? b : b(n.value);
898
+ }), f = S(() => {
718
899
  if (e.formDisabled)
719
900
  return !0;
720
- const u = e.schema.dynamicDisabled;
721
- return u === void 0 ? !1 : typeof u == "boolean" ? u : u(a.value);
722
- }), r = x(() => {
723
- const u = e.schema.dynamicRules;
724
- return u ? Array.isArray(u) ? u : u(a.value) : e.schema.rules;
725
- }), y = x(() => {
726
- const u = e.schema.componentProps;
727
- if (!u)
901
+ const b = e.schema.dynamicDisabled;
902
+ return b === void 0 ? !1 : typeof b == "boolean" ? b : b(n.value);
903
+ }), r = S(() => {
904
+ const b = e.schema.dynamicRules;
905
+ return b ? Array.isArray(b) ? b : b(n.value) : e.schema.rules;
906
+ }), C = S(() => {
907
+ const b = e.schema.componentProps;
908
+ if (!b)
728
909
  return { props: {}, listeners: {} };
729
- const p = typeof u == "function" ? u({
730
- ...a.value,
910
+ const M = typeof b == "function" ? b({
911
+ ...n.value,
731
912
  formActionType: e.formActionType
732
- }) : { ...u }, d = {}, O = {};
733
- for (const [V, $] of Object.entries(p))
734
- if (V.length > 2 && /^on[A-Za-z]/.test(V) && typeof $ == "function") {
735
- const q = V.slice(2).charAt(0).toLowerCase() + V.slice(3);
736
- O[q] = $;
913
+ }) : { ...b }, j = {}, F = {};
914
+ for (const [N, L] of Object.entries(M))
915
+ if (N.length > 2 && /^on[A-Za-z]/.test(N) && typeof L == "function") {
916
+ const Z = N.slice(2).charAt(0).toLowerCase() + N.slice(3);
917
+ F[Z] = L;
737
918
  } else
738
- d[V] = $;
739
- return { props: d, listeners: O };
740
- }), E = x(() => y.value.props), c = x(() => y.value.listeners), D = x(() => !!t.default), b = (u) => {
741
- const p = u == null ? void 0 : u.options;
742
- return Array.isArray(p) ? p : void 0;
743
- }, T = x(() => {
744
- const u = e.schema.component;
745
- return u == null ? null : typeof u == "string" ? l.has(u) ? null : e.customComponents && e.customComponents[u] || u : u;
746
- }), _ = (u) => {
747
- var p;
748
- (p = e.onFieldChange) == null || p.call(e, e.schema.field, u);
749
- }, A = x(() => {
750
- const u = e.schema.render;
751
- return u ? {
919
+ j[N] = L;
920
+ return { props: j, listeners: F };
921
+ }), O = S(() => C.value.props), v = S(() => C.value.listeners), m = S(() => e.schema.colon ?? e.colon ?? !1), d = S(() => {
922
+ const b = e.schema.tooltip;
923
+ if (!b)
924
+ return null;
925
+ const M = typeof b == "function" ? b(n.value) : b;
926
+ return Be(M, e.formModel[e.schema.field]);
927
+ }), B = S(() => d.value ? "el-tooltip" : "span"), y = S(() => d.value || {}), D = S(() => !!t.default), z = (b) => {
928
+ const M = b == null ? void 0 : b.options;
929
+ return Array.isArray(M) ? M : void 0;
930
+ }, g = S(() => {
931
+ const b = e.schema.component;
932
+ return b == null ? null : typeof b == "string" ? l.has(b) ? null : e.customComponents && e.customComponents[b] || b : b;
933
+ }), h = (b) => {
934
+ var M;
935
+ (M = e.onFieldChange) == null || M.call(e, e.schema.field, b);
936
+ }, W = S(() => {
937
+ const b = e.schema.render;
938
+ return b ? {
752
939
  render() {
753
- const p = u(a.value);
754
- return Array.isArray(p) ? oe("span", p) : p;
940
+ const M = b(n.value);
941
+ return Array.isArray(M) ? ue("span", M) : M;
755
942
  }
756
943
  } : null;
757
944
  });
758
- return { __sfc: !0, BUILT_IN_COMPONENTS: l, props: e, slots: t, renderParams: a, shouldRender: h, shouldShow: n, effectiveDisabled: m, effectiveRules: r, effectiveComponentPropsAndListeners: y, effectiveComponentProps: E, effectiveComponentListeners: c, hasSlot: D, getOptions: b, resolvedCustomComponent: T, setFieldValue: _, renderComponent: A, ApiSelect: Xe, TreeSelect: et };
945
+ return { __sfc: !0, BUILT_IN_COMPONENTS: l, props: e, slots: t, renderParams: n, shouldRender: u, shouldShow: a, effectiveDisabled: f, effectiveRules: r, effectiveComponentPropsAndListeners: C, effectiveComponentProps: O, effectiveComponentListeners: v, showColon: m, normalizedTooltip: d, fieldWrapperComponent: B, fieldWrapperProps: y, hasSlot: D, getOptions: z, resolvedCustomComponent: g, setFieldValue: h, renderComponent: W, ApiSelect: nt, FormattedNumberInput: Ae, TreeSelect: ht };
759
946
  }
760
947
  });
761
- var lt = function() {
948
+ var bt = function() {
762
949
  var e = this, l = e._self._c, t = e._self._setupProxy;
763
- return t.shouldRender ? l("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 } }, [l("template", { slot: "label" }, [l("span", [e._v(e._s(e.schema.label))]), e.schema.helpMessage ? l("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [l("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(a, h) {
764
- return l("div", { key: h, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(a) + " ")]);
765
- }) : l("span", [e._v(e._s(e.schema.helpMessage))])], 2), l("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [l(t.renderComponent, { tag: "component" })] : t.hasSlot ? e._t("default", null, { model: e.formModel, schema: e.schema, field: e.schema.field, values: e.formModel }) : [t.resolvedCustomComponent ? l(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 ? l("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(a) {
766
- e.$set(e.formModel, e.schema.field, a);
767
- }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? l("el-input-number", e._g(e._b({ attrs: { placeholder: e.schema.placeholder, disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
768
- e.$set(e.formModel, e.schema.field, a);
769
- }, expression: "formModel[schema.field]" } }, "el-input-number", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "select" ? l("el-select", e._g(e._b({ staticClass: "ecp-pro-form-item__select", attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
770
- e.$set(e.formModel, e.schema.field, a);
771
- }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
772
- return l("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
773
- }), 1) : e.schema.component === "api-select" ? l(t.ApiSelect, e._g(e._b({ 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 } }, "ApiSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "tree-select" ? l(t.TreeSelect, e._g(e._b({ 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 } }, "TreeSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-picker" ? l("el-date-picker", 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(a) {
774
- e.$set(e.formModel, e.schema.field, a);
775
- }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-range" ? l("el-date-picker", e._g(e._b({ attrs: { type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
776
- e.$set(e.formModel, e.schema.field, a);
777
- }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "switch" ? l("el-switch", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
778
- e.$set(e.formModel, e.schema.field, a);
779
- }, expression: "formModel[schema.field]" } }, "el-switch", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "cascader" ? l("el-cascader", 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(a) {
780
- e.$set(e.formModel, e.schema.field, a);
781
- }, expression: "formModel[schema.field]" } }, "el-cascader", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "checkbox" ? l("el-checkbox-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
782
- e.$set(e.formModel, e.schema.field, a);
783
- }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
784
- return l("el-checkbox", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
785
- }), 1) : e.schema.component === "radio" ? l("el-radio-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
786
- e.$set(e.formModel, e.schema.field, a);
787
- }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
788
- return l("el-radio", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
789
- }), 1) : e._e()]], 2) : e._e();
790
- }, ot = [], at = /* @__PURE__ */ ne(
791
- tt,
792
- lt,
793
- ot,
950
+ return t.shouldRender ? l("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 } }, [l("template", { slot: "label" }, [l("span", [e._v(" " + e._s(e.schema.label)), t.showColon ? l("span", { staticClass: "ecp-pro-form-item__colon" }, [e._v(":")]) : e._e()]), e.schema.helpMessage ? l("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [l("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(n, u) {
951
+ return l("div", { key: u, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(n) + " ")]);
952
+ }) : l("span", [e._v(e._s(e.schema.helpMessage))])], 2), l("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [l(t.renderComponent, { tag: "component" })] : t.hasSlot ? e._t("default", null, { model: e.formModel, schema: e.schema, field: e.schema.field, values: e.formModel }) : [l(t.fieldWrapperComponent, e._b({ tag: "component" }, "component", t.fieldWrapperProps, !1), [t.resolvedCustomComponent ? l(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 ? l("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(n) {
953
+ e.$set(e.formModel, e.schema.field, n);
954
+ }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? l("el-input-number", e._g(e._b({ attrs: { placeholder: e.schema.placeholder, disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
955
+ e.$set(e.formModel, e.schema.field, n);
956
+ }, expression: "formModel[schema.field]" } }, "el-input-number", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "formatted-number" ? l(t.FormattedNumberInput, e._g(e._b({ 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 } }, "FormattedNumberInput", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "select" ? l("el-select", e._g(e._b({ staticClass: "ecp-pro-form-item__select", attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
957
+ e.$set(e.formModel, e.schema.field, n);
958
+ }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(n) {
959
+ return l("el-option", { key: String(n.value), attrs: { label: n.label, value: n.value } });
960
+ }), 1) : e.schema.component === "api-select" ? l(t.ApiSelect, e._g(e._b({ 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 } }, "ApiSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "tree-select" ? l(t.TreeSelect, e._g(e._b({ 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 } }, "TreeSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-picker" ? l("el-date-picker", 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(n) {
961
+ e.$set(e.formModel, e.schema.field, n);
962
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-range" ? l("el-date-picker", e._g(e._b({ attrs: { type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
963
+ e.$set(e.formModel, e.schema.field, n);
964
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "switch" ? l("el-switch", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
965
+ e.$set(e.formModel, e.schema.field, n);
966
+ }, expression: "formModel[schema.field]" } }, "el-switch", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "cascader" ? l("el-cascader", 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(n) {
967
+ e.$set(e.formModel, e.schema.field, n);
968
+ }, expression: "formModel[schema.field]" } }, "el-cascader", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "checkbox" ? l("el-checkbox-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
969
+ e.$set(e.formModel, e.schema.field, n);
970
+ }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(n) {
971
+ return l("el-checkbox", { key: String(n.value), attrs: { label: n.value } }, [e._v(" " + e._s(n.label) + " ")]);
972
+ }), 1) : e.schema.component === "radio" ? l("el-radio-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(n) {
973
+ e.$set(e.formModel, e.schema.field, n);
974
+ }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(n) {
975
+ return l("el-radio", { key: String(n.value), attrs: { label: n.value } }, [e._v(" " + e._s(n.label) + " ")]);
976
+ }), 1) : e._e()], 1)]], 2) : e._e();
977
+ }, gt = [], yt = /* @__PURE__ */ se(
978
+ _t,
979
+ bt,
980
+ gt,
794
981
  !1,
795
982
  null,
796
- "84880e9d",
983
+ "d3466c67",
797
984
  null,
798
985
  null
799
986
  );
800
- const De = at.exports, nt = /* @__PURE__ */ ae({
987
+ const Ve = yt.exports, wt = /* @__PURE__ */ oe({
801
988
  __name: "FormActions",
802
989
  props: {
803
990
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -814,28 +1001,28 @@ const De = at.exports, nt = /* @__PURE__ */ ae({
814
1001
  actionColOptions: null
815
1002
  },
816
1003
  emits: ["submit", "reset", "toggle"],
817
- setup(S) {
1004
+ setup(i) {
818
1005
  return { __sfc: !0 };
819
1006
  }
820
1007
  });
821
- var st = function() {
1008
+ var Ct = function() {
822
1009
  var e = this, l = e._self._c;
823
1010
  return e._self._setupProxy, l("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? l("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
824
1011
  return e.$emit("submit");
825
1012
  } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? l("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
826
1013
  return e.$emit("reset");
827
1014
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
828
- }, rt = [], it = /* @__PURE__ */ ne(
829
- nt,
830
- st,
831
- rt,
1015
+ }, xt = [], Pt = /* @__PURE__ */ se(
1016
+ wt,
1017
+ Ct,
1018
+ xt,
832
1019
  !1,
833
1020
  null,
834
1021
  "489c88d2",
835
1022
  null,
836
1023
  null
837
1024
  );
838
- const Te = it.exports, ct = /* @__PURE__ */ ae({
1025
+ const We = Pt.exports, St = /* @__PURE__ */ oe({
839
1026
  __name: "ProForm",
840
1027
  props: {
841
1028
  schemas: null,
@@ -843,6 +1030,7 @@ const Te = it.exports, ct = /* @__PURE__ */ ae({
843
1030
  initialValues: null,
844
1031
  labelWidth: { default: "120px" },
845
1032
  labelPosition: { default: "right" },
1033
+ colon: { type: Boolean, default: !0 },
846
1034
  gutter: { default: 24 },
847
1035
  size: { default: "medium" },
848
1036
  disabled: { type: Boolean },
@@ -867,245 +1055,245 @@ const Te = it.exports, ct = /* @__PURE__ */ ae({
867
1055
  components: null
868
1056
  },
869
1057
  emits: ["submit", "reset", "register", "update:modelValue"],
870
- setup(S, { expose: e, emit: l }) {
871
- const t = S, a = Pe(), h = k(), n = k(), m = k(!1), r = k(!0), y = k({}), E = k({}), c = k([]), D = k({}), b = { xl: 1920, lg: 1200, md: 992, sm: 768 }, T = (i, g, P) => {
872
- const R = P ?? (typeof window < "u" ? window.innerWidth : 1920), w = i ?? {}, o = g ?? {}, s = o.span ?? 8;
873
- return R >= b.xl ? w.xl ?? o.xl ?? w.lg ?? o.lg ?? w.md ?? o.md ?? w.sm ?? o.sm ?? w.xs ?? o.xs ?? w.span ?? s : R >= b.lg ? w.lg ?? o.lg ?? w.md ?? o.md ?? w.sm ?? o.sm ?? w.xs ?? o.xs ?? w.span ?? s : R >= b.md ? w.md ?? o.md ?? w.sm ?? o.sm ?? w.xs ?? o.xs ?? w.span ?? s : R >= b.sm ? w.sm ?? o.sm ?? w.xs ?? o.xs ?? w.span ?? s : w.xs ?? o.xs ?? w.span ?? s;
874
- }, { getSetting: _ } = Se(), A = x(() => ({ ..._("ProForm"), ...t, ...D.value })), u = x(() => A.value.modelValue), p = x(() => u.value !== void 0), d = x(() => p.value ? u.value ?? {} : y.value), O = x(() => ({
875
- ..._("ProForm").components ?? {},
876
- ...A.value.components ?? {},
877
- ...D.value.components ?? {}
878
- })), V = x(() => A.value.actionColOptions ?? { span: 24 }), $ = k(typeof window < "u" ? window.innerWidth : 1920), q = (i, g, P, R) => {
879
- let w = 24, o = 1, s = 0;
880
- for (const f of i) {
881
- const C = T(f.colProps, g, R);
882
- if (C > w) {
883
- if (o++, o > P)
1058
+ setup(i, { expose: e, emit: l }) {
1059
+ const t = i, n = Se(), u = k(), a = k(), f = k(!1), r = k(!0), C = k({}), O = k({}), v = k([]), m = k({}), d = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (c, w, R) => {
1060
+ const A = R ?? (typeof window < "u" ? window.innerWidth : 1920), x = c ?? {}, o = w ?? {}, s = o.span ?? 8;
1061
+ return A >= d.xl ? x.xl ?? o.xl ?? x.lg ?? o.lg ?? x.md ?? o.md ?? x.sm ?? o.sm ?? x.xs ?? o.xs ?? x.span ?? s : A >= d.lg ? x.lg ?? o.lg ?? x.md ?? o.md ?? x.sm ?? o.sm ?? x.xs ?? o.xs ?? x.span ?? s : A >= d.md ? x.md ?? o.md ?? x.sm ?? o.sm ?? x.xs ?? o.xs ?? x.span ?? s : A >= d.sm ? x.sm ?? o.sm ?? x.xs ?? o.xs ?? x.span ?? s : x.xs ?? o.xs ?? x.span ?? s;
1062
+ }, { getSetting: y } = Re(), D = S(() => ({ ...y("ProForm"), ...t, ...m.value })), z = S(() => D.value.modelValue), g = S(() => z.value !== void 0), h = S(() => g.value ? z.value ?? {} : C.value), W = S(() => ({
1063
+ ...y("ProForm").components ?? {},
1064
+ ...D.value.components ?? {},
1065
+ ...m.value.components ?? {}
1066
+ })), b = S(() => D.value.actionColOptions ?? { span: 24 }), M = k(typeof window < "u" ? window.innerWidth : 1920), j = (c, w, R, A) => {
1067
+ let x = 24, o = 1, s = 0;
1068
+ for (const _ of c) {
1069
+ const P = B(_.colProps, w, A);
1070
+ if (P > x) {
1071
+ if (o++, o > R)
884
1072
  break;
885
- w = 24 - C;
1073
+ x = 24 - P;
886
1074
  } else
887
- w -= C;
1075
+ x -= P;
888
1076
  s++;
889
1077
  }
890
1078
  return s;
891
- }, F = x(() => {
892
- const i = c.value.filter((w) => X(w));
893
- if (!A.value.showAdvancedButton)
1079
+ }, F = S(() => {
1080
+ const c = v.value.filter((x) => Z(x));
1081
+ if (!D.value.showAdvancedButton)
894
1082
  return !1;
895
- const g = A.value.alwaysShowLines ?? 1, P = A.value.baseColProps, R = q(i, P, g, $.value);
896
- return i.length > R;
897
- }), L = x(() => A.value.formListeners ?? {}), K = x(() => {
898
- const i = c.value.filter((w) => X(w));
899
- if (!A.value.showAdvancedButton || !r.value)
900
- return i;
901
- const g = A.value.alwaysShowLines ?? 1, P = A.value.baseColProps, R = q(i, P, g, $.value);
902
- return i.slice(0, R);
903
- }), X = (i) => {
904
- let g = !0, P = !0;
905
- return typeof i.ifShow == "function" && (g = i.ifShow({ schema: i, values: d.value, model: d.value, field: i.field })), typeof i.ifShow == "boolean" && (g = i.ifShow), typeof i.show == "function" && (P = i.show({ schema: i, values: d.value, model: d.value, field: i.field })), typeof i.show == "boolean" && (P = i.show), g && P;
906
- }, Q = (i) => i.colProps ?? A.value.baseColProps ?? {}, G = (i) => i.slot || i.field, N = (i, g = !0) => {
907
- const P = g ? { ...i ?? {} } : {}, R = A.value.initialValues ?? t.initialValues;
908
- return c.value.forEach((w) => {
909
- if (!(g && Object.prototype.hasOwnProperty.call(P, w.field))) {
910
- if (w.defaultValue !== void 0) {
911
- P[w.field] = w.defaultValue;
1083
+ const w = D.value.alwaysShowLines ?? 1, R = D.value.baseColProps, A = j(c, R, w, M.value);
1084
+ return c.length > A;
1085
+ }), N = S(() => D.value.formListeners ?? {}), L = S(() => {
1086
+ const c = v.value.filter((x) => Z(x));
1087
+ if (!D.value.showAdvancedButton || !r.value)
1088
+ return c;
1089
+ const w = D.value.alwaysShowLines ?? 1, R = D.value.baseColProps, A = j(c, R, w, M.value);
1090
+ return c.slice(0, A);
1091
+ }), Z = (c) => {
1092
+ let w = !0, R = !0;
1093
+ return typeof c.ifShow == "function" && (w = c.ifShow({ schema: c, values: h.value, model: h.value, field: c.field })), typeof c.ifShow == "boolean" && (w = c.ifShow), typeof c.show == "function" && (R = c.show({ schema: c, values: h.value, model: h.value, field: c.field })), typeof c.show == "boolean" && (R = c.show), w && R;
1094
+ }, ee = (c) => c.colProps ?? D.value.baseColProps ?? {}, H = (c) => c.slot || c.field, q = (c, w = !0) => {
1095
+ const R = w ? { ...c ?? {} } : {}, A = D.value.initialValues ?? t.initialValues;
1096
+ return v.value.forEach((x) => {
1097
+ if (!(w && Object.prototype.hasOwnProperty.call(R, x.field))) {
1098
+ if (x.defaultValue !== void 0) {
1099
+ R[x.field] = x.defaultValue;
912
1100
  return;
913
1101
  }
914
- R && Object.prototype.hasOwnProperty.call(R, w.field) && (P[w.field] = R[w.field]);
1102
+ A && Object.prototype.hasOwnProperty.call(A, x.field) && (R[x.field] = A[x.field]);
915
1103
  }
916
- }), P;
917
- }, J = (i, g = !0) => {
918
- y.value = i, g && l("update:modelValue", i);
919
- }, j = (i) => {
920
- const g = N({ ...d.value, ...i });
921
- return J(g), g;
922
- }, Z = () => {
923
- const i = {};
924
- c.value.forEach((g) => {
925
- var P;
926
- (P = g.rules) != null && P.length && (i[g.field] = g.rules);
927
- }), J(N(d.value), !1), E.value = i;
928
- }, v = (i) => {
929
- const g = { ...i };
930
- return c.value.forEach((P) => {
931
- const R = P.ifShow;
932
- if (R === void 0)
933
- return;
934
- (typeof R == "boolean" ? R : R({ schema: P, values: i, model: i, field: P.field })) || delete g[P.field];
935
- }), g;
936
- }, z = (i) => {
937
- const g = v(i), P = D.value.fieldMapToTime;
938
- if (!(P != null && P.length))
939
- return g;
940
- const R = { ...g };
941
- return P.forEach(([w, [o, s]]) => {
942
- const f = R[w];
943
- Array.isArray(f) && f.length === 2 && (delete R[w], R[o] = f[0], R[s] = f[1]);
944
1104
  }), R;
945
- }, B = async () => {
946
- var i;
1105
+ }, Q = (c, w = !0) => {
1106
+ C.value = c, w && l("update:modelValue", c);
1107
+ }, U = (c) => {
1108
+ const w = q({ ...h.value, ...c });
1109
+ return Q(w), w;
1110
+ }, Y = () => {
1111
+ const c = {};
1112
+ v.value.forEach((w) => {
1113
+ var R;
1114
+ (R = w.rules) != null && R.length && (c[w.field] = w.rules);
1115
+ }), Q(q(h.value), !1), O.value = c;
1116
+ }, re = (c) => {
1117
+ const w = { ...c };
1118
+ return v.value.forEach((R) => {
1119
+ const A = R.ifShow;
1120
+ if (A === void 0)
1121
+ return;
1122
+ (typeof A == "boolean" ? A : A({ schema: R, values: c, model: c, field: R.field })) || delete w[R.field];
1123
+ }), w;
1124
+ }, p = (c) => {
1125
+ const w = re(c), R = m.value.fieldMapToTime;
1126
+ if (!(R != null && R.length))
1127
+ return w;
1128
+ const A = { ...w };
1129
+ return R.forEach(([x, [o, s]]) => {
1130
+ const _ = A[x];
1131
+ Array.isArray(_) && _.length === 2 && (delete A[x], A[o] = _[0], A[s] = _[1]);
1132
+ }), A;
1133
+ }, $ = async () => {
1134
+ var c;
947
1135
  try {
948
- await ((i = h.value) == null ? void 0 : i.validate()), A.value.submitFunc ? await A.value.submitFunc() : (m.value = !0, l("submit", z({ ...d.value })));
949
- } catch (g) {
950
- console.error("Form validation failed:", g);
1136
+ await ((c = u.value) == null ? void 0 : c.validate()), D.value.submitFunc ? await D.value.submitFunc() : (f.value = !0, l("submit", p({ ...h.value })));
1137
+ } catch (w) {
1138
+ console.error("Form validation failed:", w);
951
1139
  } finally {
952
- m.value = !1;
1140
+ f.value = !1;
953
1141
  }
954
- }, W = async () => {
955
- var i;
956
- A.value.resetFunc ? await A.value.resetFunc() : ((i = h.value) == null || i.resetFields(), Z(), l("reset"), A.value.submitOnReset && await B());
957
- }, Y = (i) => (j(i), Promise.resolve()), te = () => z({ ...d.value }), se = async () => {
958
- var i;
959
- (i = h.value) == null || i.resetFields(), J(N(void 0, !1));
960
- }, de = (i, g) => {
961
- j({ [i]: g });
962
- }, re = (i) => {
963
- var g;
964
- return ((g = h.value) == null ? void 0 : g.validate(i)) ?? Promise.resolve();
965
- }, le = (i) => h.value ? i != null && i.length ? Promise.all(i.map((g) => new Promise((P, R) => {
966
- h.value.validateField(g, (w) => w ? P(void 0) : R(new Error("Validation failed")));
967
- }))) : h.value.validate() : Promise.resolve(), ve = async (i, g) => {
968
- var R;
969
- const P = (R = n.value) == null ? void 0 : R.querySelector(`[data-field="${i}"]`);
970
- return P && P.scrollIntoView({ behavior: (g == null ? void 0 : g.behavior) ?? "smooth", block: (g == null ? void 0 : g.block) ?? "nearest" }), Promise.resolve();
971
- }, me = (i) => {
972
- var g;
973
- (g = h.value) == null || g.clearValidate(i);
974
- }, he = async (i) => {
975
- (Array.isArray(i) ? i : [i]).forEach((P) => {
976
- const R = c.value.findIndex((w) => w.field === P.field);
977
- R >= 0 && (c.value[R] = { ...c.value[R], ...P });
1142
+ }, T = async () => {
1143
+ var c;
1144
+ D.value.resetFunc ? await D.value.resetFunc() : ((c = u.value) == null || c.resetFields(), Y(), l("reset"), D.value.submitOnReset && await $());
1145
+ }, V = (c) => (U(c), Promise.resolve()), K = () => p({ ...h.value }), X = async () => {
1146
+ var c;
1147
+ (c = u.value) == null || c.resetFields(), Q(q(void 0, !1));
1148
+ }, ne = (c, w) => {
1149
+ U({ [c]: w });
1150
+ }, ae = (c) => {
1151
+ var w;
1152
+ return ((w = u.value) == null ? void 0 : w.validate(c)) ?? Promise.resolve();
1153
+ }, le = (c) => u.value ? c != null && c.length ? Promise.all(c.map((w) => new Promise((R, A) => {
1154
+ u.value.validateField(w, (x) => x ? R(void 0) : A(new Error("Validation failed")));
1155
+ }))) : u.value.validate() : Promise.resolve(), ie = async (c, w) => {
1156
+ var A;
1157
+ const R = (A = a.value) == null ? void 0 : A.querySelector(`[data-field="${c}"]`);
1158
+ return R && R.scrollIntoView({ behavior: (w == null ? void 0 : w.behavior) ?? "smooth", block: (w == null ? void 0 : w.block) ?? "nearest" }), Promise.resolve();
1159
+ }, me = (c) => {
1160
+ var w;
1161
+ (w = u.value) == null || w.clearValidate(c);
1162
+ }, he = async (c) => {
1163
+ (Array.isArray(c) ? c : [c]).forEach((R) => {
1164
+ const A = v.value.findIndex((x) => x.field === R.field);
1165
+ A >= 0 && (v.value[A] = { ...v.value[A], ...R });
978
1166
  });
979
- }, _e = async (i, g, P) => {
980
- if (P)
981
- c.value.unshift(i);
982
- else if (g) {
983
- const R = c.value.findIndex((w) => w.field === g);
984
- c.value.splice(R + 1, 0, i);
1167
+ }, _e = async (c, w, R) => {
1168
+ if (R)
1169
+ v.value.unshift(c);
1170
+ else if (w) {
1171
+ const A = v.value.findIndex((x) => x.field === w);
1172
+ v.value.splice(A + 1, 0, c);
985
1173
  } else
986
- c.value.push(i);
987
- Z();
988
- }, be = async (i) => {
989
- const g = Array.isArray(i) ? i : [i];
990
- c.value = c.value.filter((P) => !g.includes(P.field));
991
- }, ge = async (i) => {
992
- D.value = { ...D.value, ...i }, i.schemas && (c.value = [...i.schemas], Z());
993
- }, fe = {
994
- getFieldsValue: te,
995
- setFieldsValue: Y,
996
- resetFields: se,
997
- validate: re,
1174
+ v.value.push(c);
1175
+ Y();
1176
+ }, be = async (c) => {
1177
+ const w = Array.isArray(c) ? c : [c];
1178
+ v.value = v.value.filter((R) => !w.includes(R.field));
1179
+ }, ge = async (c) => {
1180
+ m.value = { ...m.value, ...c }, c.schemas && (v.value = [...c.schemas], Y());
1181
+ }, pe = {
1182
+ getFieldsValue: K,
1183
+ setFieldsValue: V,
1184
+ resetFields: X,
1185
+ validate: ae,
998
1186
  validateFields: le,
999
- submit: B,
1000
- scrollToField: ve,
1187
+ submit: $,
1188
+ scrollToField: ie,
1001
1189
  clearValidate: me,
1002
1190
  updateSchema: he,
1003
1191
  appendSchemaByField: _e,
1004
1192
  removeSchemaByField: be,
1005
1193
  setProps: ge
1006
1194
  };
1007
- e(fe);
1008
- const ce = () => {
1009
- c.value = [...t.schemas ?? []], Z();
1010
- }, ie = () => {
1011
- typeof window < "u" && ($.value = window.innerWidth);
1195
+ e(pe);
1196
+ const de = () => {
1197
+ v.value = [...t.schemas ?? []], Y();
1198
+ }, ce = () => {
1199
+ typeof window < "u" && (M.value = window.innerWidth);
1012
1200
  };
1013
- return pe(() => {
1014
- ce(), l("register", fe), typeof window < "u" && window.addEventListener("resize", ie);
1015
- }), xe(() => {
1016
- typeof window < "u" && window.removeEventListener("resize", ie);
1017
- }), U(() => u.value, (i) => {
1018
- !p.value || i === void 0 || J(N(i), !1);
1019
- }, { deep: !0, immediate: !0 }), U(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: l, slots: a, formRef: h, formWrapRef: n, submitLoading: m, collapsed: r, formModel: y, formRules: E, innerSchemas: c, innerProps: D, BREAKPOINTS: b, getEffectiveSpan: T, getComponentSetting: _, effectiveProps: A, controlledModelValue: u, isControlled: p, currentFormModel: d, formCustomComponents: O, effectiveActionColOptions: V, windowWidth: $, getVisibleSchemaCount: q, hasMoreFields: F, formListeners: L, displaySchemas: K, shouldShow: X, getColProps: Q, getSlotName: G, resolveSchemaModel: N, applyFormModel: J, updateFormModel: j, initForm: Z, filterByIfShow: v, processFieldMapToTime: z, handleSubmit: B, handleReset: W, setFieldsValue: Y, getFieldsValue: te, resetFields: se, handleFieldChange: de, validate: re, validateFields: le, scrollToField: ve, clearValidate: me, updateSchema: he, appendSchemaByField: _e, removeSchemaByField: be, setProps: ge, formActionRef: fe, syncSchemas: ce, handleResize: ie, ProFormItem: De, FormActions: Te };
1201
+ return ve(() => {
1202
+ de(), l("register", pe), typeof window < "u" && window.addEventListener("resize", ce);
1203
+ }), Fe(() => {
1204
+ typeof window < "u" && window.removeEventListener("resize", ce);
1205
+ }), J(() => z.value, (c) => {
1206
+ !g.value || c === void 0 || Q(q(c), !1);
1207
+ }, { deep: !0, immediate: !0 }), J(() => [t.schemas, t.initialValues], de, { deep: !0 }), { __sfc: !0, props: t, emit: l, slots: n, formRef: u, formWrapRef: a, submitLoading: f, collapsed: r, formModel: C, formRules: O, innerSchemas: v, innerProps: m, BREAKPOINTS: d, getEffectiveSpan: B, getComponentSetting: y, effectiveProps: D, controlledModelValue: z, isControlled: g, currentFormModel: h, formCustomComponents: W, effectiveActionColOptions: b, windowWidth: M, getVisibleSchemaCount: j, hasMoreFields: F, formListeners: N, displaySchemas: L, shouldShow: Z, getColProps: ee, getSlotName: H, resolveSchemaModel: q, applyFormModel: Q, updateFormModel: U, initForm: Y, filterByIfShow: re, processFieldMapToTime: p, handleSubmit: $, handleReset: T, setFieldsValue: V, getFieldsValue: K, resetFields: X, handleFieldChange: ne, validate: ae, validateFields: le, scrollToField: ie, clearValidate: me, updateSchema: he, appendSchemaByField: _e, removeSchemaByField: be, setProps: ge, formActionRef: pe, syncSchemas: de, handleResize: ce, ProFormItem: Ve, FormActions: We };
1020
1208
  }
1021
1209
  });
1022
- var ut = function() {
1210
+ var Ft = function() {
1023
1211
  var e = this, l = e._self._c, t = e._self._setupProxy;
1024
- return l("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [l("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"), l("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(a) {
1025
- var h, n;
1026
- return [t.shouldShow(a) ? l("el-col", e._b({ key: a.field, attrs: { offset: ((h = a.colProps) == null ? void 0 : h.offset) ?? ((n = t.effectiveProps.baseColProps) == null ? void 0 : n.offset) ?? 0, "data-field": a.field } }, "el-col", t.getColProps(a), !1), [l(t.ProFormItem, { attrs: { schema: a, "form-model": t.currentFormModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, "custom-components": t.formCustomComponents, "on-field-change": t.handleFieldChange } }, [t.slots[t.getSlotName(a)] ? [e._t(t.getSlotName(a), null, { model: t.currentFormModel, schema: a, field: a.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1027
- }), t.effectiveProps.showActionButtonGroup ? l("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [l(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(a) {
1212
+ return l("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [l("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"), l("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(n) {
1213
+ var u, a;
1214
+ return [t.shouldShow(n) ? l("el-col", e._b({ key: n.field, attrs: { offset: ((u = n.colProps) == null ? void 0 : u.offset) ?? ((a = t.effectiveProps.baseColProps) == null ? void 0 : a.offset) ?? 0, "data-field": n.field } }, "el-col", t.getColProps(n), !1), [l(t.ProFormItem, { attrs: { schema: n, "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 } }, [t.slots[t.getSlotName(n)] ? [e._t(t.getSlotName(n), null, { model: t.currentFormModel, schema: n, field: n.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1215
+ }), t.effectiveProps.showActionButtonGroup ? l("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [l(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(n) {
1028
1216
  t.collapsed = !t.collapsed;
1029
- } } }, [l("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), l("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), l("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), l("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), l("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? l("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(a) {
1217
+ } } }, [l("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), l("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), l("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), l("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), l("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? l("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(n) {
1030
1218
  t.collapsed = !t.collapsed;
1031
1219
  } } }, [l("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);
1032
- }, dt = [], ft = /* @__PURE__ */ ne(
1033
- ct,
1034
- ut,
1035
- dt,
1220
+ }, Rt = [], Bt = /* @__PURE__ */ se(
1221
+ St,
1222
+ Ft,
1223
+ Rt,
1036
1224
  !1,
1037
1225
  null,
1038
- "6171d80d",
1226
+ "bf70afca",
1039
1227
  null,
1040
1228
  null
1041
1229
  );
1042
- const Me = ft.exports;
1043
- function Ct(S) {
1044
- const e = k(null), l = k(S ? ue(S) : void 0), t = () => S ? ue(S) : void 0, a = (p) => {
1045
- e.value = p;
1046
- const d = t();
1047
- d && Object.keys(d).length > 0 && p.setProps(d);
1230
+ const Le = Bt.exports;
1231
+ function Et(i) {
1232
+ const e = k(null), l = k(i ? fe(i) : void 0), t = () => i ? fe(i) : void 0, n = (g) => {
1233
+ e.value = g;
1234
+ const h = t();
1235
+ h && Object.keys(h).length > 0 && g.setProps(h);
1048
1236
  };
1049
- return S && U(
1237
+ return i && J(
1050
1238
  () => t(),
1051
- (p) => {
1052
- l.value = p, p && e.value && e.value.setProps(p);
1239
+ (g) => {
1240
+ l.value = g, g && e.value && e.value.setProps(g);
1053
1241
  },
1054
1242
  { deep: !0 }
1055
- ), [a, {
1056
- register: a,
1243
+ ), [n, {
1244
+ register: n,
1057
1245
  formAction: e,
1058
1246
  getFieldsValue: () => {
1059
- var p;
1060
- return ((p = e.value) == null ? void 0 : p.getFieldsValue()) ?? {};
1247
+ var g;
1248
+ return ((g = e.value) == null ? void 0 : g.getFieldsValue()) ?? {};
1061
1249
  },
1062
- setFieldsValue: async (p) => {
1063
- var d;
1064
- await ((d = e.value) == null ? void 0 : d.setFieldsValue(p));
1250
+ setFieldsValue: async (g) => {
1251
+ var h;
1252
+ await ((h = e.value) == null ? void 0 : h.setFieldsValue(g));
1065
1253
  },
1066
1254
  resetFields: async () => {
1067
- var p;
1068
- await ((p = e.value) == null ? void 0 : p.resetFields());
1255
+ var g;
1256
+ await ((g = e.value) == null ? void 0 : g.resetFields());
1069
1257
  },
1070
- validate: (p) => {
1071
- var d;
1072
- return ((d = e.value) == null ? void 0 : d.validate(p)) ?? Promise.resolve();
1258
+ validate: (g) => {
1259
+ var h;
1260
+ return ((h = e.value) == null ? void 0 : h.validate(g)) ?? Promise.resolve();
1073
1261
  },
1074
- validateFields: (p) => {
1075
- var d;
1076
- return ((d = e.value) == null ? void 0 : d.validateFields(p)) ?? Promise.resolve();
1262
+ validateFields: (g) => {
1263
+ var h;
1264
+ return ((h = e.value) == null ? void 0 : h.validateFields(g)) ?? Promise.resolve();
1077
1265
  },
1078
1266
  submit: () => {
1079
- var p;
1080
- return ((p = e.value) == null ? void 0 : p.submit()) ?? Promise.resolve();
1267
+ var g;
1268
+ return ((g = e.value) == null ? void 0 : g.submit()) ?? Promise.resolve();
1081
1269
  },
1082
- scrollToField: (p, d) => {
1083
- var O;
1084
- return ((O = e.value) == null ? void 0 : O.scrollToField(p, d)) ?? Promise.resolve();
1270
+ scrollToField: (g, h) => {
1271
+ var W;
1272
+ return ((W = e.value) == null ? void 0 : W.scrollToField(g, h)) ?? Promise.resolve();
1085
1273
  },
1086
- clearValidate: (p) => {
1087
- var d;
1088
- (d = e.value) == null || d.clearValidate(p);
1274
+ clearValidate: (g) => {
1275
+ var h;
1276
+ (h = e.value) == null || h.clearValidate(g);
1089
1277
  },
1090
- updateSchema: (p) => {
1091
- var d;
1092
- return ((d = e.value) == null ? void 0 : d.updateSchema(p)) ?? Promise.resolve();
1278
+ updateSchema: (g) => {
1279
+ var h;
1280
+ return ((h = e.value) == null ? void 0 : h.updateSchema(g)) ?? Promise.resolve();
1093
1281
  },
1094
- appendSchemaByField: (p, d, O) => {
1095
- var V;
1096
- return ((V = e.value) == null ? void 0 : V.appendSchemaByField(p, d, O)) ?? Promise.resolve();
1282
+ appendSchemaByField: (g, h, W) => {
1283
+ var b;
1284
+ return ((b = e.value) == null ? void 0 : b.appendSchemaByField(g, h, W)) ?? Promise.resolve();
1097
1285
  },
1098
- removeSchemaByField: (p) => {
1099
- var d;
1100
- return ((d = e.value) == null ? void 0 : d.removeSchemaByField(p)) ?? Promise.resolve();
1286
+ removeSchemaByField: (g) => {
1287
+ var h;
1288
+ return ((h = e.value) == null ? void 0 : h.removeSchemaByField(g)) ?? Promise.resolve();
1101
1289
  },
1102
- setProps: async (p) => {
1103
- var d;
1104
- l.value = { ...l.value, ...p }, await ((d = e.value) == null ? void 0 : d.setProps(p));
1290
+ setProps: async (g) => {
1291
+ var h;
1292
+ l.value = { ...l.value, ...g }, await ((h = e.value) == null ? void 0 : h.setProps(g));
1105
1293
  }
1106
1294
  }];
1107
1295
  }
1108
- const pt = /* @__PURE__ */ ae({
1296
+ const At = /* @__PURE__ */ oe({
1109
1297
  __name: "ProDescriptions",
1110
1298
  props: {
1111
1299
  title: null,
@@ -1120,8 +1308,8 @@ const pt = /* @__PURE__ */ ae({
1120
1308
  collapseOptions: { default: () => ({ canExpand: !1, defaultExpand: !0, expandButtonText: "展开", collapseButtonText: "收起", visibleRows: 1 }) }
1121
1309
  },
1122
1310
  emits: ["register"],
1123
- setup(S, { expose: e, emit: l }) {
1124
- const t = S, a = k({}), h = k({}), n = k([]), m = k(typeof window < "u" ? window.innerWidth : 1920), r = k(!0), y = ae({
1311
+ setup(i, { expose: e, emit: l }) {
1312
+ const t = i, n = k({}), u = k({}), a = k([]), f = k(typeof window < "u" ? window.innerWidth : 1920), r = k(!0), C = oe({
1125
1313
  name: "EcpDescriptionValueRenderer",
1126
1314
  props: {
1127
1315
  schema: { type: Object, required: !0 },
@@ -1129,173 +1317,192 @@ const pt = /* @__PURE__ */ ae({
1129
1317
  record: { type: Object, required: !0 },
1130
1318
  emptyText: { type: String, default: "-" }
1131
1319
  },
1132
- setup(v) {
1320
+ setup(p) {
1133
1321
  return () => {
1134
- const z = v.schema, B = v.record, W = v.value;
1135
- if (z.render) {
1136
- const Y = z.render(W, B);
1137
- return Y == null || Y === "" ? oe("span", v.emptyText) : typeof Y == "string" || typeof Y == "number" ? oe("span", String(Y)) : Y;
1322
+ const $ = p.schema, T = p.record, V = p.value, K = (X) => {
1323
+ const ne = O($, X === p.emptyText ? V : X, T), ae = ue("span", X);
1324
+ return ne ? ue("el-tooltip", { props: ne }, [ae]) : ae;
1325
+ };
1326
+ if ($.render) {
1327
+ const X = $.render(V, T);
1328
+ return X == null || X === "" ? K(p.emptyText) : typeof X == "string" || typeof X == "number" ? K(String(X)) : X;
1138
1329
  }
1139
- return Array.isArray(W) ? oe("span", W.length ? W.join(", ") : v.emptyText) : W == null || W === "" ? oe("span", v.emptyText) : typeof W == "object" ? oe("span", JSON.stringify(W)) : oe("span", String(W));
1330
+ return Array.isArray(V) ? K(V.length ? V.join(", ") : p.emptyText) : V == null || V === "" ? K(p.emptyText) : K(typeof V == "object" ? JSON.stringify(V) : String(V));
1140
1331
  };
1141
1332
  }
1142
- }), { getSetting: E } = Se(), c = x(() => ({ ...E("ProDescriptions"), ...t, ...a.value })), D = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, b = (v, z) => {
1143
- if (typeof v == "number")
1144
- return Math.max(1, v);
1145
- const B = v ?? {};
1146
- return z >= D.xxl ? B.xxl ?? B.xl ?? B.lg ?? B.md ?? B.sm ?? B.xs ?? 3 : z >= D.xl ? B.xl ?? B.lg ?? B.md ?? B.sm ?? B.xs ?? 3 : z >= D.lg ? B.lg ?? B.md ?? B.sm ?? B.xs ?? 3 : z >= D.md ? B.md ?? B.sm ?? B.xs ?? 3 : z >= D.sm ? B.sm ?? B.xs ?? 2 : B.xs ?? 1;
1147
- }, T = x(() => b(c.value.column, m.value)), _ = x(() => c.value.data ?? h.value ?? {}), A = x(() => (n.value.length ? n.value : c.value.schema ?? []).filter((v) => v.dataIndex || v.field ? typeof v.show == "function" ? v.show(_.value) : v.show !== !1 : !1).map((v) => ({
1148
- ...v,
1149
- dataIndex: v.dataIndex || v.field || ""
1150
- }))), u = x(() => {
1151
- const v = [];
1152
- let z = { items: [] }, B = 0;
1153
- const W = T.value;
1154
- return A.value.forEach((Y, te) => {
1155
- const se = A.value.length - te, de = Math.max(1, Math.min(Y.span ?? 1, W)), re = se === 1 ? W - B || W : de;
1156
- B + re > W && (v.push(z), z = { items: [] }, B = 0);
1157
- const le = se === 1 && B < W ? Math.max(1, W - B) : re;
1158
- z.items.push({ ...Y, _span: le }), B += le, B >= W && (v.push(z), z = { items: [] }, B = 0);
1159
- }), z.items.length > 0 && v.push(z), v;
1160
- }), p = x(() => {
1161
- var z;
1162
- if (!d.value || r.value)
1163
- return u.value;
1164
- const v = Math.max(1, ((z = c.value.collapseOptions) == null ? void 0 : z.visibleRows) ?? 1);
1165
- return u.value.slice(0, v);
1166
- }), d = x(() => {
1167
- var z, B;
1168
- const v = Math.max(1, ((z = c.value.collapseOptions) == null ? void 0 : z.visibleRows) ?? 1);
1169
- return !!c.value.useCollapse && !!((B = c.value.collapseOptions) != null && B.canExpand) && u.value.length > v;
1170
- }), O = x(() => !!c.value.title || !!c.value.helpMessage || d.value), V = x(() => {
1171
- var v, z;
1333
+ }), O = (p, $, T) => {
1334
+ const V = p.tooltip;
1335
+ if (!V)
1336
+ return null;
1337
+ const K = typeof V == "function" ? V({ value: $, record: T, schema: p }) : V;
1338
+ return Be(K, $);
1339
+ }, { getSetting: v } = Re(), m = S(() => ({ ...v("ProDescriptions"), ...t, ...n.value })), d = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, B = (p, $) => {
1340
+ if (typeof p == "number")
1341
+ return Math.max(1, p);
1342
+ const T = p ?? {};
1343
+ return $ >= d.xxl ? T.xxl ?? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : $ >= d.xl ? T.xl ?? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : $ >= d.lg ? T.lg ?? T.md ?? T.sm ?? T.xs ?? 3 : $ >= d.md ? T.md ?? T.sm ?? T.xs ?? 3 : $ >= d.sm ? T.sm ?? T.xs ?? 2 : T.xs ?? 1;
1344
+ }, y = S(() => B(m.value.column, f.value)), D = S(() => m.value.data ?? u.value ?? {}), z = S(() => (a.value.length ? a.value : m.value.schema ?? []).filter((p) => p.dataIndex || p.field ? typeof p.show == "function" ? p.show(D.value) : p.show !== !1 : !1).map((p) => ({
1345
+ ...p,
1346
+ dataIndex: p.dataIndex || p.field || ""
1347
+ }))), g = S(() => {
1348
+ const p = [];
1349
+ let $ = { items: [] }, T = 0;
1350
+ const V = y.value;
1351
+ return z.value.forEach((K, X) => {
1352
+ const ne = z.value.length - X, ae = Math.max(1, Math.min(K.span ?? 1, V)), le = ne === 1 ? V - T || V : ae;
1353
+ T + le > V && (p.push($), $ = { items: [] }, T = 0);
1354
+ const ie = ne === 1 && T < V ? Math.max(1, V - T) : le;
1355
+ $.items.push({ ...K, _span: ie }), T += ie, T >= V && (p.push($), $ = { items: [] }, T = 0);
1356
+ }), $.items.length > 0 && p.push($), p;
1357
+ }), h = S(() => {
1358
+ var $;
1359
+ if (!W.value || r.value)
1360
+ return g.value;
1361
+ const p = Math.max(1, (($ = m.value.collapseOptions) == null ? void 0 : $.visibleRows) ?? 1);
1362
+ return g.value.slice(0, p);
1363
+ }), W = S(() => {
1364
+ var $, T;
1365
+ const p = Math.max(1, (($ = m.value.collapseOptions) == null ? void 0 : $.visibleRows) ?? 1);
1366
+ return !!m.value.useCollapse && !!((T = m.value.collapseOptions) != null && T.canExpand) && g.value.length > p;
1367
+ }), b = S(() => !!m.value.title || !!m.value.helpMessage || W.value), M = S(() => {
1368
+ var p, $;
1172
1369
  return {
1173
- expand: ((v = c.value.collapseOptions) == null ? void 0 : v.expandButtonText) ?? "展开",
1174
- collapse: ((z = c.value.collapseOptions) == null ? void 0 : z.collapseButtonText) ?? "收起"
1370
+ expand: ((p = m.value.collapseOptions) == null ? void 0 : p.expandButtonText) ?? "展开",
1371
+ collapse: (($ = m.value.collapseOptions) == null ? void 0 : $.collapseButtonText) ?? "收起"
1175
1372
  };
1176
- }), $ = x(() => ({
1177
- gridTemplateColumns: `repeat(${T.value}, minmax(0, 1fr))`
1178
- })), q = (v) => ({
1179
- gridColumn: `span ${v._span}`
1180
- }), F = (v) => ({
1181
- minWidth: v.labelMinWidth ? `${v.labelMinWidth}px` : void 0,
1182
- ...v.labelStyle ?? {}
1183
- }), L = (v) => ({
1184
- minWidth: v.contentMinWidth ? `${v.contentMinWidth}px` : void 0,
1185
- ...v.contentStyle ?? {}
1186
- }), K = (v) => _.value[v.dataIndex], X = () => {
1187
- n.value = [...c.value.schema ?? []];
1188
- }, Q = () => {
1189
- h.value = { ...c.value.data ?? {} };
1190
- }, G = async (v) => {
1191
- a.value = { ...a.value, ...v }, v.schema && (n.value = [...v.schema]), v.data && (h.value = { ...v.data });
1192
- }, N = async (v) => {
1193
- h.value = { ...h.value, ...v }, a.value = { ...a.value, data: h.value };
1194
- }, J = () => ({ ...c.value.data ?? h.value ?? {} }), j = {
1195
- setProps: G,
1196
- setData: N,
1197
- getData: J
1373
+ }), j = S(() => ({
1374
+ gridTemplateColumns: `repeat(${y.value}, minmax(0, 1fr))`
1375
+ })), F = (p) => ({
1376
+ gridColumn: `span ${p._span}`
1377
+ }), N = (p) => ({
1378
+ minWidth: p.labelMinWidth ? `${p.labelMinWidth}px` : void 0,
1379
+ ...p.labelStyle ?? {}
1380
+ }), L = (p) => ({
1381
+ minWidth: p.contentMinWidth ? `${p.contentMinWidth}px` : void 0,
1382
+ ...p.contentStyle ?? {}
1383
+ }), Z = (p) => D.value[p.dataIndex], ee = () => {
1384
+ a.value = [...m.value.schema ?? []];
1385
+ }, H = () => {
1386
+ u.value = { ...m.value.data ?? {} };
1387
+ }, q = async (p) => {
1388
+ n.value = { ...n.value, ...p }, p.schema && (a.value = [...p.schema]), p.data && (u.value = { ...p.data });
1389
+ }, Q = async (p) => {
1390
+ u.value = { ...u.value, ...p }, n.value = { ...n.value, data: u.value };
1391
+ }, U = () => ({ ...m.value.data ?? u.value ?? {} }), Y = {
1392
+ setProps: q,
1393
+ setData: Q,
1394
+ getData: U
1198
1395
  };
1199
- e(j);
1200
- const Z = () => {
1201
- typeof window < "u" && (m.value = window.innerWidth);
1396
+ e(Y);
1397
+ const re = () => {
1398
+ typeof window < "u" && (f.value = window.innerWidth);
1202
1399
  };
1203
- return pe(() => {
1204
- var v;
1205
- X(), Q(), r.value = ((v = c.value.collapseOptions) == null ? void 0 : v.defaultExpand) !== !1, l("register", j), typeof window < "u" && window.addEventListener("resize", Z);
1206
- }), xe(() => {
1207
- typeof window < "u" && window.removeEventListener("resize", Z);
1208
- }), U(() => c.value.schema, X, { deep: !0 }), U(() => c.value.data, Q, { deep: !0 }), U(() => {
1209
- var v;
1210
- return (v = c.value.collapseOptions) == null ? void 0 : v.defaultExpand;
1211
- }, (v) => {
1212
- v !== void 0 && (r.value = v);
1213
- }), { __sfc: !0, props: t, emit: l, innerProps: a, innerData: h, innerSchema: n, windowWidth: m, expanded: r, DescriptionValueRenderer: y, getSetting: E, effectiveProps: c, breakpoints: D, resolveColumn: b, currentColumn: T, effectiveData: _, visibleSchema: A, normalizedRows: u, renderedRows: p, showCollapseButton: d, showHeader: O, collapseButtonText: V, bodyStyle: $, getItemStyle: q, getLabelStyle: F, getContentStyle: L, getItemValue: K, syncSchema: X, syncData: Q, setProps: G, setData: N, getData: J, descriptionAction: j, updateWindowWidth: Z };
1400
+ return ve(() => {
1401
+ var p;
1402
+ ee(), H(), r.value = ((p = m.value.collapseOptions) == null ? void 0 : p.defaultExpand) !== !1, l("register", Y), typeof window < "u" && window.addEventListener("resize", re);
1403
+ }), Fe(() => {
1404
+ typeof window < "u" && window.removeEventListener("resize", re);
1405
+ }), J(() => m.value.schema, ee, { deep: !0 }), J(() => m.value.data, H, { deep: !0 }), J(() => {
1406
+ var p;
1407
+ return (p = m.value.collapseOptions) == null ? void 0 : p.defaultExpand;
1408
+ }, (p) => {
1409
+ p !== void 0 && (r.value = p);
1410
+ }), { __sfc: !0, props: t, emit: l, innerProps: n, innerData: u, innerSchema: a, windowWidth: f, expanded: r, DescriptionValueRenderer: C, normalizeTooltip: O, getSetting: v, effectiveProps: m, breakpoints: d, resolveColumn: B, currentColumn: y, effectiveData: D, visibleSchema: z, normalizedRows: g, renderedRows: h, showCollapseButton: W, showHeader: b, collapseButtonText: M, bodyStyle: j, getItemStyle: F, getLabelStyle: N, getContentStyle: L, getItemValue: Z, syncSchema: ee, syncData: H, setProps: q, setData: Q, getData: U, descriptionAction: Y, updateWindowWidth: re };
1214
1411
  }
1215
1412
  });
1216
- var vt = function() {
1217
- var a;
1413
+ var Mt = function() {
1414
+ var n;
1218
1415
  var e = this, l = e._self._c, t = e._self._setupProxy;
1219
- return l("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? l("div", { staticClass: "ecp-pro-descriptions__header" }, [l("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? l("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? l("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? l("span", e._l(t.effectiveProps.helpMessage, function(h, n) {
1220
- return l("div", { key: n }, [e._v(e._s(h))]);
1221
- }), 0) : l("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), l("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (a = t.effectiveProps.collapseOptions) != null && a.helpMessage ? l("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? l("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(h, n) {
1222
- return l("div", { key: `collapse-${n}` }, [e._v(e._s(h))]);
1223
- }), 0) : l("span", [e._v(e._s(t.effectiveProps.collapseOptions.helpMessage))])]), l("i", { staticClass: "el-icon-info ecp-pro-descriptions__help" })], 2) : e._e()], 1), t.showCollapseButton ? l("el-button", { staticClass: "ecp-pro-descriptions__toggle", attrs: { type: "text" }, on: { click: function(h) {
1416
+ return l("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? l("div", { staticClass: "ecp-pro-descriptions__header" }, [l("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? l("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? l("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? l("span", e._l(t.effectiveProps.helpMessage, function(u, a) {
1417
+ return l("div", { key: a }, [e._v(e._s(u))]);
1418
+ }), 0) : l("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), l("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (n = t.effectiveProps.collapseOptions) != null && n.helpMessage ? l("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? l("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(u, a) {
1419
+ return l("div", { key: `collapse-${a}` }, [e._v(e._s(u))]);
1420
+ }), 0) : l("span", [e._v(e._s(t.effectiveProps.collapseOptions.helpMessage))])]), l("i", { staticClass: "el-icon-info ecp-pro-descriptions__help" })], 2) : e._e()], 1), t.showCollapseButton ? l("el-button", { staticClass: "ecp-pro-descriptions__toggle", attrs: { type: "text" }, on: { click: function(u) {
1224
1421
  t.expanded = !t.expanded;
1225
1422
  } } }, [e._v(" " + e._s(t.expanded ? t.collapseButtonText.collapse : t.collapseButtonText.expand) + " "), l("i", { staticClass: "el-icon-arrow-down", class: t.expanded ? "is-expanded" : "" })]) : e._e()], 1) : e._e(), l("div", e._b({ staticClass: "ecp-pro-descriptions__body", class: [
1226
1423
  `is-${t.effectiveProps.size}`,
1227
1424
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1228
- ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(h, n) {
1229
- return [e._l(h.items, function(m) {
1230
- return [l("div", { key: `${n}-${m.dataIndex || m.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(m) }, [l("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(m) }, [e._v(" " + e._s(m.label) + " ")]), l("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(m) }, [e.$scopedSlots[m.slot || m.dataIndex] ? e._t(m.slot || m.dataIndex, null, { value: t.getItemValue(m), record: t.effectiveData, schema: m }) : l(t.DescriptionValueRenderer, { attrs: { schema: m, value: t.getItemValue(m), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1425
+ ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(u, a) {
1426
+ return [e._l(u.items, function(f) {
1427
+ return [l("div", { key: `${a}-${f.dataIndex || f.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(f) }, [l("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(f) }, [e._v(" " + e._s(f.label) + " ")]), l("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(f) }, [e.$scopedSlots[f.slot || f.dataIndex] ? e._t(f.slot || f.dataIndex, null, { value: t.getItemValue(f), record: t.effectiveData, schema: f }) : l(t.DescriptionValueRenderer, { attrs: { schema: f, value: t.getItemValue(f), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1231
1428
  })];
1232
1429
  })], 2)]);
1233
- }, mt = [], ht = /* @__PURE__ */ ne(
1234
- pt,
1235
- vt,
1236
- mt,
1430
+ }, Tt = [], kt = /* @__PURE__ */ se(
1431
+ At,
1432
+ Mt,
1433
+ Tt,
1237
1434
  !1,
1238
1435
  null,
1239
- "31a2b882",
1436
+ "7d6cd376",
1240
1437
  null,
1241
1438
  null
1242
1439
  );
1243
- const $e = ht.exports;
1244
- function Pt(S) {
1245
- const e = k(null), l = () => S ? ue(S) : void 0, t = () => {
1246
- const n = ue(e);
1247
- if (!n)
1440
+ const Ke = kt.exports;
1441
+ function Nt(i) {
1442
+ const e = k(null), l = () => i ? fe(i) : void 0, t = () => {
1443
+ const a = fe(e);
1444
+ if (!a)
1248
1445
  throw new Error("ProDescriptions instance has not been registered");
1249
- return n;
1250
- }, a = (n) => {
1251
- e.value = n;
1252
- const m = l();
1253
- m && Object.keys(m).length > 0 && n.setProps(m);
1446
+ return a;
1447
+ }, n = (a) => {
1448
+ e.value = a;
1449
+ const f = l();
1450
+ f && Object.keys(f).length > 0 && a.setProps(f);
1254
1451
  };
1255
- return S && U(
1452
+ return i && J(
1256
1453
  () => l(),
1257
- (n) => {
1258
- n && e.value && e.value.setProps(n);
1454
+ (a) => {
1455
+ a && e.value && e.value.setProps(a);
1259
1456
  },
1260
1457
  { deep: !0 }
1261
- ), [a, {
1262
- setProps: (n) => t().setProps(n),
1263
- setData: (n) => t().setData(n),
1458
+ ), [n, {
1459
+ setProps: (a) => t().setProps(a),
1460
+ setData: (a) => t().setData(a),
1264
1461
  getData: () => t().getData()
1265
1462
  }];
1266
1463
  }
1267
- const _t = [
1268
- { name: "ProTable", component: Ae },
1269
- { name: "TableAction", component: ke },
1270
- { name: "ProForm", component: Me },
1271
- { name: "ProFormItem", component: De },
1272
- { name: "FormActions", component: Te },
1273
- { name: "ProDescriptions", component: $e }
1464
+ const Dt = [
1465
+ { name: "ProTable", component: Ee },
1466
+ { name: "TableAction", component: Ne },
1467
+ { name: "ProForm", component: Le },
1468
+ { name: "ProFormItem", component: Ve },
1469
+ { name: "FormActions", component: We },
1470
+ { name: "FormattedNumberInput", component: Ae },
1471
+ { name: "ProDescriptions", component: Ke }
1274
1472
  ];
1275
- function bt(S) {
1276
- _t.forEach(({ name: e, component: l }) => {
1277
- S.component(e, l);
1473
+ function $t(i) {
1474
+ Dt.forEach(({ name: e, component: l }) => {
1475
+ i.component(e, l);
1278
1476
  });
1279
1477
  }
1280
- const xt = {
1281
- install: bt,
1282
- ProTable: Ae,
1283
- ProForm: Me,
1284
- ProDescriptions: $e,
1285
- TableAction: ke
1478
+ const Vt = {
1479
+ install: $t,
1480
+ ProTable: Ee,
1481
+ ProForm: Le,
1482
+ ProDescriptions: Ke,
1483
+ TableAction: Ne,
1484
+ FormattedNumberInput: Ae
1286
1485
  };
1287
1486
  export {
1288
- Te as FormActions,
1289
- $e as ProDescriptions,
1290
- Me as ProForm,
1291
- De as ProFormItem,
1292
- Ae as ProTable,
1293
- ke as TableAction,
1294
- xt as default,
1295
- bt as install,
1296
- Se as useComponentSetting,
1297
- Pt as useDescription,
1298
- Ct as useForm,
1299
- wt as useProTable
1487
+ We as FormActions,
1488
+ Ae as FormattedNumberInput,
1489
+ Ke as ProDescriptions,
1490
+ Le as ProForm,
1491
+ Ve as ProFormItem,
1492
+ Ee as ProTable,
1493
+ Ne as TableAction,
1494
+ ze as clampByIntegerDigits,
1495
+ Vt as default,
1496
+ Ie as formatWithThousands,
1497
+ $t as install,
1498
+ Pe as normalizeNumericValue,
1499
+ rt as numberToEditString,
1500
+ st as roundToDecimals,
1501
+ $e as sanitizeNumericInput,
1502
+ xe as stripNumberGrouping,
1503
+ Re as useComponentSetting,
1504
+ Nt as useDescription,
1505
+ Et as useForm,
1506
+ Ot as useProTable
1300
1507
  };
1301
1508
  //# sourceMappingURL=element-component-pro.es.js.map