@aspire-ui/element-component-pro 1.0.3 → 1.0.4

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,4 +1,4 @@
1
- import { reactive as $e, defineComponent as ee, h as ce, useSlots as Ce, ref as A, computed as B, onMounted as we, nextTick as Fe, onUnmounted as Re, watch as U, unref as ye } from "vue";
1
+ import { reactive as $e, defineComponent as ee, h as ce, useSlots as Pe, ref as k, computed as R, onMounted as we, nextTick as Fe, onUnmounted as Re, watch as U, unref as ye } from "vue";
2
2
  import { MessageBox as ze } from "element-ui";
3
3
  const ge = $e({});
4
4
  function Be() {
@@ -54,8 +54,8 @@ const Ee = /* @__PURE__ */ ee({
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(F, { expose: e, emit: l }) {
58
- const t = F, a = ee({
57
+ setup(x, { expose: e, emit: l }) {
58
+ const t = x, a = ee({
59
59
  name: "EcpProTableDefaultCellRenderer",
60
60
  props: {
61
61
  column: { type: Object, required: !0 },
@@ -65,15 +65,15 @@ const Ee = /* @__PURE__ */ ee({
65
65
  },
66
66
  setup(o) {
67
67
  return () => {
68
- var d, b;
68
+ var f, b;
69
69
  const n = o.column;
70
70
  if (n != null && n.customRender) {
71
- const D = n.customRender({ text: o.value, record: o.record, index: o.index });
72
- return typeof D == "string" || typeof D == "number" ? ce("span", String(D)) : D;
71
+ const T = n.customRender({ text: o.value, record: o.record, index: o.index });
72
+ return typeof T == "string" || typeof T == "number" ? ce("span", String(T)) : T;
73
73
  }
74
74
  if (n != null && n.valueEnum) {
75
- const D = ((b = (d = n.valueEnum) == null ? void 0 : d[o.value]) == null ? void 0 : b.text) ?? o.value;
76
- return ce("span", D == null ? "" : String(D));
75
+ const T = ((b = (f = n.valueEnum) == null ? void 0 : f[o.value]) == null ? void 0 : b.text) ?? o.value;
76
+ return ce("span", T == null ? "" : String(T));
77
77
  }
78
78
  return ce("span", o.value == null ? "" : String(o.value));
79
79
  };
@@ -91,202 +91,202 @@ const Ee = /* @__PURE__ */ ee({
91
91
  },
92
92
  setup(o) {
93
93
  return () => {
94
- const n = o.slotRender, d = n == null ? void 0 : n({ column: o.column, record: o.record, index: o.index, value: o.value });
95
- if (((L) => L == null ? [] : Array.isArray(L) ? L.filter((G) => G != null && G !== !1 && !G.isComment) : [L])(d).length > 0)
96
- return d;
97
- const R = { ...o.column };
98
- return o.customRender && (R.customRender = o.customRender), o.valueEnum && (R.valueEnum = o.valueEnum), ce(a, { props: { column: R, record: o.record, index: o.index, value: o.value } });
94
+ const n = o.slotRender, f = n == null ? void 0 : n({ column: o.column, record: o.record, index: o.index, value: o.value });
95
+ if (((V) => V == null ? [] : Array.isArray(V) ? V.filter((G) => G != null && G !== !1 && !G.isComment) : [V])(f).length > 0)
96
+ return f;
97
+ const F = { ...o.column };
98
+ return o.customRender && (F.customRender = o.customRender), o.valueEnum && (F.valueEnum = o.valueEnum), ce(a, { props: { column: F, record: o.record, index: o.index, value: o.value } });
99
99
  };
100
100
  }
101
- }), r = Ce(), C = A(), s = A(), v = A(0), h = A(t.loading ?? !1), c = A([]), m = A({}), k = A([]), z = A({}), x = A([]), T = A(null), u = A({
101
+ }), r = Pe(), P = k(), s = k(), p = k(0), $ = k(t.loading ?? !1), u = k([]), D = k({}), h = k([]), B = k({}), m = k([]), A = k(null), c = 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: f } = Be(), p = B(() => ({ ...f("ProTable"), ...t, ...z.value })), O = B(() => !!p.value.title || !!r.tableTitle || !!r.toolbar), K = B(() => T.value !== null ? T.value : !!t.pagination && typeof t.pagination == "object"), M = B(() => p.value.rowKey || "id"), N = B(() => new Set(x.value.map((o) => o[M.value]))), g = B(
107
- () => k.value.filter((o) => !o.hideInTable && !o.defaultHidden)
108
- ), E = B(() => {
109
- var n, d;
106
+ }), { getSetting: v } = Be(), d = R(() => ({ ...v("ProTable"), ...t, ...B.value })), z = R(() => !!d.value.title || !!r.tableTitle || !!r.toolbar), I = R(() => A.value !== null ? A.value : !!t.pagination && typeof t.pagination == "object"), M = R(() => d.value.rowKey || "id"), N = R(() => new Set(m.value.map((o) => o[M.value]))), g = R(
107
+ () => h.value.filter((o) => !o.hideInTable && !o.defaultHidden)
108
+ ), L = R(() => {
109
+ var n, f;
110
110
  let o = 0;
111
- return p.value.rowSelection && (o += Number(p.value.rowSelection.width) || 48), p.value.showIndexColumn && (o += Number((n = p.value.indexColumnProps) == null ? void 0 : n.width) || 60), p.value.actionColumn && (o += Number((d = p.value.actionColumn) == null ? void 0 : d.width) || 150), o;
112
- }), I = (o) => typeof o == "number" && o > 0, W = B(() => g.value.filter((n) => Y(n) && I(n.width)).reduce((n, d) => n + (typeof d.width == "number" ? d.width : 0), 0)), X = B(() => g.value.filter((n) => Y(n) && typeof n.width == "string").reduce((n, d) => n + (Number(q(d)) || 80), 0)), V = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, q = (o) => {
111
+ return d.value.rowSelection && (o += Number(d.value.rowSelection.width) || 48), d.value.showIndexColumn && (o += Number((n = d.value.indexColumnProps) == null ? void 0 : n.width) || 60), d.value.actionColumn && (o += Number((f = d.value.actionColumn) == null ? void 0 : f.width) || 150), o;
112
+ }), O = (o) => typeof o == "number" && o > 0, W = R(() => g.value.filter((n) => Y(n) && O(n.width)).reduce((n, f) => n + (typeof f.width == "number" ? f.width : 0), 0)), X = R(() => g.value.filter((n) => Y(n) && typeof n.width == "string").reduce((n, f) => n + (Number(q(f)) || 80), 0)), K = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, q = (o) => {
113
113
  const n = o.width;
114
- if (I(n) && W.value > 0 && v.value > 0 && typeof n == "number") {
115
- const d = v.value - E.value - X.value;
116
- let b = Math.floor(d * n / W.value);
117
- const D = V(o.minWidth) ?? 60, R = V(o.maxWidth);
118
- return b = Math.max(D, b), R != null && (b = Math.min(R, b)), b;
114
+ if (O(n) && W.value > 0 && p.value > 0 && typeof n == "number") {
115
+ const f = p.value - L.value - X.value;
116
+ let b = Math.floor(f * n / W.value);
117
+ const T = K(o.minWidth) ?? 60, F = K(o.maxWidth);
118
+ return b = Math.max(T, b), F != null && (b = Math.min(F, b)), b;
119
119
  }
120
120
  if (typeof n == "string") {
121
- const d = V(n) ?? 80, b = V(o.minWidth), D = V(o.maxWidth);
122
- let R = d;
123
- return b != null && (R = Math.max(b, R)), D != null && (R = Math.min(D, R)), R;
121
+ const f = K(n) ?? 80, b = K(o.minWidth), T = K(o.maxWidth);
122
+ let F = f;
123
+ return b != null && (F = Math.max(b, F)), T != null && (F = Math.min(T, F)), F;
124
124
  }
125
125
  return o.width;
126
- }, Y = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, j = B(() => {
126
+ }, Y = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, j = R(() => {
127
127
  var n;
128
- const o = (n = p.value.rowSelection) == null ? void 0 : n.getCheckboxProps;
129
- return o ? c.value.filter((d) => {
128
+ const o = (n = d.value.rowSelection) == null ? void 0 : n.getCheckboxProps;
129
+ return o ? u.value.filter((f) => {
130
130
  var b;
131
- return !((b = o(d)) != null && b.disabled);
132
- }) : c.value;
133
- }), te = B(() => j.value.length > 0), ue = B(() => j.value.length === 0 ? !1 : j.value.every((o) => N.value.has(o[M.value]))), de = B(() => {
131
+ return !((b = o(f)) != null && b.disabled);
132
+ }) : u.value;
133
+ }), te = R(() => j.value.length > 0), ue = R(() => j.value.length === 0 ? !1 : j.value.every((o) => N.value.has(o[M.value]))), de = R(() => {
134
134
  const o = j.value.filter((n) => N.value.has(n[M.value])).length;
135
135
  return o > 0 && o < j.value.length;
136
136
  }), fe = (o) => N.value.has(o[M.value]), pe = (o) => {
137
- var n, d, b;
138
- return ((b = (d = (n = p.value.rowSelection) == null ? void 0 : n.getCheckboxProps) == null ? void 0 : d.call(n, o)) == null ? void 0 : b.disabled) ?? !1;
137
+ var n, f, b;
138
+ return ((b = (f = (n = d.value.rowSelection) == null ? void 0 : n.getCheckboxProps) == null ? void 0 : f.call(n, o)) == null ? void 0 : b.disabled) ?? !1;
139
139
  }, ve = (o) => {
140
- var n, d, b;
141
- return ((b = (d = (n = p.value.rowSelection) == null ? void 0 : n.getRadioProps) == null ? void 0 : d.call(n, o)) == null ? void 0 : b.disabled) ?? !1;
140
+ var n, f, b;
141
+ return ((b = (f = (n = d.value.rowSelection) == null ? void 0 : n.getRadioProps) == null ? void 0 : f.call(n, o)) == null ? void 0 : b.disabled) ?? !1;
142
142
  }, Z = () => {
143
- const o = x.value.map((n) => n[M.value]);
144
- l("selection-change", { keys: o, rows: x.value });
143
+ const o = m.value.map((n) => n[M.value]);
144
+ l("selection-change", { keys: o, rows: m.value });
145
145
  }, me = (o, n) => {
146
- const d = o[M.value];
147
- n ? x.value = [...x.value.filter((b) => b[M.value] !== d), o] : x.value = x.value.filter((b) => b[M.value] !== d), Z();
146
+ const f = o[M.value];
147
+ n ? m.value = [...m.value.filter((b) => b[M.value] !== f), o] : m.value = m.value.filter((b) => b[M.value] !== f), Z();
148
148
  }, he = (o) => {
149
- x.value = [o], Z();
149
+ m.value = [o], Z();
150
150
  }, be = (o) => {
151
151
  if (o) {
152
- const n = new Set(x.value.map((b) => b[M.value])), d = j.value.filter((b) => !n.has(b[M.value]));
153
- x.value = [...x.value, ...d];
152
+ const n = new Set(m.value.map((b) => b[M.value])), f = j.value.filter((b) => !n.has(b[M.value]));
153
+ m.value = [...m.value, ...f];
154
154
  } else {
155
- const n = new Set(c.value.map((d) => d[M.value]));
156
- x.value = x.value.filter((d) => !n.has(d[M.value]));
155
+ const n = new Set(u.value.map((f) => f[M.value]));
156
+ m.value = m.value.filter((f) => !n.has(f[M.value]));
157
157
  }
158
158
  Z();
159
159
  }, J = async (o) => {
160
160
  if (!t.api) {
161
161
  if (t.dataSource)
162
162
  return;
163
- c.value = [];
163
+ u.value = [];
164
164
  return;
165
165
  }
166
- h.value = !0;
166
+ $.value = !0;
167
167
  try {
168
- const n = p.value.fetchSetting ?? {}, d = n.pageField ?? "page", b = n.sizeField ?? "pageSize", D = n.listField ?? "list", R = n.totalField ?? "total", L = {
169
- [d]: (o == null ? void 0 : o.page) ?? u.value.page,
170
- [b]: (o == null ? void 0 : o.pageSize) ?? u.value.pageSize,
168
+ const n = d.value.fetchSetting ?? {}, f = n.pageField ?? "page", b = n.sizeField ?? "pageSize", T = n.listField ?? "list", F = n.totalField ?? "total", V = {
169
+ [f]: (o == null ? void 0 : o.page) ?? c.value.page,
170
+ [b]: (o == null ? void 0 : o.pageSize) ?? c.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 G = t.beforeFetch ? t.beforeFetch(L) : L, Pe = await t.api(G);
176
- m.value = Pe || {};
177
- const _e = t.afterFetch ? t.afterFetch(Pe) : Pe, Se = _e[D] ?? _e.items ?? _e.list ?? [], xe = _e[R] ?? 0;
178
- c.value = Se, u.value.total = xe, l("fetch-success", { items: Se, total: xe });
174
+ (o == null ? void 0 : o.page) != null && (c.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (c.value.pageSize = o.pageSize);
175
+ const G = t.beforeFetch ? t.beforeFetch(V) : V, Ce = await t.api(G);
176
+ D.value = Ce || {};
177
+ const _e = t.afterFetch ? t.afterFetch(Ce) : Ce, Se = _e[T] ?? _e.items ?? _e.list ?? [], xe = _e[F] ?? 0;
178
+ u.value = Se, c.value.total = xe, l("fetch-success", { items: Se, total: xe });
179
179
  } catch (n) {
180
180
  l("fetch-error", n);
181
181
  } finally {
182
- h.value = !1;
182
+ $.value = !1;
183
183
  }
184
184
  }, se = () => J(void 0), re = (o) => {
185
- p.value.clearSelectOnPageChange && (x.value = []), u.value.pageSize = o, u.value.page = 1, J(void 0);
185
+ d.value.clearSelectOnPageChange && (m.value = []), c.value.pageSize = o, c.value.page = 1, J(void 0);
186
186
  }, i = (o) => {
187
- p.value.clearSelectOnPageChange && (x.value = []), u.value.page = o, J(void 0);
188
- }, _ = (o, n, d) => l("row-click", o, d), S = (o, n, d) => l("row-dblclick", o, d), P = ({ prop: o, order: n }) => l("sort-change", { prop: o, order: n }), w = (o, n) => l("expand-change", o, n), $ = (o) => c.value.findIndex((n) => n[M.value] === o), H = {
187
+ d.value.clearSelectOnPageChange && (m.value = []), c.value.page = o, J(void 0);
188
+ }, _ = (o, n, f) => l("row-click", o, f), S = (o, n, f) => l("row-dblclick", o, f), C = ({ prop: o, order: n }) => l("sort-change", { prop: o, order: n }), w = (o, n) => l("expand-change", o, n), E = (o) => u.value.findIndex((n) => n[M.value] === o), H = {
189
189
  setProps: (o) => {
190
- z.value = { ...z.value, ...o };
190
+ B.value = { ...B.value, ...o };
191
191
  },
192
192
  reload: (o) => J(o),
193
193
  redoHeight: () => {
194
194
  var o, n;
195
- (n = (o = C.value) == null ? void 0 : o.doLayout) == null || n.call(o);
195
+ (n = (o = P.value) == null ? void 0 : o.doLayout) == null || n.call(o);
196
196
  },
197
197
  setLoading: (o) => {
198
- h.value = o;
198
+ $.value = o;
199
199
  },
200
- getDataSource: () => c.value,
201
- getRawDataSource: () => m.value,
200
+ getDataSource: () => u.value,
201
+ getRawDataSource: () => D.value,
202
202
  setTableData: (o) => {
203
- c.value = o ?? [];
203
+ u.value = o ?? [];
204
204
  },
205
- getColumns: () => k.value,
205
+ getColumns: () => h.value,
206
206
  setColumns: (o) => {
207
207
  if (Array.isArray(o) && o.length > 0 && typeof o[0] == "string") {
208
- const n = o, d = (t.columns ?? []).filter((D) => n.includes(D.key ?? D.dataIndex)), b = n.map((D) => d.find((R) => (R.key ?? R.dataIndex) === D)).filter(Boolean);
209
- b.length && (k.value = b);
208
+ const n = o, f = (t.columns ?? []).filter((T) => n.includes(T.key ?? T.dataIndex)), b = n.map((T) => f.find((F) => (F.key ?? F.dataIndex) === T)).filter(Boolean);
209
+ b.length && (h.value = b);
210
210
  } else
211
- k.value = o ?? [];
211
+ h.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 && (c.value.page = o.page), o != null && o.pageSize && (c.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (c.value.total = o.total);
215
215
  },
216
- getSelectRowKeys: () => x.value.map((o) => o[M.value]),
217
- getSelectRows: () => x.value,
216
+ getSelectRowKeys: () => m.value.map((o) => o[M.value]),
217
+ getSelectRows: () => m.value,
218
218
  clearSelectedRowKeys: () => {
219
- x.value = [], Z();
219
+ m.value = [], Z();
220
220
  },
221
221
  setSelectedRowKeys: (o) => {
222
- const n = new Set(o), d = c.value.filter((b) => n.has(b[M.value]));
222
+ const n = new Set(o), f = u.value.filter((b) => n.has(b[M.value]));
223
223
  o.forEach((b) => {
224
- d.some((D) => D[M.value] === b) || d.push({ [M.value]: b });
225
- }), x.value = d, Z();
224
+ f.some((T) => T[M.value] === b) || f.push({ [M.value]: b });
225
+ }), m.value = f, Z();
226
226
  },
227
227
  deleteSelectRowByKey: (o) => {
228
- x.value = x.value.filter((n) => n[M.value] !== o), Z();
228
+ m.value = m.value.filter((n) => n[M.value] !== o), Z();
229
229
  },
230
- updateTableData: (o, n, d) => {
231
- o < 0 || o >= c.value.length || (c.value = [...c.value], c.value[o] = { ...c.value[o], [n]: d });
230
+ updateTableData: (o, n, f) => {
231
+ o < 0 || o >= u.value.length || (u.value = [...u.value], u.value[o] = { ...u.value[o], [n]: f });
232
232
  },
233
233
  updateTableDataRecord: (o, n) => {
234
- const d = $(o);
235
- if (!(d < 0))
236
- return c.value = [...c.value], c.value[d] = { ...c.value[d], ...n }, c.value[d];
234
+ const f = E(o);
235
+ if (!(f < 0))
236
+ return u.value = [...u.value], u.value[f] = { ...u.value[f], ...n }, u.value[f];
237
237
  },
238
238
  deleteTableDataRecord: (o) => {
239
- const n = Array.isArray(o) ? o : [o], d = new Set(n);
240
- c.value = c.value.filter((b) => !d.has(b[M.value]));
239
+ const n = Array.isArray(o) ? o : [o], f = new Set(n);
240
+ u.value = u.value.filter((b) => !f.has(b[M.value]));
241
241
  },
242
242
  insertTableDataRecord: (o, n) => {
243
- const d = [...c.value];
244
- return n == null || n >= d.length ? d.push(o) : d.splice(n, 0, o), c.value = d, o;
243
+ const f = [...u.value];
244
+ return n == null || n >= f.length ? f.push(o) : f.splice(n, 0, o), u.value = f, o;
245
245
  },
246
- getPaginationRef: () => K.value ? { page: u.value.page, pageSize: Number(u.value.pageSize) || 10, total: u.value.total } : !1,
247
- getShowPagination: () => K.value,
246
+ getPaginationRef: () => I.value ? { page: c.value.page, pageSize: Number(c.value.pageSize) || 10, total: c.value.total } : !1,
247
+ getShowPagination: () => I.value,
248
248
  setShowPagination: (o) => {
249
- T.value = o;
249
+ A.value = o;
250
250
  },
251
- getRowSelection: () => p.value.rowSelection,
251
+ getRowSelection: () => d.value.rowSelection,
252
252
  expandAll: () => {
253
253
  var b;
254
- const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
255
- const R = [];
256
- return D.forEach((L) => {
257
- R.push(L);
258
- const G = L[o];
259
- Array.isArray(G) && G.length > 0 && R.push(...n(G));
260
- }), R;
254
+ const o = ((b = d.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (T) => {
255
+ const F = [];
256
+ return T.forEach((V) => {
257
+ F.push(V);
258
+ const G = V[o];
259
+ Array.isArray(G) && G.length > 0 && F.push(...n(G));
260
+ }), F;
261
261
  };
262
- n(c.value).forEach((D) => {
263
- var R, L;
264
- return (L = (R = C.value) == null ? void 0 : R.toggleRowExpansion) == null ? void 0 : L.call(R, D, !0);
262
+ n(u.value).forEach((T) => {
263
+ var F, V;
264
+ return (V = (F = P.value) == null ? void 0 : F.toggleRowExpansion) == null ? void 0 : V.call(F, T, !0);
265
265
  });
266
266
  },
267
267
  collapseAll: () => {
268
268
  var b;
269
- const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
270
- const R = [];
271
- return D.forEach((L) => {
272
- R.push(L);
273
- const G = L[o];
274
- Array.isArray(G) && G.length > 0 && R.push(...n(G));
275
- }), R;
269
+ const o = ((b = d.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (T) => {
270
+ const F = [];
271
+ return T.forEach((V) => {
272
+ F.push(V);
273
+ const G = V[o];
274
+ Array.isArray(G) && G.length > 0 && F.push(...n(G));
275
+ }), F;
276
276
  };
277
- n(c.value).forEach((D) => {
278
- var R, L;
279
- return (L = (R = C.value) == null ? void 0 : R.toggleRowExpansion) == null ? void 0 : L.call(R, D, !1);
277
+ n(u.value).forEach((T) => {
278
+ var F, V;
279
+ return (V = (F = P.value) == null ? void 0 : F.toggleRowExpansion) == null ? void 0 : V.call(F, T, !1);
280
280
  });
281
281
  }
282
282
  };
283
283
  e(H);
284
284
  const Q = () => {
285
- k.value = [...t.columns ?? []];
285
+ h.value = [...t.columns ?? []];
286
286
  }, ne = () => {
287
- t.api && p.value.immediate !== !1 ? J(void 0) : t.dataSource && (c.value = [...t.dataSource], !t.api && t.pagination !== !1 && (u.value.total = t.dataSource.length));
287
+ t.api && d.value.immediate !== !1 ? J(void 0) : t.dataSource && (u.value = [...t.dataSource], !t.api && t.pagination !== !1 && (c.value.total = t.dataSource.length));
288
288
  }, ie = () => {
289
- s.value && (v.value = s.value.offsetWidth || 0);
289
+ s.value && (p.value = s.value.offsetWidth || 0);
290
290
  };
291
291
  let le = null, oe = null;
292
292
  return we(() => {
@@ -296,67 +296,67 @@ const Ee = /* @__PURE__ */ ee({
296
296
  }), Re(() => {
297
297
  typeof window < "u" && (window.removeEventListener("resize", ie), le && oe && (le.unobserve(oe), oe = null));
298
298
  }), U(() => t.columns, Q, { deep: !0 }), U(() => t.dataSource, () => {
299
- !t.api && t.dataSource && (c.value = [...t.dataSource]);
299
+ !t.api && t.dataSource && (u.value = [...t.dataSource]);
300
300
  }, { deep: !0 }), U(() => t.loading, (o) => {
301
- h.value = o ?? !1;
302
- }), { __sfc: !0, DefaultCellRenderer: a, BodyCellRenderer: y, props: t, emit: l, slots: r, tableRef: C, tableWrapRef: s, containerWidth: v, loading: h, innerData: c, rawDataSource: m, innerColumns: k, innerProps: z, selectedRows: x, showPaginationRef: T, pagination: u, getComponentSetting: f, effectiveProps: p, showTitleBar: O, showPagination: K, rowKeyField: M, selectedKeysSet: N, displayColumns: g, fixedColumnsWidth: E, isRatioWidth: I, totalRatio: W, fixedDataColumnsWidth: X, parseWidthPx: V, getColumnWidth: q, shouldShowColumn: Y, selectableRows: j, hasSelectableRows: te, isAllCurrentPageSelected: ue, isIndeterminate: de, isRowSelected: fe, getCheckboxDisabled: pe, getRadioDisabled: ve, emitSelectionChange: Z, handleCheckboxChange: me, handleRadioSelect: he, handleSelectAll: be, fetchData: J, handleReload: se, handleSizeChange: re, handleCurrentChange: i, handleRowClick: _, handleRowDblclick: S, handleSortChange: P, handleExpandChange: w, findRowIndex: $, tableAction: H, syncColumns: Q, loadData: ne, updateContainerWidth: ie, resizeObserver: le, observedEl: oe };
301
+ $.value = o ?? !1;
302
+ }), { __sfc: !0, DefaultCellRenderer: a, BodyCellRenderer: y, props: t, emit: l, slots: r, tableRef: P, tableWrapRef: s, containerWidth: p, loading: $, innerData: u, rawDataSource: D, innerColumns: h, innerProps: B, selectedRows: m, showPaginationRef: A, pagination: c, getComponentSetting: v, effectiveProps: d, showTitleBar: z, showPagination: I, rowKeyField: M, selectedKeysSet: N, displayColumns: g, fixedColumnsWidth: L, isRatioWidth: O, totalRatio: W, fixedDataColumnsWidth: X, parseWidthPx: K, getColumnWidth: q, shouldShowColumn: Y, selectableRows: j, hasSelectableRows: te, isAllCurrentPageSelected: ue, isIndeterminate: de, isRowSelected: fe, getCheckboxDisabled: pe, getRadioDisabled: ve, emitSelectionChange: Z, handleCheckboxChange: me, handleRadioSelect: he, handleSelectAll: be, fetchData: J, handleReload: se, handleSizeChange: re, handleCurrentChange: i, handleRowClick: _, handleRowDblclick: S, handleSortChange: C, handleExpandChange: w, findRowIndex: E, tableAction: H, syncColumns: Q, loadData: ne, updateContainerWidth: ie, resizeObserver: le, observedEl: oe };
303
303
  }
304
304
  });
305
- function ae(F, e, l, t, a, y, r, C) {
306
- var s = typeof F == "function" ? F.options : F;
305
+ function ae(x, e, l, t, a, y, r, P) {
306
+ var s = typeof x == "function" ? x.options : x;
307
307
  e && (s.render = e, s.staticRenderFns = l, s._compiled = !0), t && (s.functional = !0), y && (s._scopeId = "data-v-" + y);
308
- var v;
309
- if (r ? (v = function(m) {
310
- m = m || // cached call
308
+ var p;
309
+ if (r ? (p = function(D) {
310
+ D = D || // cached call
311
311
  this.$vnode && this.$vnode.ssrContext || // stateful
312
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ < "u" && (m = __VUE_SSR_CONTEXT__), a && a.call(this, m), m && m._registeredComponents && m._registeredComponents.add(r);
313
- }, s._ssrRegister = v) : a && (v = C ? function() {
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(r);
313
+ }, s._ssrRegister = p) : a && (p = P ? function() {
314
314
  a.call(
315
315
  this,
316
316
  (s.functional ? this.parent : this).$root.$options.shadowRoot
317
317
  );
318
- } : a), v)
318
+ } : a), p)
319
319
  if (s.functional) {
320
- s._injectStyles = v;
321
- var h = s.render;
322
- s.render = function(k, z) {
323
- return v.call(z), h(k, z);
320
+ s._injectStyles = p;
321
+ var $ = s.render;
322
+ s.render = function(h, B) {
323
+ return p.call(B), $(h, B);
324
324
  };
325
325
  } else {
326
- var c = s.beforeCreate;
327
- s.beforeCreate = c ? [].concat(c, v) : [v];
326
+ var u = s.beforeCreate;
327
+ s.beforeCreate = u ? [].concat(u, p) : [p];
328
328
  }
329
329
  return {
330
- exports: F,
330
+ exports: x,
331
331
  options: s
332
332
  };
333
333
  }
334
334
  var Ie = function() {
335
- var a, y, r, C;
335
+ var a, y, r, P;
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(s, v) {
338
- return l("div", { key: v }, [e._v(e._s(s))]);
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(s, p) {
338
+ return l("div", { key: p }, [e._v(e._s(s))]);
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 s;
341
341
  return [((s = t.effectiveProps.tableSetting) == null ? void 0 : s.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(s) {
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(s) {
345
- var v;
346
- return [t.effectiveProps.rowSelection.type !== "radio" ? l("el-checkbox", { attrs: { value: t.isRowSelected(s.row), disabled: t.getCheckboxDisabled(s.row) }, on: { change: (h) => t.handleCheckboxChange(s.row, h) }, nativeOn: { click: function(h) {
347
- h.stopPropagation();
348
- } } }) : l("el-radio", { attrs: { value: (v = t.selectedRows[0]) == null ? void 0 : v[t.rowKeyField], label: s.row[t.rowKeyField], disabled: t.getRadioDisabled(s.row) }, on: { change: function(h) {
345
+ var p;
346
+ return [t.effectiveProps.rowSelection.type !== "radio" ? l("el-checkbox", { attrs: { value: t.isRowSelected(s.row), disabled: t.getCheckboxDisabled(s.row) }, on: { change: ($) => t.handleCheckboxChange(s.row, $) }, nativeOn: { click: function($) {
347
+ $.stopPropagation();
348
+ } } }) : l("el-radio", { attrs: { value: (p = t.selectedRows[0]) == null ? void 0 : p[t.rowKeyField], label: s.row[t.rowKeyField], disabled: t.getRadioDisabled(s.row) }, on: { change: function($) {
349
349
  return t.handleRadioSelect(s.row);
350
- } }, nativeOn: { click: function(h) {
351
- h.stopPropagation();
350
+ } }, nativeOn: { click: function($) {
351
+ $.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: ((y = t.effectiveProps.indexColumnProps) == null ? void 0 : y.width) || 60, fixed: (r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.fixed, align: ((C = t.effectiveProps.indexColumnProps) == null ? void 0 : C.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(s) {
354
- return [t.shouldShowColumn(s) ? l("el-table-column", { key: s.dataIndex || s.key || s.title, attrs: { prop: s.dataIndex, label: s.title, width: t.getColumnWidth(s), "min-width": t.isRatioWidth(s.width) ? void 0 : s.minWidth, fixed: s.fixed, align: s.align || "left", sortable: s.sortable, formatter: s.formatter, "show-overflow-tooltip": s.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(v) {
355
- return [s.dataIndex && e.$scopedSlots[`header-${s.dataIndex}`] ? e._t(`header-${s.dataIndex}`, null, { column: s }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: s }) : [l("span", [e._v(e._s(s.title))]), s.helpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(s.helpMessage) ? l("span", e._l(s.helpMessage, function(h, c) {
356
- return l("div", { key: c }, [e._v(e._s(h))]);
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: ((y = t.effectiveProps.indexColumnProps) == null ? void 0 : y.width) || 60, fixed: (r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.fixed, align: ((P = t.effectiveProps.indexColumnProps) == null ? void 0 : P.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(s) {
354
+ return [t.shouldShowColumn(s) ? l("el-table-column", { key: s.dataIndex || s.key || s.title, attrs: { prop: s.dataIndex, label: s.title, width: t.getColumnWidth(s), "min-width": t.isRatioWidth(s.width) ? void 0 : s.minWidth, fixed: s.fixed, align: s.align || "left", sortable: s.sortable, formatter: s.formatter, "show-overflow-tooltip": s.ellipsis !== !1 && t.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "header", fn: function(p) {
355
+ return [s.dataIndex && e.$scopedSlots[`header-${s.dataIndex}`] ? e._t(`header-${s.dataIndex}`, null, { column: s }) : e.$scopedSlots.headerCell ? e._t("headerCell", null, { column: s }) : [l("span", [e._v(e._s(s.title))]), s.helpMessage ? l("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [l("template", { slot: "content" }, [Array.isArray(s.helpMessage) ? l("span", e._l(s.helpMessage, function($, u) {
356
+ return l("div", { key: u }, [e._v(e._s($))]);
357
357
  }), 0) : l("span", [e._v(e._s(s.helpMessage))])]), l("i", { staticClass: "el-icon-question" })], 2) : e._e()]];
358
- } }, { key: "default", fn: function(v) {
359
- return [s.dataIndex && e.$scopedSlots[s.dataIndex] ? e._t(s.dataIndex, null, { row: v.row, column: s, index: v.$index, value: v.row[s.dataIndex] }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: s, record: v.row, index: v.$index, value: v.row[s.dataIndex], "custom-render": s.customRender, "value-enum": s.valueEnum } }) : l(t.DefaultCellRenderer, { attrs: { column: s, record: v.row, index: v.$index, value: v.row[s.dataIndex] } })];
358
+ } }, { key: "default", fn: function(p) {
359
+ return [s.dataIndex && e.$scopedSlots[s.dataIndex] ? e._t(s.dataIndex, null, { row: p.row, column: s, index: p.$index, value: p.row[s.dataIndex] }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: s, record: p.row, index: p.$index, value: p.row[s.dataIndex], "custom-render": s.customRender, "value-enum": s.valueEnum } }) : l(t.DefaultCellRenderer, { attrs: { column: s, record: p.row, index: p.$index, value: p.row[s.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(s) {
362
362
  return [e.$scopedSlots.action ? e._t("action", null, { record: s.row, column: t.effectiveProps.actionColumn, index: s.$index }) : e.$scopedSlots.bodyCell ? l(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: s.row, index: s.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
@@ -378,37 +378,43 @@ const Ae = Oe.exports, Ve = /* @__PURE__ */ ee({
378
378
  dropDownActions: { default: () => [] },
379
379
  stopButtonPropagation: { type: Boolean, default: !1 }
380
380
  },
381
- setup(F) {
382
- const e = F, l = (h) => h ? typeof h == "string" ? { content: h } : h : {}, t = (h) => h.type ? h.type : h.color === "error" ? "danger" : h.color === "success" ? "success" : h.color === "warning" ? "warning" : "text", a = (h) => h.filter((c) => {
383
- const { ifShow: m } = c;
384
- return typeof m == "boolean" ? m : typeof m == "function" ? m(c) : !0;
385
- }), y = B(() => a(e.actions || [])), r = B(() => a(e.dropDownActions || []));
386
- return { __sfc: !0, props: e, normalizeTooltip: l, getButtonType: t, filterVisible: a, visibleActions: y, visibleDropDownActions: r, handleClick: (h, c) => {
381
+ setup(x) {
382
+ const e = x, l = (h) => h ? typeof h == "string" ? { content: h } : h : {}, t = (h) => h.type ? h.type : h.color === "error" ? "danger" : h.color === "success" ? "success" : h.color === "warning" ? "warning" : "text", a = (h) => h.filter((B) => {
383
+ const { ifShow: m } = B;
384
+ return typeof m == "boolean" ? m : typeof m == "function" ? m(B) : !0;
385
+ }), y = R(() => a(e.actions || [])), r = R(() => a(e.dropDownActions || [])), P = (h, B) => {
387
386
  var m;
388
- e.stopButtonPropagation && c.stopPropagation(), (m = h.onClick) == null || m.call(h, c);
389
- }, handlePopConfirm: (h, c, m) => {
390
- var k, z, x, T;
391
- e.stopButtonPropagation && m.stopPropagation(), h.popConfirm && (c === "confirm" ? (z = (k = h.popConfirm).confirm) == null || z.call(k) : (T = (x = h.popConfirm).cancel) == null || T.call(x));
387
+ e.stopButtonPropagation && B.stopPropagation(), (m = h.onClick) == null || m.call(h, B);
388
+ }, s = (h, B) => {
389
+ P(h, B);
390
+ }, p = (h, B, m) => {
391
+ var A, c, v, d;
392
+ e.stopButtonPropagation && m.stopPropagation(), h.popConfirm && (B === "confirm" ? (c = (A = h.popConfirm).confirm) == null || c.call(A) : (d = (v = h.popConfirm).cancel) == null || d.call(v));
393
+ };
394
+ return { __sfc: !0, props: e, normalizeTooltip: l, getButtonType: t, filterVisible: a, visibleActions: y, visibleDropDownActions: r, handleClick: P, handleActionClick: s, handlePopConfirm: p, handlePopConfirmConfirm: (h, B) => {
395
+ p(h, "confirm", B);
396
+ }, handlePopConfirmCancel: (h, B) => {
397
+ p(h, "cancel", B);
392
398
  }, handleDropdownCommand: (h) => {
393
- var k;
394
- const c = Number(h), m = r.value[c];
399
+ var A;
400
+ const B = Number(h), m = r.value[B];
395
401
  if (!(!m || m.disabled)) {
396
402
  if (m.popConfirm) {
397
- const z = m.popConfirm.title, x = m.popConfirm.okText || "确定", T = m.popConfirm.cancelText || "取消";
398
- ze.confirm(z, "提示", {
399
- confirmButtonText: x,
400
- cancelButtonText: T,
403
+ const c = m.popConfirm.title, v = m.popConfirm.okText || "确定", d = m.popConfirm.cancelText || "取消";
404
+ ze.confirm(c, "提示", {
405
+ confirmButtonText: v,
406
+ cancelButtonText: d,
401
407
  type: "warning"
402
408
  }).then(() => {
403
- var u, f;
404
- return (f = (u = m.popConfirm) == null ? void 0 : u.confirm) == null ? void 0 : f.call(u);
409
+ var z, I;
410
+ return (I = (z = m.popConfirm) == null ? void 0 : z.confirm) == null ? void 0 : I.call(z);
405
411
  }).catch(() => {
406
- var u, f;
407
- return (f = (u = m.popConfirm) == null ? void 0 : u.cancel) == null ? void 0 : f.call(u);
412
+ var z, I;
413
+ return (I = (z = m.popConfirm) == null ? void 0 : z.cancel) == null ? void 0 : I.call(z);
408
414
  });
409
415
  return;
410
416
  }
411
- (k = m.onClick) == null || k.call(m, {});
417
+ (A = m.onClick) == null || A.call(m, {});
412
418
  }
413
419
  } };
414
420
  }
@@ -416,7 +422,15 @@ const Ae = Oe.exports, Ve = /* @__PURE__ */ ee({
416
422
  var Ke = function() {
417
423
  var e = this, l = e._self._c, t = e._self._setupProxy;
418
424
  return l("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(a, y) {
419
- return l("span", { key: `action-${y}`, 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: (r) => t.handlePopConfirm(a, "confirm", r), cancel: (r) => t.handlePopConfirm(a, "cancel", r) } }, [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: (r) => t.handleClick(a, r) } }, "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: (r) => t.handleClick(a, r) } }, "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);
425
+ return l("span", { key: `action-${y}`, 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(r) {
426
+ return t.handlePopConfirmConfirm(a, r);
427
+ }, cancel: function(r) {
428
+ return t.handlePopConfirmCancel(a, r);
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(r) {
430
+ return t.handleActionClick(a, r);
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(r) {
432
+ return t.handleActionClick(a, r);
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);
420
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, y) {
421
435
  return l("el-dropdown-item", { key: `dropdown-${y}`, attrs: { command: y, 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))])])]);
422
436
  }), 1)], 1) : e._e()], 2);
@@ -426,23 +440,23 @@ var Ke = function() {
426
440
  Ne,
427
441
  !1,
428
442
  null,
429
- "1b2d6c42",
443
+ "f319e73a",
430
444
  null,
431
445
  null
432
446
  );
433
447
  const ke = We.exports;
434
- function ht(F) {
435
- const e = A(null), l = () => F ? ye(F) : void 0, t = () => {
448
+ function ht(x) {
449
+ const e = k(null), l = () => x ? ye(x) : void 0, t = () => {
436
450
  const r = ye(e);
437
451
  if (!r)
438
452
  throw new Error("ProTable instance has not been registered");
439
453
  return r;
440
454
  }, a = (r) => {
441
455
  e.value = r;
442
- const C = l();
443
- C && Object.keys(C).length > 0 && r.setProps(C);
456
+ const P = l();
457
+ P && Object.keys(P).length > 0 && r.setProps(P);
444
458
  };
445
- return F && U(
459
+ return x && U(
446
460
  () => l(),
447
461
  (r) => {
448
462
  r && e.value && e.value.setProps(r);
@@ -464,21 +478,21 @@ function ht(F) {
464
478
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
465
479
  setSelectedRowKeys: (r) => t().setSelectedRowKeys(r),
466
480
  deleteSelectRowByKey: (r) => t().deleteSelectRowByKey(r),
467
- updateTableData: (r, C, s) => t().updateTableData(r, C, s),
468
- updateTableDataRecord: (r, C) => t().updateTableDataRecord(r, C),
481
+ updateTableData: (r, P, s) => t().updateTableData(r, P, s),
482
+ updateTableDataRecord: (r, P) => t().updateTableDataRecord(r, P),
469
483
  deleteTableDataRecord: (r) => t().deleteTableDataRecord(r),
470
- insertTableDataRecord: (r, C) => t().insertTableDataRecord(r, C),
484
+ insertTableDataRecord: (r, P) => t().insertTableDataRecord(r, P),
471
485
  getPaginationRef: () => t().getPaginationRef(),
472
486
  getShowPagination: () => t().getShowPagination(),
473
487
  setShowPagination: (r) => t().setShowPagination(r),
474
488
  getRowSelection: () => t().getRowSelection(),
475
489
  expandAll: () => {
476
- var r, C;
477
- return (C = (r = t()).expandAll) == null ? void 0 : C.call(r);
490
+ var r, P;
491
+ return (P = (r = t()).expandAll) == null ? void 0 : P.call(r);
478
492
  },
479
493
  collapseAll: () => {
480
- var r, C;
481
- return (C = (r = t()).collapseAll) == null ? void 0 : C.call(r);
494
+ var r, P;
495
+ return (P = (r = t()).collapseAll) == null ? void 0 : P.call(r);
482
496
  }
483
497
  }];
484
498
  }
@@ -498,19 +512,19 @@ const qe = /* @__PURE__ */ ee({
498
512
  multiple: { type: Boolean }
499
513
  },
500
514
  emits: ["input"],
501
- setup(F) {
502
- const e = F, l = A(!1), t = A([]), a = (r) => {
515
+ setup(x) {
516
+ const e = x, l = k(!1), t = k([]), a = (r) => {
503
517
  e.lazy && r && y();
504
518
  }, y = async () => {
505
519
  if (e.api) {
506
520
  l.value = !0;
507
521
  try {
508
- const r = await e.api(e.params), C = Array.isArray(r) ? r : (r == null ? void 0 : r.list) ?? (r == null ? void 0 : r.data) ?? [], s = e.labelField ?? "label", v = e.valueField ?? "value";
509
- t.value = C.map((h) => {
510
- const c = h;
522
+ const r = await e.api(e.params), P = Array.isArray(r) ? r : (r == null ? void 0 : r.list) ?? (r == null ? void 0 : r.data) ?? [], s = e.labelField ?? "label", p = e.valueField ?? "value";
523
+ t.value = P.map(($) => {
524
+ const u = $;
511
525
  return {
512
- label: String(c[s] ?? c.label ?? ""),
513
- value: c[v] ?? c.value
526
+ label: String(u[s] ?? u.label ?? ""),
527
+ value: u[p] ?? u.value
514
528
  };
515
529
  });
516
530
  } finally {
@@ -565,87 +579,87 @@ const Ue = Ge.exports, Xe = /* @__PURE__ */ ee({
565
579
  clearable: { type: Boolean }
566
580
  },
567
581
  emits: ["input"],
568
- setup(F, { emit: e }) {
569
- const l = F, t = A(), a = A(), y = A(!1), r = A(!1), C = A(""), s = A([]), v = A({}), h = B(() => ({
582
+ setup(x, { emit: e }) {
583
+ const l = x, t = k(), a = k(), y = k(!1), r = k(!1), P = k(""), s = k([]), p = k({}), $ = R(() => ({
570
584
  label: l.labelField,
571
585
  children: l.childrenField
572
586
  }));
573
- function c(g) {
574
- const E = l.labelField ?? "label", I = l.valueField ?? "value", W = l.childrenField ?? "children", X = g[W], V = {};
575
- return V[l.labelField ?? "label"] = g[E] ?? g.label, V[l.valueField ?? "value"] = g[I] ?? g.value, Array.isArray(X) && X.length && (V[l.childrenField ?? "children"] = X.map((q) => c(q))), V;
587
+ function u(g) {
588
+ const L = l.labelField ?? "label", O = l.valueField ?? "value", W = l.childrenField ?? "children", X = g[W], K = {};
589
+ return K[l.labelField ?? "label"] = g[L] ?? g.label, K[l.valueField ?? "value"] = g[O] ?? g.value, Array.isArray(X) && X.length && (K[l.childrenField ?? "children"] = X.map((q) => u(q))), K;
576
590
  }
577
- function m(g, E = "") {
578
- const I = {}, W = l.labelField ?? "label", X = l.valueField ?? "value", V = l.childrenField ?? "children";
591
+ function D(g, L = "") {
592
+ const O = {}, W = l.labelField ?? "label", X = l.valueField ?? "value", K = l.childrenField ?? "children";
579
593
  for (const q of g) {
580
594
  const Y = String(q[W] ?? q.label ?? ""), j = q[X] ?? q.value;
581
- j != null && (I[String(j)] = E ? E + " / " + Y : Y);
582
- const te = q[V] ?? q.children;
583
- Array.isArray(te) && te.length && Object.assign(I, m(te, Y));
595
+ j != null && (O[String(j)] = L ? L + " / " + Y : Y);
596
+ const te = q[K] ?? q.children;
597
+ Array.isArray(te) && te.length && Object.assign(O, D(te, Y));
584
598
  }
585
- return I;
599
+ return O;
586
600
  }
587
- function k() {
601
+ function h() {
588
602
  const g = l.treeData;
589
603
  return Array.isArray(g) && g.length > 0;
590
604
  }
591
- function z(g) {
592
- s.value = g, v.value = m(g);
605
+ function B(g) {
606
+ s.value = g, p.value = D(g);
593
607
  }
594
- function x() {
608
+ function m() {
595
609
  const g = l.treeData;
596
610
  if (!Array.isArray(g) || g.length === 0)
597
611
  return;
598
- const E = g.map((I) => c(I));
599
- z(E);
612
+ const L = g.map((O) => u(O));
613
+ B(L);
600
614
  }
601
- const T = B(() => l.value == null || l.value === "" ? "" : v.value[String(l.value)] ?? String(l.value)), u = (g, E) => {
615
+ const A = R(() => l.value == null || l.value === "" ? "" : p.value[String(l.value)] ?? String(l.value)), c = (g, L) => {
602
616
  if (!g)
603
617
  return !0;
604
- const I = l.labelField ?? "label";
605
- return String(E[I] ?? E.label ?? "").toLowerCase().includes(g.toLowerCase());
618
+ const O = l.labelField ?? "label";
619
+ return String(L[O] ?? L.label ?? "").toLowerCase().includes(g.toLowerCase());
606
620
  };
607
- U(C, (g) => {
608
- var E;
609
- (E = a.value) == null || E.filter(g);
621
+ U(P, (g) => {
622
+ var L;
623
+ (L = a.value) == null || L.filter(g);
610
624
  });
611
- let f = null;
612
- function p() {
613
- l.disabled || (y.value = !0, l.lazy && !k() && N(), Fe(() => {
614
- f = (g) => {
615
- t.value && !t.value.contains(g.target) && O();
616
- }, document.addEventListener("click", f);
625
+ let v = null;
626
+ function d() {
627
+ l.disabled || (y.value = !0, l.lazy && !h() && N(), Fe(() => {
628
+ v = (g) => {
629
+ t.value && !t.value.contains(g.target) && z();
630
+ }, document.addEventListener("click", v);
617
631
  }));
618
632
  }
619
- function O() {
620
- y.value = !1, C.value = "", f && (document.removeEventListener("click", f), f = null);
633
+ function z() {
634
+ y.value = !1, P.value = "", v && (document.removeEventListener("click", v), v = null);
621
635
  }
622
- function K() {
636
+ function I() {
623
637
  e("input", void 0);
624
638
  }
625
639
  function M(g) {
626
- const E = l.valueField ?? "value", I = g[E] ?? g.value;
627
- e("input", I), O();
640
+ const L = l.valueField ?? "value", O = g[L] ?? g.value;
641
+ e("input", O), z();
628
642
  }
629
643
  async function N() {
630
- if (!(!l.api || k())) {
644
+ if (!(!l.api || h())) {
631
645
  r.value = !0;
632
646
  try {
633
- const g = await l.api(l.params), E = Array.isArray(g) ? g : (g == null ? void 0 : g.list) ?? (g == null ? void 0 : g.data) ?? [];
634
- s.value = E.map((I) => c(I)), v.value = m(s.value);
647
+ const g = await l.api(l.params), L = Array.isArray(g) ? g : (g == null ? void 0 : g.list) ?? (g == null ? void 0 : g.data) ?? [];
648
+ s.value = L.map((O) => u(O)), p.value = D(s.value);
635
649
  } finally {
636
650
  r.value = !1;
637
651
  }
638
652
  }
639
653
  }
640
654
  return we(() => {
641
- k() ? x() : l.lazy || N();
655
+ h() ? m() : l.lazy || N();
642
656
  }), U(() => l.treeData, () => {
643
- k() ? x() : (s.value = [], v.value = {}, !l.lazy && l.api && N());
657
+ h() ? m() : (s.value = [], p.value = {}, !l.lazy && l.api && N());
644
658
  }, { deep: !0 }), U(() => l.api, () => {
645
- k() || (l.lazy ? (s.value = [], v.value = {}) : N());
659
+ h() || (l.lazy ? (s.value = [], p.value = {}) : N());
646
660
  }, { deep: !0 }), U(() => l.params, () => {
647
- k() || (l.lazy ? (s.value = [], v.value = {}) : N());
648
- }, { deep: !0 }), { __sfc: !0, props: l, emit: e, rootRef: t, treeRef: a, dropdownVisible: y, loading: r, filterText: C, treeData: s, flatLabelMap: v, treeProps: h, normalizeNode: c, buildFlatLabelMap: m, hasTreeDataProp: k, applyTreeData: z, syncFromTreeDataProp: x, displayText: T, filterNodeMethod: u, clickOutsideHandler: f, openDropdown: p, closeDropdown: O, clearValue: K, onNodeClick: M, fetchData: N };
661
+ h() || (l.lazy ? (s.value = [], p.value = {}) : N());
662
+ }, { deep: !0 }), { __sfc: !0, props: l, emit: e, rootRef: t, treeRef: a, dropdownVisible: y, loading: r, filterText: P, treeData: s, flatLabelMap: p, treeProps: $, normalizeNode: u, buildFlatLabelMap: D, hasTreeDataProp: h, applyTreeData: B, syncFromTreeDataProp: m, displayText: A, filterNodeMethod: c, clickOutsideHandler: v, openDropdown: d, closeDropdown: z, clearValue: I, onNodeClick: M, fetchData: N };
649
663
  }
650
664
  });
651
665
  var Ze = function() {
@@ -675,8 +689,8 @@ const Ye = Qe.exports, et = /* @__PURE__ */ ee({
675
689
  formActionType: null,
676
690
  customComponents: null
677
691
  },
678
- setup(F) {
679
- const e = F, l = /* @__PURE__ */ new Set([
692
+ setup(x) {
693
+ const e = x, l = /* @__PURE__ */ new Set([
680
694
  "input",
681
695
  "select",
682
696
  "api-select",
@@ -688,63 +702,63 @@ const Ye = Qe.exports, et = /* @__PURE__ */ ee({
688
702
  "cascader",
689
703
  "checkbox",
690
704
  "radio"
691
- ]), t = Ce(), a = B(() => ({
705
+ ]), t = Pe(), a = R(() => ({
692
706
  schema: e.schema,
693
707
  values: e.formModel,
694
708
  model: e.formModel,
695
709
  field: e.schema.field
696
- })), y = B(() => {
697
- const u = e.schema.ifShow;
698
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(a.value);
699
- }), r = B(() => {
700
- const u = e.schema.show;
701
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(a.value);
702
- }), C = B(() => {
710
+ })), y = R(() => {
711
+ const c = e.schema.ifShow;
712
+ return c === void 0 ? !0 : typeof c == "boolean" ? c : c(a.value);
713
+ }), r = R(() => {
714
+ const c = e.schema.show;
715
+ return c === void 0 ? !0 : typeof c == "boolean" ? c : c(a.value);
716
+ }), P = R(() => {
703
717
  if (e.formDisabled)
704
718
  return !0;
705
- const u = e.schema.dynamicDisabled;
706
- return u === void 0 ? !1 : typeof u == "boolean" ? u : u(a.value);
707
- }), s = B(() => {
708
- const u = e.schema.dynamicRules;
709
- return u ? Array.isArray(u) ? u : u(a.value) : e.schema.rules;
710
- }), v = B(() => {
711
- const u = e.schema.componentProps;
712
- if (!u)
719
+ const c = e.schema.dynamicDisabled;
720
+ return c === void 0 ? !1 : typeof c == "boolean" ? c : c(a.value);
721
+ }), s = R(() => {
722
+ const c = e.schema.dynamicRules;
723
+ return c ? Array.isArray(c) ? c : c(a.value) : e.schema.rules;
724
+ }), p = R(() => {
725
+ const c = e.schema.componentProps;
726
+ if (!c)
713
727
  return { props: {}, listeners: {} };
714
- const f = typeof u == "function" ? u({
728
+ const v = typeof c == "function" ? c({
715
729
  ...a.value,
716
730
  formActionType: e.formActionType
717
- }) : { ...u }, p = {}, O = {};
718
- for (const [K, M] of Object.entries(f))
719
- if (K.length > 2 && /^on[A-Za-z]/.test(K) && typeof M == "function") {
720
- const N = K.slice(2).charAt(0).toLowerCase() + K.slice(3);
721
- O[N] = M;
731
+ }) : { ...c }, d = {}, z = {};
732
+ for (const [I, M] of Object.entries(v))
733
+ if (I.length > 2 && /^on[A-Za-z]/.test(I) && typeof M == "function") {
734
+ const N = I.slice(2).charAt(0).toLowerCase() + I.slice(3);
735
+ z[N] = M;
722
736
  } else
723
- p[K] = M;
724
- return { props: p, listeners: O };
725
- }), h = B(() => v.value.props), c = B(() => v.value.listeners), m = B(() => !!t.default), k = (u) => {
726
- const f = u == null ? void 0 : u.options;
727
- return Array.isArray(f) ? f : void 0;
728
- }, z = B(() => {
729
- const u = e.schema.component;
730
- return u == null ? null : typeof u == "string" ? l.has(u) ? null : e.customComponents && e.customComponents[u] || u : u;
731
- }), x = (u) => {
732
- e.formModel[e.schema.field] = u;
733
- }, T = B(() => {
734
- const u = e.schema.render;
735
- return u ? {
737
+ d[I] = M;
738
+ return { props: d, listeners: z };
739
+ }), $ = R(() => p.value.props), u = R(() => p.value.listeners), D = R(() => !!t.default), h = (c) => {
740
+ const v = c == null ? void 0 : c.options;
741
+ return Array.isArray(v) ? v : void 0;
742
+ }, B = R(() => {
743
+ const c = e.schema.component;
744
+ return c == null ? null : typeof c == "string" ? l.has(c) ? null : e.customComponents && e.customComponents[c] || c : c;
745
+ }), m = (c) => {
746
+ e.formModel[e.schema.field] = c;
747
+ }, A = R(() => {
748
+ const c = e.schema.render;
749
+ return c ? {
736
750
  render() {
737
- const f = u(a.value);
738
- return Array.isArray(f) ? ce("span", f) : f;
751
+ const v = c(a.value);
752
+ return Array.isArray(v) ? ce("span", v) : v;
739
753
  }
740
754
  } : null;
741
755
  });
742
- return { __sfc: !0, BUILT_IN_COMPONENTS: l, props: e, slots: t, renderParams: a, shouldRender: y, shouldShow: r, effectiveDisabled: C, effectiveRules: s, effectiveComponentPropsAndListeners: v, effectiveComponentProps: h, effectiveComponentListeners: c, hasSlot: m, getOptions: k, resolvedCustomComponent: z, setFieldValue: x, renderComponent: T, ApiSelect: Ue, TreeSelect: Ye };
756
+ return { __sfc: !0, BUILT_IN_COMPONENTS: l, props: e, slots: t, renderParams: a, shouldRender: y, shouldShow: r, effectiveDisabled: P, effectiveRules: s, effectiveComponentPropsAndListeners: p, effectiveComponentProps: $, effectiveComponentListeners: u, hasSlot: D, getOptions: h, resolvedCustomComponent: B, setFieldValue: m, renderComponent: A, ApiSelect: Ue, TreeSelect: Ye };
743
757
  }
744
758
  });
745
759
  var tt = function() {
746
760
  var e = this, l = e._self._c, t = e._self._setupProxy;
747
- 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 } }, [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, y) {
761
+ 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, y) {
748
762
  return l("div", { key: y, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(a) + " ")]);
749
763
  }) : 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) {
750
764
  e.$set(e.formModel, e.schema.field, a);
@@ -777,7 +791,7 @@ var tt = function() {
777
791
  lt,
778
792
  !1,
779
793
  null,
780
- "0dcbe9b0",
794
+ "2227d67d",
781
795
  null,
782
796
  null
783
797
  );
@@ -798,7 +812,7 @@ const Te = ot.exports, at = /* @__PURE__ */ ee({
798
812
  actionColOptions: null
799
813
  },
800
814
  emits: ["submit", "reset", "toggle"],
801
- setup(F) {
815
+ setup(x) {
802
816
  return { __sfc: !0 };
803
817
  }
804
818
  });
@@ -850,20 +864,20 @@ const De = rt.exports, it = /* @__PURE__ */ ee({
850
864
  components: null
851
865
  },
852
866
  emits: ["submit", "reset", "register"],
853
- setup(F, { expose: e, emit: l }) {
854
- const t = F, a = Ce(), y = A(), r = A(), C = A(!1), s = A(!0), v = A({}), h = A({}), c = A([]), m = A({}), k = { xl: 1920, lg: 1200, md: 992, sm: 768 }, z = (i, _, S) => {
855
- const P = S ?? (typeof window < "u" ? window.innerWidth : 1920), w = i ?? {}, $ = _ ?? {}, H = $.span ?? 8;
856
- return P >= k.xl ? w.xl ?? $.xl ?? w.lg ?? $.lg ?? w.md ?? $.md ?? w.sm ?? $.sm ?? w.xs ?? $.xs ?? w.span ?? H : P >= k.lg ? w.lg ?? $.lg ?? w.md ?? $.md ?? w.sm ?? $.sm ?? w.xs ?? $.xs ?? w.span ?? H : P >= k.md ? w.md ?? $.md ?? w.sm ?? $.sm ?? w.xs ?? $.xs ?? w.span ?? H : P >= k.sm ? w.sm ?? $.sm ?? w.xs ?? $.xs ?? w.span ?? H : w.xs ?? $.xs ?? w.span ?? H;
857
- }, { getSetting: x } = Be(), T = B(() => ({ ...x("ProForm"), ...t, ...m.value })), u = B(() => ({
858
- ...x("ProForm").components ?? {},
867
+ setup(x, { expose: e, emit: l }) {
868
+ const t = x, a = Pe(), y = k(), r = k(), P = k(!1), s = k(!0), p = k({}), $ = k({}), u = k([]), D = k({}), h = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (i, _, S) => {
869
+ const C = S ?? (typeof window < "u" ? window.innerWidth : 1920), w = i ?? {}, E = _ ?? {}, H = E.span ?? 8;
870
+ return C >= h.xl ? w.xl ?? E.xl ?? w.lg ?? E.lg ?? w.md ?? E.md ?? w.sm ?? E.sm ?? w.xs ?? E.xs ?? w.span ?? H : C >= h.lg ? w.lg ?? E.lg ?? w.md ?? E.md ?? w.sm ?? E.sm ?? w.xs ?? E.xs ?? w.span ?? H : C >= h.md ? w.md ?? E.md ?? w.sm ?? E.sm ?? w.xs ?? E.xs ?? w.span ?? H : C >= h.sm ? w.sm ?? E.sm ?? w.xs ?? E.xs ?? w.span ?? H : w.xs ?? E.xs ?? w.span ?? H;
871
+ }, { getSetting: m } = Be(), A = R(() => ({ ...m("ProForm"), ...t, ...D.value })), c = R(() => ({
872
+ ...m("ProForm").components ?? {},
859
873
  ...t.components ?? {},
860
- ...m.value.components ?? {}
861
- })), f = B(() => T.value.actionColOptions ?? { span: 24 }), p = A(typeof window < "u" ? window.innerWidth : 1920), O = (i, _, S, P) => {
862
- let w = 24, $ = 1, H = 0;
874
+ ...D.value.components ?? {}
875
+ })), v = R(() => A.value.actionColOptions ?? { span: 24 }), d = k(typeof window < "u" ? window.innerWidth : 1920), z = (i, _, S, C) => {
876
+ let w = 24, E = 1, H = 0;
863
877
  for (const Q of i) {
864
- const ne = z(Q.colProps, _, P);
878
+ const ne = B(Q.colProps, _, C);
865
879
  if (ne > w) {
866
- if ($++, $ > S)
880
+ if (E++, E > S)
867
881
  break;
868
882
  w = 24 - ne;
869
883
  } else
@@ -871,90 +885,90 @@ const De = rt.exports, it = /* @__PURE__ */ ee({
871
885
  H++;
872
886
  }
873
887
  return H;
874
- }, K = B(() => {
875
- const i = c.value.filter((w) => g(w));
876
- if (!T.value.showAdvancedButton)
888
+ }, I = R(() => {
889
+ const i = u.value.filter((w) => g(w));
890
+ if (!A.value.showAdvancedButton)
877
891
  return !1;
878
- const _ = T.value.alwaysShowLines ?? 1, S = T.value.baseColProps, P = O(i, S, _, p.value);
879
- return console.log(i.length, P), i.length > P;
880
- }), M = B(() => T.value.formListeners ?? {}), N = B(() => {
881
- const i = c.value.filter((w) => g(w));
882
- if (!T.value.showAdvancedButton || !s.value)
892
+ const _ = A.value.alwaysShowLines ?? 1, S = A.value.baseColProps, C = z(i, S, _, d.value);
893
+ return console.log(i.length, C), i.length > C;
894
+ }), M = R(() => A.value.formListeners ?? {}), N = R(() => {
895
+ const i = u.value.filter((w) => g(w));
896
+ if (!A.value.showAdvancedButton || !s.value)
883
897
  return i;
884
- const _ = T.value.alwaysShowLines ?? 1, S = T.value.baseColProps, P = O(i, S, _, p.value);
885
- return i.slice(0, P);
898
+ const _ = A.value.alwaysShowLines ?? 1, S = A.value.baseColProps, C = z(i, S, _, d.value);
899
+ return i.slice(0, C);
886
900
  }), g = (i) => {
887
901
  let _ = !0, S = !0;
888
- return typeof i.ifShow == "function" && (_ = i.ifShow({ schema: i, values: v.value, model: v.value, field: i.field })), typeof i.ifShow == "boolean" && (_ = i.ifShow), typeof i.show == "function" && (S = i.show({ schema: i, values: v.value, model: v.value, field: i.field })), typeof i.show == "boolean" && (S = i.show), _ && S;
889
- }, E = (i) => i.colProps ?? T.value.baseColProps ?? {}, I = (i) => i.slot || i.field, W = () => {
890
- const i = {}, _ = {}, S = T.value.initialValues ?? t.initialValues;
891
- c.value.forEach((P) => {
902
+ return typeof i.ifShow == "function" && (_ = i.ifShow({ schema: i, values: p.value, model: p.value, field: i.field })), typeof i.ifShow == "boolean" && (_ = i.ifShow), typeof i.show == "function" && (S = i.show({ schema: i, values: p.value, model: p.value, field: i.field })), typeof i.show == "boolean" && (S = i.show), _ && S;
903
+ }, L = (i) => i.colProps ?? A.value.baseColProps ?? {}, O = (i) => i.slot || i.field, W = () => {
904
+ const i = {}, _ = {}, S = A.value.initialValues ?? t.initialValues;
905
+ u.value.forEach((C) => {
892
906
  var w;
893
- i[P.field] = P.defaultValue ?? (S == null ? void 0 : S[P.field]), (w = P.rules) != null && w.length && (_[P.field] = P.rules);
894
- }), v.value = { ...v.value, ...i }, h.value = _;
907
+ i[C.field] = C.defaultValue ?? (S == null ? void 0 : S[C.field]), (w = C.rules) != null && w.length && (_[C.field] = C.rules);
908
+ }), p.value = { ...p.value, ...i }, $.value = _;
895
909
  }, X = (i) => {
896
910
  const _ = { ...i };
897
- return c.value.forEach((S) => {
898
- const P = S.ifShow;
899
- if (P === void 0)
911
+ return u.value.forEach((S) => {
912
+ const C = S.ifShow;
913
+ if (C === void 0)
900
914
  return;
901
- (typeof P == "boolean" ? P : P({ schema: S, values: i, model: i, field: S.field })) || delete _[S.field];
915
+ (typeof C == "boolean" ? C : C({ schema: S, values: i, model: i, field: S.field })) || delete _[S.field];
902
916
  }), _;
903
- }, V = (i) => {
904
- const _ = X(i), S = m.value.fieldMapToTime;
917
+ }, K = (i) => {
918
+ const _ = X(i), S = D.value.fieldMapToTime;
905
919
  if (!(S != null && S.length))
906
920
  return _;
907
- const P = { ..._ };
908
- return S.forEach(([w, [$, H]]) => {
909
- const Q = P[w];
910
- Array.isArray(Q) && Q.length === 2 && (delete P[w], P[$] = Q[0], P[H] = Q[1]);
911
- }), P;
921
+ const C = { ..._ };
922
+ return S.forEach(([w, [E, H]]) => {
923
+ const Q = C[w];
924
+ Array.isArray(Q) && Q.length === 2 && (delete C[w], C[E] = Q[0], C[H] = Q[1]);
925
+ }), C;
912
926
  }, q = async () => {
913
927
  var i;
914
928
  try {
915
- await ((i = y.value) == null ? void 0 : i.validate()), T.value.submitFunc ? await T.value.submitFunc() : (C.value = !0, l("submit", V({ ...v.value })));
929
+ await ((i = y.value) == null ? void 0 : i.validate()), A.value.submitFunc ? await A.value.submitFunc() : (P.value = !0, l("submit", K({ ...p.value })));
916
930
  } catch (_) {
917
931
  console.error("Form validation failed:", _);
918
932
  } finally {
919
- C.value = !1;
933
+ P.value = !1;
920
934
  }
921
935
  }, Y = async () => {
922
936
  var i;
923
- T.value.resetFunc ? await T.value.resetFunc() : ((i = y.value) == null || i.resetFields(), W(), l("reset"), T.value.submitOnReset && await q());
924
- }, j = (i) => (v.value = { ...v.value, ...i }, Promise.resolve()), te = () => V({ ...v.value }), ue = async () => {
937
+ A.value.resetFunc ? await A.value.resetFunc() : ((i = y.value) == null || i.resetFields(), W(), l("reset"), A.value.submitOnReset && await q());
938
+ }, j = (i) => (p.value = { ...p.value, ...i }, Promise.resolve()), te = () => K({ ...p.value }), ue = async () => {
925
939
  var i;
926
940
  (i = y.value) == null || i.resetFields(), W();
927
941
  }, de = (i) => {
928
942
  var _;
929
943
  return ((_ = y.value) == null ? void 0 : _.validate(i)) ?? Promise.resolve();
930
- }, fe = (i) => y.value ? i != null && i.length ? Promise.all(i.map((_) => new Promise((S, P) => {
931
- y.value.validateField(_, (w) => w ? S(void 0) : P(new Error("Validation failed")));
944
+ }, fe = (i) => y.value ? i != null && i.length ? Promise.all(i.map((_) => new Promise((S, C) => {
945
+ y.value.validateField(_, (w) => w ? S(void 0) : C(new Error("Validation failed")));
932
946
  }))) : y.value.validate() : Promise.resolve(), pe = async (i, _) => {
933
- var P;
934
- const S = (P = r.value) == null ? void 0 : P.querySelector(`[data-field="${i}"]`);
947
+ var C;
948
+ const S = (C = r.value) == null ? void 0 : C.querySelector(`[data-field="${i}"]`);
935
949
  return S && S.scrollIntoView({ behavior: (_ == null ? void 0 : _.behavior) ?? "smooth", block: (_ == null ? void 0 : _.block) ?? "nearest" }), Promise.resolve();
936
950
  }, ve = (i) => {
937
951
  var _;
938
952
  (_ = y.value) == null || _.clearValidate(i);
939
953
  }, Z = async (i) => {
940
954
  (Array.isArray(i) ? i : [i]).forEach((S) => {
941
- const P = c.value.findIndex((w) => w.field === S.field);
942
- P >= 0 && (c.value[P] = { ...c.value[P], ...S });
955
+ const C = u.value.findIndex((w) => w.field === S.field);
956
+ C >= 0 && (u.value[C] = { ...u.value[C], ...S });
943
957
  });
944
958
  }, me = async (i, _, S) => {
945
959
  if (S)
946
- c.value.unshift(i);
960
+ u.value.unshift(i);
947
961
  else if (_) {
948
- const P = c.value.findIndex((w) => w.field === _);
949
- c.value.splice(P + 1, 0, i);
962
+ const C = u.value.findIndex((w) => w.field === _);
963
+ u.value.splice(C + 1, 0, i);
950
964
  } else
951
- c.value.push(i);
965
+ u.value.push(i);
952
966
  W();
953
967
  }, he = async (i) => {
954
968
  const _ = Array.isArray(i) ? i : [i];
955
- c.value = c.value.filter((S) => !_.includes(S.field));
969
+ u.value = u.value.filter((S) => !_.includes(S.field));
956
970
  }, be = async (i) => {
957
- m.value = { ...m.value, ...i }, i.schemas && (c.value = [...i.schemas], W());
971
+ D.value = { ...D.value, ...i }, i.schemas && (u.value = [...i.schemas], W());
958
972
  }, J = {
959
973
  getFieldsValue: te,
960
974
  setFieldsValue: j,
@@ -971,15 +985,15 @@ const De = rt.exports, it = /* @__PURE__ */ ee({
971
985
  };
972
986
  e(J);
973
987
  const se = () => {
974
- c.value = [...t.schemas ?? []], W();
988
+ u.value = [...t.schemas ?? []], W();
975
989
  }, re = () => {
976
- typeof window < "u" && (p.value = window.innerWidth);
990
+ typeof window < "u" && (d.value = window.innerWidth);
977
991
  };
978
992
  return we(() => {
979
993
  se(), l("register", J), typeof window < "u" && window.addEventListener("resize", re);
980
994
  }), Re(() => {
981
995
  typeof window < "u" && window.removeEventListener("resize", re);
982
- }), U(() => [t.schemas, t.initialValues], se, { deep: !0 }), { __sfc: !0, props: t, emit: l, slots: a, formRef: y, formWrapRef: r, submitLoading: C, collapsed: s, formModel: v, formRules: h, innerSchemas: c, innerProps: m, BREAKPOINTS: k, getEffectiveSpan: z, getComponentSetting: x, effectiveProps: T, formCustomComponents: u, effectiveActionColOptions: f, windowWidth: p, getVisibleSchemaCount: O, hasMoreFields: K, formListeners: M, displaySchemas: N, shouldShow: g, getColProps: E, getSlotName: I, initForm: W, filterByIfShow: X, processFieldMapToTime: V, handleSubmit: q, handleReset: Y, setFieldsValue: j, getFieldsValue: te, resetFields: ue, validate: de, validateFields: fe, scrollToField: pe, clearValidate: ve, updateSchema: Z, appendSchemaByField: me, removeSchemaByField: he, setProps: be, formActionRef: J, syncSchemas: se, handleResize: re, ProFormItem: Te, FormActions: De };
996
+ }), U(() => [t.schemas, t.initialValues], se, { deep: !0 }), { __sfc: !0, props: t, emit: l, slots: a, formRef: y, formWrapRef: r, submitLoading: P, collapsed: s, formModel: p, formRules: $, innerSchemas: u, innerProps: D, BREAKPOINTS: h, getEffectiveSpan: B, getComponentSetting: m, effectiveProps: A, formCustomComponents: c, effectiveActionColOptions: v, windowWidth: d, getVisibleSchemaCount: z, hasMoreFields: I, formListeners: M, displaySchemas: N, shouldShow: g, getColProps: L, getSlotName: O, initForm: W, filterByIfShow: X, processFieldMapToTime: K, handleSubmit: q, handleReset: Y, setFieldsValue: j, getFieldsValue: te, resetFields: ue, validate: de, validateFields: fe, scrollToField: pe, clearValidate: ve, updateSchema: Z, appendSchemaByField: me, removeSchemaByField: he, setProps: be, formActionRef: J, syncSchemas: se, handleResize: re, ProFormItem: Te, FormActions: De };
983
997
  }
984
998
  });
985
999
  var ct = function() {
@@ -1003,68 +1017,68 @@ var ct = function() {
1003
1017
  null
1004
1018
  );
1005
1019
  const Me = dt.exports;
1006
- function bt(F) {
1007
- const e = A(null), l = A(F ? ye(F) : void 0), t = () => F ? ye(F) : void 0, a = (f) => {
1008
- e.value = f;
1009
- const p = t();
1010
- p && Object.keys(p).length > 0 && f.setProps(p);
1020
+ function bt(x) {
1021
+ const e = k(null), l = k(x ? ye(x) : void 0), t = () => x ? ye(x) : void 0, a = (v) => {
1022
+ e.value = v;
1023
+ const d = t();
1024
+ d && Object.keys(d).length > 0 && v.setProps(d);
1011
1025
  };
1012
- return F && U(
1026
+ return x && U(
1013
1027
  () => t(),
1014
- (f) => {
1015
- l.value = f, f && e.value && e.value.setProps(f);
1028
+ (v) => {
1029
+ l.value = v, v && e.value && e.value.setProps(v);
1016
1030
  },
1017
1031
  { deep: !0 }
1018
1032
  ), [a, {
1019
1033
  register: a,
1020
1034
  formAction: e,
1021
1035
  getFieldsValue: () => {
1022
- var f;
1023
- return ((f = e.value) == null ? void 0 : f.getFieldsValue()) ?? {};
1036
+ var v;
1037
+ return ((v = e.value) == null ? void 0 : v.getFieldsValue()) ?? {};
1024
1038
  },
1025
- setFieldsValue: async (f) => {
1026
- var p;
1027
- await ((p = e.value) == null ? void 0 : p.setFieldsValue(f));
1039
+ setFieldsValue: async (v) => {
1040
+ var d;
1041
+ await ((d = e.value) == null ? void 0 : d.setFieldsValue(v));
1028
1042
  },
1029
1043
  resetFields: async () => {
1030
- var f;
1031
- await ((f = e.value) == null ? void 0 : f.resetFields());
1044
+ var v;
1045
+ await ((v = e.value) == null ? void 0 : v.resetFields());
1032
1046
  },
1033
- validate: (f) => {
1034
- var p;
1035
- return ((p = e.value) == null ? void 0 : p.validate(f)) ?? Promise.resolve();
1047
+ validate: (v) => {
1048
+ var d;
1049
+ return ((d = e.value) == null ? void 0 : d.validate(v)) ?? Promise.resolve();
1036
1050
  },
1037
- validateFields: (f) => {
1038
- var p;
1039
- return ((p = e.value) == null ? void 0 : p.validateFields(f)) ?? Promise.resolve();
1051
+ validateFields: (v) => {
1052
+ var d;
1053
+ return ((d = e.value) == null ? void 0 : d.validateFields(v)) ?? Promise.resolve();
1040
1054
  },
1041
1055
  submit: () => {
1042
- var f;
1043
- return ((f = e.value) == null ? void 0 : f.submit()) ?? Promise.resolve();
1056
+ var v;
1057
+ return ((v = e.value) == null ? void 0 : v.submit()) ?? Promise.resolve();
1044
1058
  },
1045
- scrollToField: (f, p) => {
1046
- var O;
1047
- return ((O = e.value) == null ? void 0 : O.scrollToField(f, p)) ?? Promise.resolve();
1059
+ scrollToField: (v, d) => {
1060
+ var z;
1061
+ return ((z = e.value) == null ? void 0 : z.scrollToField(v, d)) ?? Promise.resolve();
1048
1062
  },
1049
- clearValidate: (f) => {
1050
- var p;
1051
- (p = e.value) == null || p.clearValidate(f);
1063
+ clearValidate: (v) => {
1064
+ var d;
1065
+ (d = e.value) == null || d.clearValidate(v);
1052
1066
  },
1053
- updateSchema: (f) => {
1054
- var p;
1055
- return ((p = e.value) == null ? void 0 : p.updateSchema(f)) ?? Promise.resolve();
1067
+ updateSchema: (v) => {
1068
+ var d;
1069
+ return ((d = e.value) == null ? void 0 : d.updateSchema(v)) ?? Promise.resolve();
1056
1070
  },
1057
- appendSchemaByField: (f, p, O) => {
1058
- var K;
1059
- return ((K = e.value) == null ? void 0 : K.appendSchemaByField(f, p, O)) ?? Promise.resolve();
1071
+ appendSchemaByField: (v, d, z) => {
1072
+ var I;
1073
+ return ((I = e.value) == null ? void 0 : I.appendSchemaByField(v, d, z)) ?? Promise.resolve();
1060
1074
  },
1061
- removeSchemaByField: (f) => {
1062
- var p;
1063
- return ((p = e.value) == null ? void 0 : p.removeSchemaByField(f)) ?? Promise.resolve();
1075
+ removeSchemaByField: (v) => {
1076
+ var d;
1077
+ return ((d = e.value) == null ? void 0 : d.removeSchemaByField(v)) ?? Promise.resolve();
1064
1078
  },
1065
- setProps: async (f) => {
1066
- var p;
1067
- l.value = { ...l.value, ...f }, await ((p = e.value) == null ? void 0 : p.setProps(f));
1079
+ setProps: async (v) => {
1080
+ var d;
1081
+ l.value = { ...l.value, ...v }, await ((d = e.value) == null ? void 0 : d.setProps(v));
1068
1082
  }
1069
1083
  }];
1070
1084
  }
@@ -1075,9 +1089,9 @@ const ft = [
1075
1089
  { name: "ProFormItem", component: Te },
1076
1090
  { name: "FormActions", component: De }
1077
1091
  ];
1078
- function pt(F) {
1092
+ function pt(x) {
1079
1093
  ft.forEach(({ name: e, component: l }) => {
1080
- F.component(e, l);
1094
+ x.component(e, l);
1081
1095
  });
1082
1096
  }
1083
1097
  const _t = {