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

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 $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 Q, h as ne, useSlots as Pe, ref as k, computed as F, onMounted as ge, nextTick as Fe, onUnmounted as Re, watch as H, unref as _e } from "vue";
2
2
  import { MessageBox as ze } from "element-ui";
3
- const ge = $e({});
3
+ const be = $e({});
4
4
  function Be() {
5
5
  return {
6
- getSetting: (l) => l === void 0 ? { ...ge } : { ...ge[l] ?? {} },
7
- setSetting: (l, t) => {
8
- const a = ge[l];
9
- ge[l] = a ? { ...a, ...t } : { ...t };
6
+ getSetting: (o) => o === void 0 ? { ...be } : { ...be[o] ?? {} },
7
+ setSetting: (o, t) => {
8
+ const a = be[o];
9
+ be[o] = a ? { ...a, ...t } : { ...t };
10
10
  }
11
11
  };
12
12
  }
13
- const Ee = /* @__PURE__ */ ee({
13
+ const Ee = /* @__PURE__ */ Q({
14
14
  __name: "ProTable",
15
15
  props: {
16
16
  columns: null,
@@ -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: o }) {
58
+ const t = x, a = Q({
59
59
  name: "EcpProTableDefaultCellRenderer",
60
60
  props: {
61
61
  column: { type: Object, required: !0 },
@@ -63,22 +63,22 @@ const Ee = /* @__PURE__ */ ee({
63
63
  index: { type: Number, required: !0 },
64
64
  value: { required: !1 }
65
65
  },
66
- setup(o) {
66
+ setup(l) {
67
67
  return () => {
68
- var d, b;
69
- const n = o.column;
68
+ var u, g;
69
+ const n = l.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 D = n.customRender({ text: l.value, record: l.record, index: l.index });
72
+ return typeof D == "string" || typeof D == "number" ? ne("span", String(D)) : D;
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 D = ((g = (u = n.valueEnum) == null ? void 0 : u[l.value]) == null ? void 0 : g.text) ?? l.value;
76
+ return ne("span", D == null ? "" : String(D));
77
77
  }
78
- return ce("span", o.value == null ? "" : String(o.value));
78
+ return ne("span", l.value == null ? "" : String(l.value));
79
79
  };
80
80
  }
81
- }), y = ee({
81
+ }), C = Q({
82
82
  name: "EcpProTableBodyCellRenderer",
83
83
  props: {
84
84
  slotRender: { type: Function, required: !0 },
@@ -89,400 +89,414 @@ const Ee = /* @__PURE__ */ ee({
89
89
  customRender: { type: Function, required: !1 },
90
90
  valueEnum: { type: Object, required: !1 }
91
91
  },
92
- setup(o) {
92
+ setup(l) {
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 = l.slotRender, u = n == null ? void 0 : n({ column: l.column, record: l.record, index: l.index, value: l.value });
95
+ if (((O) => O == null ? [] : Array.isArray(O) ? O.filter((j) => j != null && j !== !1 && !j.isComment) : [O])(u).length > 0)
96
+ return u;
97
+ const R = { ...l.column };
98
+ return l.customRender && (R.customRender = l.customRender), l.valueEnum && (R.valueEnum = l.valueEnum), ne(a, { props: { column: R, record: l.record, index: l.index, value: l.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
+ }), i = Pe(), S = k(), s = k(), _ = k(0), $ = k(t.loading ?? !1), f = k([]), M = k({}), h = k([]), A = k({}), m = k([]), B = 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;
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) => {
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;
106
+ }), { getSetting: p } = Be(), d = F(() => ({ ...p("ProTable"), ...t, ...A.value })), z = F(() => !!d.value.title || !!i.tableTitle || !!i.toolbar), E = F(() => B.value !== null ? B.value : !!t.pagination && typeof t.pagination == "object"), T = F(() => d.value.rowKey || "id"), L = F(() => new Set(m.value.map((l) => l[T.value]))), P = F(
107
+ () => h.value.filter((l) => !l.hideInTable && !l.defaultHidden)
108
+ ), I = F(() => {
109
+ var n, u;
110
+ let l = 0;
111
+ return d.value.rowSelection && (l += Number(d.value.rowSelection.width) || 48), d.value.showIndexColumn && (l += Number((n = d.value.indexColumnProps) == null ? void 0 : n.width) || 60), d.value.actionColumn && (l += Number((u = d.value.actionColumn) == null ? void 0 : u.width) || 150), l;
112
+ }), V = (l) => typeof l == "number" && l > 0, G = F(() => P.value.filter((n) => q(n) && V(n.width)).reduce((n, u) => n + (typeof u.width == "number" ? u.width : 0), 0)), X = F(() => P.value.filter((n) => q(n) && typeof n.width == "string").reduce((n, u) => n + (Number(K(u)) || 80), 0)), N = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, K = (l) => {
113
+ const n = l.width;
114
+ if (V(n) && G.value > 0 && _.value > 0 && typeof n == "number") {
115
+ const u = _.value - I.value - X.value;
116
+ let g = Math.floor(u * n / G.value);
117
+ const D = N(l.minWidth) ?? 60, R = N(l.maxWidth);
118
+ return g = Math.max(D, g), R != null && (g = Math.min(R, g)), g;
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 u = N(n) ?? 80, g = N(l.minWidth), D = N(l.maxWidth);
122
+ let R = u;
123
+ return g != null && (R = Math.max(g, R)), D != null && (R = Math.min(D, R)), R;
124
124
  }
125
- return o.width;
126
- }, Y = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, j = B(() => {
125
+ return l.width;
126
+ }, q = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, W = F(() => {
127
127
  var n;
128
- const o = (n = p.value.rowSelection) == null ? void 0 : n.getCheckboxProps;
129
- return o ? c.value.filter((d) => {
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(() => {
134
- const o = j.value.filter((n) => N.value.has(n[M.value])).length;
135
- return o > 0 && o < j.value.length;
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;
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;
128
+ const l = (n = d.value.rowSelection) == null ? void 0 : n.getCheckboxProps;
129
+ return l ? f.value.filter((u) => {
130
+ var g;
131
+ return !((g = l(u)) != null && g.disabled);
132
+ }) : f.value;
133
+ }), U = F(() => W.value.length > 0), se = F(() => W.value.length === 0 ? !1 : W.value.every((l) => L.value.has(l[T.value]))), le = F(() => {
134
+ const l = W.value.filter((n) => L.value.has(n[T.value])).length;
135
+ return l > 0 && l < W.value.length;
136
+ }), oe = (l) => L.value.has(l[T.value]), ye = (l) => {
137
+ var n, u, g;
138
+ return ((g = (u = (n = d.value.rowSelection) == null ? void 0 : n.getCheckboxProps) == null ? void 0 : u.call(n, l)) == null ? void 0 : g.disabled) ?? !1;
139
+ }, re = (l) => {
140
+ var n, u, g;
141
+ return ((g = (u = (n = d.value.rowSelection) == null ? void 0 : n.getRadioProps) == null ? void 0 : u.call(n, l)) == null ? void 0 : g.disabled) ?? !1;
142
142
  }, Z = () => {
143
- const o = x.value.map((n) => n[M.value]);
144
- l("selection-change", { keys: o, rows: x.value });
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();
148
- }, he = (o) => {
149
- x.value = [o], Z();
150
- }, be = (o) => {
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];
143
+ const l = m.value.map((n) => n[T.value]);
144
+ o("selection-change", { keys: l, rows: m.value });
145
+ }, ie = (l, n) => {
146
+ const u = l[T.value];
147
+ n ? m.value = [...m.value.filter((g) => g[T.value] !== u), l] : m.value = m.value.filter((g) => g[T.value] !== u), Z();
148
+ }, we = (l) => {
149
+ m.value = [l], Z();
150
+ }, ce = (l) => {
151
+ if (l) {
152
+ const n = new Set(m.value.map((g) => g[T.value])), u = W.value.filter((g) => !n.has(g[T.value]));
153
+ m.value = [...m.value, ...u];
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(f.value.map((u) => u[T.value]));
156
+ m.value = m.value.filter((u) => !n.has(u[T.value]));
157
157
  }
158
158
  Z();
159
- }, J = async (o) => {
159
+ }, J = async (l) => {
160
160
  if (!t.api) {
161
161
  if (t.dataSource)
162
162
  return;
163
- c.value = [];
163
+ f.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 ?? {}, u = n.pageField ?? "page", g = n.sizeField ?? "pageSize", D = n.listField ?? "list", R = n.totalField ?? "total", O = {
169
+ [u]: (l == null ? void 0 : l.page) ?? c.value.page,
170
+ [g]: (l == null ? void 0 : l.pageSize) ?? c.value.pageSize,
171
171
  ...t.searchInfo,
172
- ...o == null ? void 0 : o.searchInfo
172
+ ...l == null ? void 0 : l.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
+ (l == null ? void 0 : l.page) != null && (c.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (c.value.pageSize = l.pageSize);
175
+ const j = t.beforeFetch ? t.beforeFetch(O) : O, Ce = await t.api(j);
176
+ M.value = Ce || {};
177
+ const he = t.afterFetch ? t.afterFetch(Ce) : Ce, Se = he[D] ?? he.items ?? he.list ?? [], xe = he[R] ?? 0;
178
+ f.value = Se, c.value.total = xe, o("fetch-success", { items: Se, total: xe });
179
179
  } catch (n) {
180
- l("fetch-error", n);
180
+ o("fetch-error", n);
181
181
  } finally {
182
- h.value = !1;
182
+ $.value = !1;
183
183
  }
184
- }, se = () => J(void 0), re = (o) => {
185
- p.value.clearSelectOnPageChange && (x.value = []), u.value.pageSize = o, u.value.page = 1, J(void 0);
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 = {
189
- setProps: (o) => {
190
- z.value = { ...z.value, ...o };
184
+ }, ue = () => J(void 0), de = (l) => {
185
+ d.value.clearSelectOnPageChange && (m.value = []), c.value.pageSize = l, c.value.page = 1, J(void 0);
186
+ }, fe = (l) => {
187
+ d.value.clearSelectOnPageChange && (m.value = []), c.value.page = l, J(void 0);
188
+ }, pe = (l, n, u) => o("row-click", l, u), ve = (l, n, u) => o("row-dblclick", l, u), me = ({ prop: l, order: n }) => o("sort-change", { prop: l, order: n }), ae = (l, n) => o("expand-change", l, n), te = (l) => f.value.findIndex((n) => n[T.value] === l), Y = {
189
+ setProps: (l) => {
190
+ A.value = { ...A.value, ...l };
191
191
  },
192
- reload: (o) => J(o),
192
+ reload: (l) => J(l),
193
193
  redoHeight: () => {
194
- var o, n;
195
- (n = (o = C.value) == null ? void 0 : o.doLayout) == null || n.call(o);
194
+ var l, n;
195
+ (n = (l = S.value) == null ? void 0 : l.doLayout) == null || n.call(l);
196
196
  },
197
- setLoading: (o) => {
198
- h.value = o;
197
+ setLoading: (l) => {
198
+ $.value = l;
199
199
  },
200
- getDataSource: () => c.value,
201
- getRawDataSource: () => m.value,
202
- setTableData: (o) => {
203
- c.value = o ?? [];
200
+ getDataSource: () => f.value,
201
+ getRawDataSource: () => M.value,
202
+ setTableData: (l) => {
203
+ f.value = l ?? [];
204
204
  },
205
- getColumns: () => k.value,
206
- setColumns: (o) => {
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);
205
+ getColumns: () => h.value,
206
+ setColumns: (l) => {
207
+ if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
208
+ const n = l, u = (t.columns ?? []).filter((D) => n.includes(D.key ?? D.dataIndex)), g = n.map((D) => u.find((R) => (R.key ?? R.dataIndex) === D)).filter(Boolean);
209
+ g.length && (h.value = g);
210
210
  } else
211
- k.value = o ?? [];
211
+ h.value = l ?? [];
212
212
  },
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);
213
+ setPagination: (l) => {
214
+ l != null && l.page && (c.value.page = l.page), l != null && l.pageSize && (c.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (c.value.total = l.total);
215
215
  },
216
- getSelectRowKeys: () => x.value.map((o) => o[M.value]),
217
- getSelectRows: () => x.value,
216
+ getSelectRowKeys: () => m.value.map((l) => l[T.value]),
217
+ getSelectRows: () => m.value,
218
218
  clearSelectedRowKeys: () => {
219
- x.value = [], Z();
219
+ m.value = [], Z();
220
220
  },
221
- setSelectedRowKeys: (o) => {
222
- const n = new Set(o), d = c.value.filter((b) => n.has(b[M.value]));
223
- o.forEach((b) => {
224
- d.some((D) => D[M.value] === b) || d.push({ [M.value]: b });
225
- }), x.value = d, Z();
221
+ setSelectedRowKeys: (l) => {
222
+ const n = new Set(l), u = f.value.filter((g) => n.has(g[T.value]));
223
+ l.forEach((g) => {
224
+ u.some((D) => D[T.value] === g) || u.push({ [T.value]: g });
225
+ }), m.value = u, Z();
226
226
  },
227
- deleteSelectRowByKey: (o) => {
228
- x.value = x.value.filter((n) => n[M.value] !== o), Z();
227
+ deleteSelectRowByKey: (l) => {
228
+ m.value = m.value.filter((n) => n[T.value] !== l), 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: (l, n, u) => {
231
+ l < 0 || l >= f.value.length || (f.value = [...f.value], f.value[l] = { ...f.value[l], [n]: u });
232
232
  },
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];
233
+ updateTableDataRecord: (l, n) => {
234
+ const u = te(l);
235
+ if (!(u < 0))
236
+ return f.value = [...f.value], f.value[u] = { ...f.value[u], ...n }, f.value[u];
237
237
  },
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]));
238
+ deleteTableDataRecord: (l) => {
239
+ const n = Array.isArray(l) ? l : [l], u = new Set(n);
240
+ f.value = f.value.filter((g) => !u.has(g[T.value]));
241
241
  },
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;
242
+ insertTableDataRecord: (l, n) => {
243
+ const u = [...f.value];
244
+ return n == null || n >= u.length ? u.push(l) : u.splice(n, 0, l), f.value = u, l;
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,
248
- setShowPagination: (o) => {
249
- T.value = o;
246
+ getPaginationRef: () => E.value ? { page: c.value.page, pageSize: Number(c.value.pageSize) || 10, total: c.value.total } : !1,
247
+ getShowPagination: () => E.value,
248
+ setShowPagination: (l) => {
249
+ B.value = l;
250
250
  },
251
- getRowSelection: () => p.value.rowSelection,
251
+ getRowSelection: () => d.value.rowSelection,
252
252
  expandAll: () => {
253
- var b;
254
- const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
253
+ var g;
254
+ const l = ((g = d.value.treeProps) == null ? void 0 : g.children) ?? "children", n = (D) => {
255
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));
256
+ return D.forEach((O) => {
257
+ R.push(O);
258
+ const j = O[l];
259
+ Array.isArray(j) && j.length > 0 && R.push(...n(j));
260
260
  }), R;
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(f.value).forEach((D) => {
263
+ var R, O;
264
+ return (O = (R = S.value) == null ? void 0 : R.toggleRowExpansion) == null ? void 0 : O.call(R, D, !0);
265
265
  });
266
266
  },
267
267
  collapseAll: () => {
268
- var b;
269
- const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
268
+ var g;
269
+ const l = ((g = d.value.treeProps) == null ? void 0 : g.children) ?? "children", n = (D) => {
270
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));
271
+ return D.forEach((O) => {
272
+ R.push(O);
273
+ const j = O[l];
274
+ Array.isArray(j) && j.length > 0 && R.push(...n(j));
275
275
  }), R;
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(f.value).forEach((D) => {
278
+ var R, O;
279
+ return (O = (R = S.value) == null ? void 0 : R.toggleRowExpansion) == null ? void 0 : O.call(R, D, !1);
280
280
  });
281
281
  }
282
282
  };
283
- e(H);
284
- const Q = () => {
285
- k.value = [...t.columns ?? []];
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));
288
- }, ie = () => {
289
- s.value && (v.value = s.value.offsetWidth || 0);
283
+ e(Y);
284
+ const r = () => {
285
+ h.value = [...t.columns ?? []];
286
+ }, v = () => {
287
+ t.api && d.value.immediate !== !1 ? J(void 0) : t.dataSource && (f.value = [...t.dataSource], !t.api && t.pagination !== !1 && (c.value.total = t.dataSource.length));
288
+ }, y = () => {
289
+ s.value && (_.value = s.value.offsetWidth || 0);
290
290
  };
291
- let le = null, oe = null;
292
- return we(() => {
293
- Q(), l("register", H), ne(), typeof window < "u" && (window.addEventListener("resize", ie), le = new ResizeObserver(ie), Fe(() => {
294
- ie(), oe = s.value, oe && (le == null || le.observe(oe));
291
+ let w = null, b = null;
292
+ return ge(() => {
293
+ r(), o("register", Y), v(), typeof window < "u" && (window.addEventListener("resize", y), w = new ResizeObserver(y), Fe(() => {
294
+ y(), b = s.value, b && (w == null || w.observe(b));
295
295
  }));
296
296
  }), Re(() => {
297
- typeof window < "u" && (window.removeEventListener("resize", ie), le && oe && (le.unobserve(oe), oe = null));
298
- }), U(() => t.columns, Q, { deep: !0 }), U(() => t.dataSource, () => {
299
- !t.api && t.dataSource && (c.value = [...t.dataSource]);
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 };
297
+ typeof window < "u" && (window.removeEventListener("resize", y), w && b && (w.unobserve(b), b = null));
298
+ }), H(() => t.columns, r, { deep: !0 }), H(() => t.dataSource, () => {
299
+ !t.api && t.dataSource && (f.value = [...t.dataSource]);
300
+ }, { deep: !0 }), H(() => t.loading, (l) => {
301
+ $.value = l ?? !1;
302
+ }), { __sfc: !0, DefaultCellRenderer: a, BodyCellRenderer: C, props: t, emit: o, slots: i, tableRef: S, tableWrapRef: s, containerWidth: _, loading: $, innerData: f, rawDataSource: M, innerColumns: h, innerProps: A, selectedRows: m, showPaginationRef: B, pagination: c, getComponentSetting: p, effectiveProps: d, showTitleBar: z, showPagination: E, rowKeyField: T, selectedKeysSet: L, displayColumns: P, fixedColumnsWidth: I, isRatioWidth: V, totalRatio: G, fixedDataColumnsWidth: X, parseWidthPx: N, getColumnWidth: K, shouldShowColumn: q, selectableRows: W, hasSelectableRows: U, isAllCurrentPageSelected: se, isIndeterminate: le, isRowSelected: oe, getCheckboxDisabled: ye, getRadioDisabled: re, emitSelectionChange: Z, handleCheckboxChange: ie, handleRadioSelect: we, handleSelectAll: ce, fetchData: J, handleReload: ue, handleSizeChange: de, handleCurrentChange: fe, handleRowClick: pe, handleRowDblclick: ve, handleSortChange: me, handleExpandChange: ae, findRowIndex: te, tableAction: Y, syncColumns: r, loadData: v, updateContainerWidth: y, resizeObserver: w, observedEl: b };
303
303
  }
304
304
  });
305
- function ae(F, e, l, t, a, y, r, C) {
306
- var s = typeof F == "function" ? F.options : F;
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
305
+ function ee(x, e, o, t, a, C, i, S) {
306
+ var s = typeof x == "function" ? x.options : x;
307
+ e && (s.render = e, s.staticRenderFns = o, s._compiled = !0), t && (s.functional = !0), C && (s._scopeId = "data-v-" + C);
308
+ var _;
309
+ if (i ? (_ = 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, !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, !M && typeof __VUE_SSR_CONTEXT__ < "u" && (M = __VUE_SSR_CONTEXT__), a && a.call(this, M), M && M._registeredComponents && M._registeredComponents.add(i);
313
+ }, s._ssrRegister = _) : a && (_ = S ? 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), _)
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 = _;
321
+ var $ = s.render;
322
+ s.render = function(h, A) {
323
+ return _.call(A), $(h, A);
324
324
  };
325
325
  } else {
326
- var c = s.beforeCreate;
327
- s.beforeCreate = c ? [].concat(c, v) : [v];
326
+ var f = s.beforeCreate;
327
+ s.beforeCreate = f ? [].concat(f, _) : [_];
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;
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))]);
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() {
335
+ var a, C, i, S;
336
+ var e = this, o = e._self._c, t = e._self._setupProxy;
337
+ return o("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? o("div", { staticClass: "ecp-pro-table__header" }, [o("div", { staticClass: "ecp-pro-table__title-wrapper" }, [o("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? o("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [o("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? o("span", e._l(t.effectiveProps.titleHelpMessage, function(s, _) {
338
+ return o("div", { key: _ }, [e._v(e._s(s))]);
339
+ }), 0) : o("span", [e._v(e._s(t.effectiveProps.titleHelpMessage))])]), o("i", { staticClass: "el-icon-question" })], 2) : e._e()], 1), o("div", { staticClass: "ecp-pro-table__toolbar" }, [e._t("tableTitle"), e._t("toolbar"), e._t("toolbar-right", function() {
340
340
  var s;
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
- })], 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
- 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")];
341
+ return [((s = t.effectiveProps.tableSetting) == null ? void 0 : s.redo) !== !1 ? o("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
342
+ })], 2)]) : e._e(), o("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [o("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 ? o("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
+ return [t.effectiveProps.rowSelection.type !== "radio" ? o("el-checkbox", { attrs: { value: t.isAllCurrentPageSelected, indeterminate: t.isIndeterminate, disabled: !t.hasSelectableRows }, on: { change: t.handleSelectAll } }) : o("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 _;
346
+ return [t.effectiveProps.rowSelection.type !== "radio" ? o("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
+ } } }) : o("el-radio", { attrs: { value: (_ = t.selectedRows[0]) == null ? void 0 : _[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();
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))]);
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] } })];
350
+ } }, nativeOn: { click: function($) {
351
+ $.stopPropagation();
352
+ } } }, [o("span")])];
353
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? o("el-table-column", { attrs: { type: "index", label: ((a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.title) || "序号", width: ((C = t.effectiveProps.indexColumnProps) == null ? void 0 : C.width) || 60, fixed: (i = t.effectiveProps.indexColumnProps) == null ? void 0 : i.fixed, align: ((S = t.effectiveProps.indexColumnProps) == null ? void 0 : S.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(s) {
354
+ return [t.shouldShowColumn(s) ? o("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(_) {
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 }) : [o("span", [e._v(e._s(s.title))]), s.helpMessage ? o("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" } }, [o("template", { slot: "content" }, [Array.isArray(s.helpMessage) ? o("span", e._l(s.helpMessage, function($, f) {
356
+ return o("div", { key: f }, [e._v(e._s($))]);
357
+ }), 0) : o("span", [e._v(e._s(s.helpMessage))])]), o("i", { staticClass: "el-icon-question" })], 2) : e._e()]];
358
+ } }, { key: "default", fn: function(_) {
359
+ return [s.dataIndex && e.$scopedSlots[s.dataIndex] ? e._t(s.dataIndex, null, { row: _.row, column: s, index: _.$index, value: _.row[s.dataIndex] }) : e.$scopedSlots.bodyCell ? o(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: s, record: _.row, index: _.$index, value: _.row[s.dataIndex], "custom-render": s.customRender, "value-enum": s.valueEnum } }) : o(t.DefaultCellRenderer, { attrs: { column: s, record: _.row, index: _.$index, value: _.row[s.dataIndex] } })];
360
360
  } }], null, !0) }) : e._e()];
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
- 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()];
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
- }, Le = [], Oe = /* @__PURE__ */ ae(
361
+ }), t.effectiveProps.actionColumn ? o("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
+ return [e.$scopedSlots.action ? e._t("action", null, { record: s.row, column: t.effectiveProps.actionColumn, index: s.$index }) : e.$scopedSlots.bodyCell ? o(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()];
363
+ } }], null, !0) }) : e._e()], 2)], 1), t.showPagination ? o("div", { staticClass: "ecp-pro-table__pagination" }, [o("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 = [], Oe = /* @__PURE__ */ ee(
365
365
  Ee,
366
366
  Ie,
367
- Le,
367
+ Ve,
368
368
  !1,
369
369
  null,
370
370
  "c5638c20",
371
371
  null,
372
372
  null
373
373
  );
374
- const Ae = Oe.exports, Ve = /* @__PURE__ */ ee({
374
+ const Ae = Oe.exports, Le = /* @__PURE__ */ Q({
375
375
  __name: "TableAction",
376
376
  props: {
377
377
  actions: { default: () => [] },
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, o = (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((A) => {
383
+ const { ifShow: m } = A;
384
+ return typeof m == "boolean" ? m : typeof m == "function" ? m(A) : !0;
385
+ }), C = F(() => a(e.actions || [])), i = F(() => a(e.dropDownActions || [])), S = (h, A) => {
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 && A.stopPropagation(), (m = h.onClick) == null || m.call(h, A);
388
+ }, s = (h, A) => {
389
+ S(h, A);
390
+ }, _ = (h, A, m) => {
391
+ var B, c, p, d;
392
+ e.stopButtonPropagation && m.stopPropagation(), h.popConfirm && (A === "confirm" ? (c = (B = h.popConfirm).confirm) == null || c.call(B) : (d = (p = h.popConfirm).cancel) == null || d.call(p));
393
+ };
394
+ return { __sfc: !0, props: e, normalizeTooltip: o, getButtonType: t, filterVisible: a, visibleActions: C, visibleDropDownActions: i, handleClick: S, handleActionClick: s, handlePopConfirm: _, handlePopConfirmConfirm: (h, A) => {
395
+ _(h, "confirm", A);
396
+ }, handlePopConfirmCancel: (h, A) => {
397
+ _(h, "cancel", A);
392
398
  }, handleDropdownCommand: (h) => {
393
- var k;
394
- const c = Number(h), m = r.value[c];
399
+ var B;
400
+ const A = Number(h), m = i.value[A];
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, p = m.popConfirm.okText || "确定", d = m.popConfirm.cancelText || "取消";
404
+ ze.confirm(c, "提示", {
405
+ confirmButtonText: p,
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, E;
410
+ return (E = (z = m.popConfirm) == null ? void 0 : z.confirm) == null ? void 0 : E.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, E;
413
+ return (E = (z = m.popConfirm) == null ? void 0 : z.cancel) == null ? void 0 : E.call(z);
408
414
  });
409
415
  return;
410
416
  }
411
- (k = m.onClick) == null || k.call(m, {});
417
+ (B = m.onClick) == null || B.call(m, {});
412
418
  }
413
419
  } };
414
420
  }
415
421
  });
416
422
  var Ke = function() {
417
- var e = this, l = e._self._c, t = e._self._setupProxy;
418
- 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);
420
- }), 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
- 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))])])]);
423
+ var e = this, o = e._self._c, t = e._self._setupProxy;
424
+ return o("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(a, C) {
425
+ return o("span", { key: `action-${C}`, staticClass: "ecp-table-action__item" }, [a.popConfirm ? o("el-popconfirm", { attrs: { title: a.popConfirm.title, "confirm-button-text": a.popConfirm.okText || "确定", "cancel-button-text": a.popConfirm.cancelText || "取消" }, on: { confirm: function(i) {
426
+ return t.handlePopConfirmConfirm(a, i);
427
+ }, cancel: function(i) {
428
+ return t.handlePopConfirmCancel(a, i);
429
+ } } }, [o("span", { attrs: { slot: "reference" }, slot: "reference" }, [o(a.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", a.tooltip ? t.normalizeTooltip(a.tooltip) : {}, !1), [o("el-button", e._b({ attrs: { type: t.getButtonType(a), size: "small", disabled: a.disabled }, on: { click: function(i) {
430
+ return t.handleActionClick(a, i);
431
+ } } }, "el-button", a.props, !1), [a.icon ? o("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), o("span", [e._v(e._s(a.label))])])], 1)], 1)]) : o(a.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", a.tooltip ? t.normalizeTooltip(a.tooltip) : {}, !1), [o("el-button", e._b({ attrs: { type: t.getButtonType(a), size: "small", disabled: a.disabled }, on: { click: function(i) {
432
+ return t.handleActionClick(a, i);
433
+ } } }, "el-button", a.props, !1), [a.icon ? o("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), o("span", [e._v(e._s(a.label))])])], 1), a.divider ? o("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
434
+ }), t.visibleDropDownActions.length ? o("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [o("span", { staticClass: "ecp-table-action__more" }, [o("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), o("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), o("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(a, C) {
435
+ return o("el-dropdown-item", { key: `dropdown-${C}`, attrs: { command: C, disabled: a.disabled, divided: !!a.divider } }, [o("span", { staticClass: "ecp-table-action__dropdown-item" }, [a.icon ? o("i", { class: ["ecp-table-action__icon", a.icon] }) : e._e(), o("span", [e._v(e._s(a.label))])])]);
422
436
  }), 1)], 1) : e._e()], 2);
423
- }, Ne = [], We = /* @__PURE__ */ ae(
424
- Ve,
437
+ }, Ne = [], We = /* @__PURE__ */ ee(
438
+ Le,
425
439
  Ke,
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 = () => {
436
- const r = ye(e);
437
- if (!r)
448
+ function ht(x) {
449
+ const e = k(null), o = () => x ? _e(x) : void 0, t = () => {
450
+ const i = _e(e);
451
+ if (!i)
438
452
  throw new Error("ProTable instance has not been registered");
439
- return r;
440
- }, a = (r) => {
441
- e.value = r;
442
- const C = l();
443
- C && Object.keys(C).length > 0 && r.setProps(C);
453
+ return i;
454
+ }, a = (i) => {
455
+ e.value = i;
456
+ const S = o();
457
+ S && Object.keys(S).length > 0 && i.setProps(S);
444
458
  };
445
- return F && U(
446
- () => l(),
447
- (r) => {
448
- r && e.value && e.value.setProps(r);
459
+ return x && H(
460
+ () => o(),
461
+ (i) => {
462
+ i && e.value && e.value.setProps(i);
449
463
  },
450
464
  { deep: !0 }
451
465
  ), [a, {
452
- setProps: (r) => t().setProps(r),
453
- reload: (r) => t().reload(r),
466
+ setProps: (i) => t().setProps(i),
467
+ reload: (i) => t().reload(i),
454
468
  redoHeight: () => t().redoHeight(),
455
- setLoading: (r) => t().setLoading(r),
469
+ setLoading: (i) => t().setLoading(i),
456
470
  getDataSource: () => t().getDataSource(),
457
471
  getRawDataSource: () => t().getRawDataSource(),
458
- setTableData: (r) => t().setTableData(r),
472
+ setTableData: (i) => t().setTableData(i),
459
473
  getColumns: () => t().getColumns(),
460
- setColumns: (r) => t().setColumns(r),
461
- setPagination: (r) => t().setPagination(r),
474
+ setColumns: (i) => t().setColumns(i),
475
+ setPagination: (i) => t().setPagination(i),
462
476
  getSelectRowKeys: () => t().getSelectRowKeys(),
463
477
  getSelectRows: () => t().getSelectRows(),
464
478
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
465
- setSelectedRowKeys: (r) => t().setSelectedRowKeys(r),
466
- deleteSelectRowByKey: (r) => t().deleteSelectRowByKey(r),
467
- updateTableData: (r, C, s) => t().updateTableData(r, C, s),
468
- updateTableDataRecord: (r, C) => t().updateTableDataRecord(r, C),
469
- deleteTableDataRecord: (r) => t().deleteTableDataRecord(r),
470
- insertTableDataRecord: (r, C) => t().insertTableDataRecord(r, C),
479
+ setSelectedRowKeys: (i) => t().setSelectedRowKeys(i),
480
+ deleteSelectRowByKey: (i) => t().deleteSelectRowByKey(i),
481
+ updateTableData: (i, S, s) => t().updateTableData(i, S, s),
482
+ updateTableDataRecord: (i, S) => t().updateTableDataRecord(i, S),
483
+ deleteTableDataRecord: (i) => t().deleteTableDataRecord(i),
484
+ insertTableDataRecord: (i, S) => t().insertTableDataRecord(i, S),
471
485
  getPaginationRef: () => t().getPaginationRef(),
472
486
  getShowPagination: () => t().getShowPagination(),
473
- setShowPagination: (r) => t().setShowPagination(r),
487
+ setShowPagination: (i) => t().setShowPagination(i),
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 i, S;
491
+ return (S = (i = t()).expandAll) == null ? void 0 : S.call(i);
478
492
  },
479
493
  collapseAll: () => {
480
- var r, C;
481
- return (C = (r = t()).collapseAll) == null ? void 0 : C.call(r);
494
+ var i, S;
495
+ return (S = (i = t()).collapseAll) == null ? void 0 : S.call(i);
482
496
  }
483
497
  }];
484
498
  }
485
- const qe = /* @__PURE__ */ ee({
499
+ const qe = /* @__PURE__ */ Q({
486
500
  __name: "ApiSelect",
487
501
  props: {
488
502
  value: null,
@@ -498,47 +512,47 @@ 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) => {
503
- e.lazy && r && y();
504
- }, y = async () => {
515
+ setup(x) {
516
+ const e = x, o = k(!1), t = k([]), a = (i) => {
517
+ e.lazy && i && C();
518
+ }, C = async () => {
505
519
  if (e.api) {
506
- l.value = !0;
520
+ o.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 i = await e.api(e.params), S = Array.isArray(i) ? i : (i == null ? void 0 : i.list) ?? (i == null ? void 0 : i.data) ?? [], s = e.labelField ?? "label", _ = e.valueField ?? "value";
523
+ t.value = S.map(($) => {
524
+ const f = $;
511
525
  return {
512
- label: String(c[s] ?? c.label ?? ""),
513
- value: c[v] ?? c.value
526
+ label: String(f[s] ?? f.label ?? ""),
527
+ value: f[_] ?? f.value
514
528
  };
515
529
  });
516
530
  } finally {
517
- l.value = !1;
531
+ o.value = !1;
518
532
  }
519
533
  }
520
534
  };
521
- return we(() => {
522
- e.lazy || y();
523
- }), U(
535
+ return ge(() => {
536
+ e.lazy || C();
537
+ }), H(
524
538
  () => e.api,
525
539
  () => {
526
- e.lazy ? t.value = [] : y();
540
+ e.lazy ? t.value = [] : C();
527
541
  },
528
542
  { deep: !0 }
529
- ), U(() => e.params, () => {
530
- e.lazy ? t.value = [] : y();
531
- }, { deep: !0 }), { __sfc: !0, props: e, loading: l, options: t, onVisibleChange: a, fetchOptions: y };
543
+ ), H(() => e.params, () => {
544
+ e.lazy ? t.value = [] : C();
545
+ }, { deep: !0 }), { __sfc: !0, props: e, loading: o, options: t, onVisibleChange: a, fetchOptions: C };
532
546
  }
533
547
  });
534
548
  var je = function() {
535
- var e = this, l = e._self._c, t = e._self._setupProxy;
536
- 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) {
549
+ var e = this, o = e._self._c, t = e._self._setupProxy;
550
+ return o("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) {
537
551
  return e.$emit("input", a);
538
552
  }, "visible-change": t.onVisibleChange } }, "el-select", e.$attrs, !1), e._l(t.options, function(a) {
539
- return l("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
553
+ return o("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
540
554
  }), 1);
541
- }, He = [], Ge = /* @__PURE__ */ ae(
555
+ }, He = [], Ge = /* @__PURE__ */ ee(
542
556
  qe,
543
557
  je,
544
558
  He,
@@ -548,7 +562,7 @@ var je = function() {
548
562
  null,
549
563
  null
550
564
  );
551
- const Ue = Ge.exports, Xe = /* @__PURE__ */ ee({
565
+ const Ue = Ge.exports, Xe = /* @__PURE__ */ Q({
552
566
  __name: "TreeSelect",
553
567
  props: {
554
568
  value: null,
@@ -565,97 +579,97 @@ 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(() => ({
570
- label: l.labelField,
571
- children: l.childrenField
582
+ setup(x, { emit: e }) {
583
+ const o = x, t = k(), a = k(), C = k(!1), i = k(!1), S = k(""), s = k([]), _ = k({}), $ = F(() => ({
584
+ label: o.labelField,
585
+ children: o.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 f(P) {
588
+ const I = o.labelField ?? "label", V = o.valueField ?? "value", G = o.childrenField ?? "children", X = P[G], N = {};
589
+ return N[o.labelField ?? "label"] = P[I] ?? P.label, N[o.valueField ?? "value"] = P[V] ?? P.value, Array.isArray(X) && X.length && (N[o.childrenField ?? "children"] = X.map((K) => f(K))), N;
576
590
  }
577
- function m(g, E = "") {
578
- const I = {}, W = l.labelField ?? "label", X = l.valueField ?? "value", V = l.childrenField ?? "children";
579
- for (const q of g) {
580
- 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));
591
+ function M(P, I = "") {
592
+ const V = {}, G = o.labelField ?? "label", X = o.valueField ?? "value", N = o.childrenField ?? "children";
593
+ for (const K of P) {
594
+ const q = String(K[G] ?? K.label ?? ""), W = K[X] ?? K.value;
595
+ W != null && (V[String(W)] = I ? I + " / " + q : q);
596
+ const U = K[N] ?? K.children;
597
+ Array.isArray(U) && U.length && Object.assign(V, M(U, q));
584
598
  }
585
- return I;
599
+ return V;
586
600
  }
587
- function k() {
588
- const g = l.treeData;
589
- return Array.isArray(g) && g.length > 0;
601
+ function h() {
602
+ const P = o.treeData;
603
+ return Array.isArray(P) && P.length > 0;
590
604
  }
591
- function z(g) {
592
- s.value = g, v.value = m(g);
605
+ function A(P) {
606
+ s.value = P, _.value = M(P);
593
607
  }
594
- function x() {
595
- const g = l.treeData;
596
- if (!Array.isArray(g) || g.length === 0)
608
+ function m() {
609
+ const P = o.treeData;
610
+ if (!Array.isArray(P) || P.length === 0)
597
611
  return;
598
- const E = g.map((I) => c(I));
599
- z(E);
612
+ const I = P.map((V) => f(V));
613
+ A(I);
600
614
  }
601
- const T = B(() => l.value == null || l.value === "" ? "" : v.value[String(l.value)] ?? String(l.value)), u = (g, E) => {
602
- if (!g)
615
+ const B = F(() => o.value == null || o.value === "" ? "" : _.value[String(o.value)] ?? String(o.value)), c = (P, I) => {
616
+ if (!P)
603
617
  return !0;
604
- const I = l.labelField ?? "label";
605
- return String(E[I] ?? E.label ?? "").toLowerCase().includes(g.toLowerCase());
618
+ const V = o.labelField ?? "label";
619
+ return String(I[V] ?? I.label ?? "").toLowerCase().includes(P.toLowerCase());
606
620
  };
607
- U(C, (g) => {
608
- var E;
609
- (E = a.value) == null || E.filter(g);
621
+ H(S, (P) => {
622
+ var I;
623
+ (I = a.value) == null || I.filter(P);
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 p = null;
626
+ function d() {
627
+ o.disabled || (C.value = !0, o.lazy && !h() && L(), Fe(() => {
628
+ p = (P) => {
629
+ t.value && !t.value.contains(P.target) && z();
630
+ }, document.addEventListener("click", p);
617
631
  }));
618
632
  }
619
- function O() {
620
- y.value = !1, C.value = "", f && (document.removeEventListener("click", f), f = null);
633
+ function z() {
634
+ C.value = !1, S.value = "", p && (document.removeEventListener("click", p), p = null);
621
635
  }
622
- function K() {
636
+ function E() {
623
637
  e("input", void 0);
624
638
  }
625
- function M(g) {
626
- const E = l.valueField ?? "value", I = g[E] ?? g.value;
627
- e("input", I), O();
639
+ function T(P) {
640
+ const I = o.valueField ?? "value", V = P[I] ?? P.value;
641
+ e("input", V), z();
628
642
  }
629
- async function N() {
630
- if (!(!l.api || k())) {
631
- r.value = !0;
643
+ async function L() {
644
+ if (!(!o.api || h())) {
645
+ i.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 P = await o.api(o.params), I = Array.isArray(P) ? P : (P == null ? void 0 : P.list) ?? (P == null ? void 0 : P.data) ?? [];
648
+ s.value = I.map((V) => f(V)), _.value = M(s.value);
635
649
  } finally {
636
- r.value = !1;
650
+ i.value = !1;
637
651
  }
638
652
  }
639
653
  }
640
- return we(() => {
641
- k() ? x() : l.lazy || N();
642
- }), U(() => l.treeData, () => {
643
- k() ? x() : (s.value = [], v.value = {}, !l.lazy && l.api && N());
644
- }, { deep: !0 }), U(() => l.api, () => {
645
- k() || (l.lazy ? (s.value = [], v.value = {}) : N());
646
- }, { 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 };
654
+ return ge(() => {
655
+ h() ? m() : o.lazy || L();
656
+ }), H(() => o.treeData, () => {
657
+ h() ? m() : (s.value = [], _.value = {}, !o.lazy && o.api && L());
658
+ }, { deep: !0 }), H(() => o.api, () => {
659
+ h() || (o.lazy ? (s.value = [], _.value = {}) : L());
660
+ }, { deep: !0 }), H(() => o.params, () => {
661
+ h() || (o.lazy ? (s.value = [], _.value = {}) : L());
662
+ }, { deep: !0 }), { __sfc: !0, props: o, emit: e, rootRef: t, treeRef: a, dropdownVisible: C, loading: i, filterText: S, treeData: s, flatLabelMap: _, treeProps: $, normalizeNode: f, buildFlatLabelMap: M, hasTreeDataProp: h, applyTreeData: A, syncFromTreeDataProp: m, displayText: B, filterNodeMethod: c, clickOutsideHandler: p, openDropdown: d, closeDropdown: z, clearValue: E, onNodeClick: T, fetchData: L };
649
663
  }
650
664
  });
651
665
  var Ze = function() {
652
- var e = this, l = e._self._c, t = e._self._setupProxy;
653
- 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) {
666
+ var e = this, o = e._self._c, t = e._self._setupProxy;
667
+ return o("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [o("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 } }), o("transition", { attrs: { name: "el-zoom-in-top" } }, [o("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? o("div", { staticClass: "ecp-tree-select__filter-inner" }, [o("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(a) {
654
668
  a.stopPropagation();
655
669
  } }, model: { value: t.filterText, callback: function(a) {
656
670
  t.filterText = a;
657
- }, 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);
658
- }, Je = [], Qe = /* @__PURE__ */ ae(
671
+ }, expression: "filterText" } })], 1) : e._e(), o("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 ? o("div", { staticClass: "ecp-tree-select__loading" }, [o("i", { staticClass: "el-icon-loading" }), e._v(" 加载中... ")]) : e._e()], 1)])], 1);
672
+ }, Je = [], Qe = /* @__PURE__ */ ee(
659
673
  Xe,
660
674
  Ze,
661
675
  Je,
@@ -665,7 +679,7 @@ var Ze = function() {
665
679
  null,
666
680
  null
667
681
  );
668
- const Ye = Qe.exports, et = /* @__PURE__ */ ee({
682
+ const Ye = Qe.exports, et = /* @__PURE__ */ Q({
669
683
  __name: "ProFormItem",
670
684
  props: {
671
685
  schema: null,
@@ -673,10 +687,11 @@ const Ye = Qe.exports, et = /* @__PURE__ */ ee({
673
687
  formDisabled: { type: Boolean },
674
688
  autoPlaceholder: { type: Boolean },
675
689
  formActionType: null,
690
+ onFieldChange: null,
676
691
  customComponents: null
677
692
  },
678
- setup(F) {
679
- const e = F, l = /* @__PURE__ */ new Set([
693
+ setup(x) {
694
+ const e = x, o = /* @__PURE__ */ new Set([
680
695
  "input",
681
696
  "select",
682
697
  "api-select",
@@ -688,100 +703,101 @@ const Ye = Qe.exports, et = /* @__PURE__ */ ee({
688
703
  "cascader",
689
704
  "checkbox",
690
705
  "radio"
691
- ]), t = Ce(), a = B(() => ({
706
+ ]), t = Pe(), a = F(() => ({
692
707
  schema: e.schema,
693
708
  values: e.formModel,
694
709
  model: e.formModel,
695
710
  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(() => {
711
+ })), C = F(() => {
712
+ const c = e.schema.ifShow;
713
+ return c === void 0 ? !0 : typeof c == "boolean" ? c : c(a.value);
714
+ }), i = F(() => {
715
+ const c = e.schema.show;
716
+ return c === void 0 ? !0 : typeof c == "boolean" ? c : c(a.value);
717
+ }), S = F(() => {
703
718
  if (e.formDisabled)
704
719
  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)
720
+ const c = e.schema.dynamicDisabled;
721
+ return c === void 0 ? !1 : typeof c == "boolean" ? c : c(a.value);
722
+ }), s = F(() => {
723
+ const c = e.schema.dynamicRules;
724
+ return c ? Array.isArray(c) ? c : c(a.value) : e.schema.rules;
725
+ }), _ = F(() => {
726
+ const c = e.schema.componentProps;
727
+ if (!c)
713
728
  return { props: {}, listeners: {} };
714
- const f = typeof u == "function" ? u({
729
+ const p = typeof c == "function" ? c({
715
730
  ...a.value,
716
731
  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;
732
+ }) : { ...c }, d = {}, z = {};
733
+ for (const [E, T] of Object.entries(p))
734
+ if (E.length > 2 && /^on[A-Za-z]/.test(E) && typeof T == "function") {
735
+ const L = E.slice(2).charAt(0).toLowerCase() + E.slice(3);
736
+ z[L] = T;
722
737
  } 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 ? {
738
+ d[E] = T;
739
+ return { props: d, listeners: z };
740
+ }), $ = F(() => _.value.props), f = F(() => _.value.listeners), M = F(() => !!t.default), h = (c) => {
741
+ const p = c == null ? void 0 : c.options;
742
+ return Array.isArray(p) ? p : void 0;
743
+ }, A = F(() => {
744
+ const c = e.schema.component;
745
+ return c == null ? null : typeof c == "string" ? o.has(c) ? null : e.customComponents && e.customComponents[c] || c : c;
746
+ }), m = (c) => {
747
+ var p;
748
+ (p = e.onFieldChange) == null || p.call(e, e.schema.field, c);
749
+ }, B = F(() => {
750
+ const c = e.schema.render;
751
+ return c ? {
736
752
  render() {
737
- const f = u(a.value);
738
- return Array.isArray(f) ? ce("span", f) : f;
753
+ const p = c(a.value);
754
+ return Array.isArray(p) ? ne("span", p) : p;
739
755
  }
740
756
  } : null;
741
757
  });
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 };
758
+ return { __sfc: !0, BUILT_IN_COMPONENTS: o, props: e, slots: t, renderParams: a, shouldRender: C, shouldShow: i, effectiveDisabled: S, effectiveRules: s, effectiveComponentPropsAndListeners: _, effectiveComponentProps: $, effectiveComponentListeners: f, hasSlot: M, getOptions: h, resolvedCustomComponent: A, setFieldValue: m, renderComponent: B, ApiSelect: Ue, TreeSelect: Ye };
743
759
  }
744
760
  });
745
761
  var tt = function() {
746
- 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) {
748
- return l("div", { key: y, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(a) + " ")]);
749
- }) : 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) {
762
+ var e = this, o = e._self._c, t = e._self._setupProxy;
763
+ return t.shouldRender ? o("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 } }, [o("template", { slot: "label" }, [o("span", [e._v(e._s(e.schema.label))]), e.schema.helpMessage ? o("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [o("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(a, C) {
764
+ return o("div", { key: C, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(a) + " ")]);
765
+ }) : o("span", [e._v(e._s(e.schema.helpMessage))])], 2), o("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [o(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 ? o(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 ? o("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
766
  e.$set(e.formModel, e.schema.field, a);
751
- }, 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) {
767
+ }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? o("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) {
752
768
  e.$set(e.formModel, e.schema.field, a);
753
- }, 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) {
769
+ }, expression: "formModel[schema.field]" } }, "el-input-number", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "select" ? o("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) {
754
770
  e.$set(e.formModel, e.schema.field, a);
755
771
  }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
756
- return l("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
757
- }), 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) {
772
+ return o("el-option", { key: String(a.value), attrs: { label: a.label, value: a.value } });
773
+ }), 1) : e.schema.component === "api-select" ? o(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" ? o(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" ? o("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) {
758
774
  e.$set(e.formModel, e.schema.field, a);
759
- }, 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) {
775
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-range" ? o("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) {
760
776
  e.$set(e.formModel, e.schema.field, a);
761
- }, 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) {
777
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "switch" ? o("el-switch", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
762
778
  e.$set(e.formModel, e.schema.field, a);
763
- }, 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) {
779
+ }, expression: "formModel[schema.field]" } }, "el-switch", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "cascader" ? o("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) {
764
780
  e.$set(e.formModel, e.schema.field, a);
765
- }, 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) {
781
+ }, expression: "formModel[schema.field]" } }, "el-cascader", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "checkbox" ? o("el-checkbox-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
766
782
  e.$set(e.formModel, e.schema.field, a);
767
783
  }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
768
- return l("el-checkbox", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
769
- }), 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) {
784
+ return o("el-checkbox", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
785
+ }), 1) : e.schema.component === "radio" ? o("el-radio-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(a) {
770
786
  e.$set(e.formModel, e.schema.field, a);
771
787
  }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(a) {
772
- return l("el-radio", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
788
+ return o("el-radio", { key: String(a.value), attrs: { label: a.value } }, [e._v(" " + e._s(a.label) + " ")]);
773
789
  }), 1) : e._e()]], 2) : e._e();
774
- }, lt = [], ot = /* @__PURE__ */ ae(
790
+ }, lt = [], ot = /* @__PURE__ */ ee(
775
791
  et,
776
792
  tt,
777
793
  lt,
778
794
  !1,
779
795
  null,
780
- "0dcbe9b0",
796
+ "84880e9d",
781
797
  null,
782
798
  null
783
799
  );
784
- const Te = ot.exports, at = /* @__PURE__ */ ee({
800
+ const Te = ot.exports, at = /* @__PURE__ */ Q({
785
801
  __name: "FormActions",
786
802
  props: {
787
803
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -798,18 +814,18 @@ const Te = ot.exports, at = /* @__PURE__ */ ee({
798
814
  actionColOptions: null
799
815
  },
800
816
  emits: ["submit", "reset", "toggle"],
801
- setup(F) {
817
+ setup(x) {
802
818
  return { __sfc: !0 };
803
819
  }
804
820
  });
805
821
  var nt = function() {
806
- var e = this, l = e._self._c;
807
- 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) {
822
+ var e = this, o = e._self._c;
823
+ return e._self._setupProxy, o("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? o("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
808
824
  return e.$emit("submit");
809
- } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? l("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
825
+ } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? o("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
810
826
  return e.$emit("reset");
811
827
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
812
- }, st = [], rt = /* @__PURE__ */ ae(
828
+ }, st = [], rt = /* @__PURE__ */ ee(
813
829
  at,
814
830
  nt,
815
831
  st,
@@ -819,10 +835,11 @@ var nt = function() {
819
835
  null,
820
836
  null
821
837
  );
822
- const De = rt.exports, it = /* @__PURE__ */ ee({
838
+ const De = rt.exports, it = /* @__PURE__ */ Q({
823
839
  __name: "ProForm",
824
840
  props: {
825
841
  schemas: null,
842
+ modelValue: null,
826
843
  initialValues: null,
827
844
  labelWidth: { default: "120px" },
828
845
  labelPosition: { default: "right" },
@@ -849,222 +866,242 @@ const De = rt.exports, it = /* @__PURE__ */ ee({
849
866
  formListeners: null,
850
867
  components: null
851
868
  },
852
- 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 ?? {},
859
- ...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;
863
- for (const Q of i) {
864
- const ne = z(Q.colProps, _, P);
865
- if (ne > w) {
866
- if ($++, $ > S)
869
+ emits: ["submit", "reset", "register", "update:modelValue"],
870
+ setup(x, { expose: e, emit: o }) {
871
+ const t = x, a = Pe(), C = k(), i = k(), S = k(!1), s = k(!0), _ = k({}), $ = k({}), f = k([]), M = k({}), h = { xl: 1920, lg: 1200, md: 992, sm: 768 }, A = (r, v, y) => {
872
+ const w = y ?? (typeof window < "u" ? window.innerWidth : 1920), b = r ?? {}, l = v ?? {}, n = l.span ?? 8;
873
+ return w >= h.xl ? b.xl ?? l.xl ?? b.lg ?? l.lg ?? b.md ?? l.md ?? b.sm ?? l.sm ?? b.xs ?? l.xs ?? b.span ?? n : w >= h.lg ? b.lg ?? l.lg ?? b.md ?? l.md ?? b.sm ?? l.sm ?? b.xs ?? l.xs ?? b.span ?? n : w >= h.md ? b.md ?? l.md ?? b.sm ?? l.sm ?? b.xs ?? l.xs ?? b.span ?? n : w >= h.sm ? b.sm ?? l.sm ?? b.xs ?? l.xs ?? b.span ?? n : b.xs ?? l.xs ?? b.span ?? n;
874
+ }, { getSetting: m } = Be(), B = F(() => ({ ...m("ProForm"), ...t, ...M.value })), c = F(() => B.value.modelValue), p = F(() => c.value !== void 0), d = F(() => p.value ? c.value ?? {} : _.value), z = F(() => ({
875
+ ...m("ProForm").components ?? {},
876
+ ...B.value.components ?? {},
877
+ ...M.value.components ?? {}
878
+ })), E = F(() => B.value.actionColOptions ?? { span: 24 }), T = k(typeof window < "u" ? window.innerWidth : 1920), L = (r, v, y, w) => {
879
+ let b = 24, l = 1, n = 0;
880
+ for (const u of r) {
881
+ const g = A(u.colProps, v, w);
882
+ if (g > b) {
883
+ if (l++, l > y)
867
884
  break;
868
- w = 24 - ne;
885
+ b = 24 - g;
869
886
  } else
870
- w -= ne;
871
- H++;
887
+ b -= g;
888
+ n++;
872
889
  }
873
- return H;
874
- }, K = B(() => {
875
- const i = c.value.filter((w) => g(w));
876
- if (!T.value.showAdvancedButton)
890
+ return n;
891
+ }, P = F(() => {
892
+ const r = f.value.filter((b) => G(b));
893
+ if (!B.value.showAdvancedButton)
877
894
  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)
883
- return i;
884
- const _ = T.value.alwaysShowLines ?? 1, S = T.value.baseColProps, P = O(i, S, _, p.value);
885
- return i.slice(0, P);
886
- }), g = (i) => {
887
- 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) => {
892
- 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 = _;
895
- }, X = (i) => {
896
- const _ = { ...i };
897
- return c.value.forEach((S) => {
898
- const P = S.ifShow;
899
- if (P === void 0)
895
+ const v = B.value.alwaysShowLines ?? 1, y = B.value.baseColProps, w = L(r, y, v, T.value);
896
+ return r.length > w;
897
+ }), I = F(() => B.value.formListeners ?? {}), V = F(() => {
898
+ const r = f.value.filter((b) => G(b));
899
+ if (!B.value.showAdvancedButton || !s.value)
900
+ return r;
901
+ const v = B.value.alwaysShowLines ?? 1, y = B.value.baseColProps, w = L(r, y, v, T.value);
902
+ return r.slice(0, w);
903
+ }), G = (r) => {
904
+ let v = !0, y = !0;
905
+ return typeof r.ifShow == "function" && (v = r.ifShow({ schema: r, values: d.value, model: d.value, field: r.field })), typeof r.ifShow == "boolean" && (v = r.ifShow), typeof r.show == "function" && (y = r.show({ schema: r, values: d.value, model: d.value, field: r.field })), typeof r.show == "boolean" && (y = r.show), v && y;
906
+ }, X = (r) => r.colProps ?? B.value.baseColProps ?? {}, N = (r) => r.slot || r.field, K = (r, v = !0) => {
907
+ const y = v ? { ...r ?? {} } : {}, w = B.value.initialValues ?? t.initialValues;
908
+ return f.value.forEach((b) => {
909
+ if (!(v && Object.prototype.hasOwnProperty.call(y, b.field))) {
910
+ if (b.defaultValue !== void 0) {
911
+ y[b.field] = b.defaultValue;
912
+ return;
913
+ }
914
+ w && Object.prototype.hasOwnProperty.call(w, b.field) && (y[b.field] = w[b.field]);
915
+ }
916
+ }), y;
917
+ }, q = (r, v = !0) => {
918
+ _.value = r, v && o("update:modelValue", r);
919
+ }, W = (r) => {
920
+ const v = K({ ...d.value, ...r });
921
+ return q(v), v;
922
+ }, U = () => {
923
+ const r = {};
924
+ f.value.forEach((v) => {
925
+ var y;
926
+ (y = v.rules) != null && y.length && (r[v.field] = v.rules);
927
+ }), q(K(d.value), !1), $.value = r;
928
+ }, se = (r) => {
929
+ const v = { ...r };
930
+ return f.value.forEach((y) => {
931
+ const w = y.ifShow;
932
+ if (w === void 0)
900
933
  return;
901
- (typeof P == "boolean" ? P : P({ schema: S, values: i, model: i, field: S.field })) || delete _[S.field];
902
- }), _;
903
- }, V = (i) => {
904
- const _ = X(i), S = m.value.fieldMapToTime;
905
- if (!(S != null && S.length))
906
- 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;
912
- }, q = async () => {
913
- var i;
934
+ (typeof w == "boolean" ? w : w({ schema: y, values: r, model: r, field: y.field })) || delete v[y.field];
935
+ }), v;
936
+ }, le = (r) => {
937
+ const v = se(r), y = M.value.fieldMapToTime;
938
+ if (!(y != null && y.length))
939
+ return v;
940
+ const w = { ...v };
941
+ return y.forEach(([b, [l, n]]) => {
942
+ const u = w[b];
943
+ Array.isArray(u) && u.length === 2 && (delete w[b], w[l] = u[0], w[n] = u[1]);
944
+ }), w;
945
+ }, oe = async () => {
946
+ var r;
914
947
  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 })));
916
- } catch (_) {
917
- console.error("Form validation failed:", _);
948
+ await ((r = C.value) == null ? void 0 : r.validate()), B.value.submitFunc ? await B.value.submitFunc() : (S.value = !0, o("submit", le({ ...d.value })));
949
+ } catch (v) {
950
+ console.error("Form validation failed:", v);
918
951
  } finally {
919
- C.value = !1;
952
+ S.value = !1;
920
953
  }
921
- }, Y = async () => {
922
- 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 () => {
925
- var i;
926
- (i = y.value) == null || i.resetFields(), W();
927
- }, de = (i) => {
928
- var _;
929
- 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")));
932
- }))) : 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}"]`);
935
- return S && S.scrollIntoView({ behavior: (_ == null ? void 0 : _.behavior) ?? "smooth", block: (_ == null ? void 0 : _.block) ?? "nearest" }), Promise.resolve();
936
- }, ve = (i) => {
937
- var _;
938
- (_ = y.value) == null || _.clearValidate(i);
939
- }, Z = async (i) => {
940
- (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 });
954
+ }, ye = async () => {
955
+ var r;
956
+ B.value.resetFunc ? await B.value.resetFunc() : ((r = C.value) == null || r.resetFields(), U(), o("reset"), B.value.submitOnReset && await oe());
957
+ }, re = (r) => (W(r), Promise.resolve()), Z = () => le({ ...d.value }), ie = async () => {
958
+ var r;
959
+ (r = C.value) == null || r.resetFields(), q(K(void 0, !1));
960
+ }, we = (r, v) => {
961
+ W({ [r]: v });
962
+ }, ce = (r) => {
963
+ var v;
964
+ return ((v = C.value) == null ? void 0 : v.validate(r)) ?? Promise.resolve();
965
+ }, J = (r) => C.value ? r != null && r.length ? Promise.all(r.map((v) => new Promise((y, w) => {
966
+ C.value.validateField(v, (b) => b ? y(void 0) : w(new Error("Validation failed")));
967
+ }))) : C.value.validate() : Promise.resolve(), ue = async (r, v) => {
968
+ var w;
969
+ const y = (w = i.value) == null ? void 0 : w.querySelector(`[data-field="${r}"]`);
970
+ return y && y.scrollIntoView({ behavior: (v == null ? void 0 : v.behavior) ?? "smooth", block: (v == null ? void 0 : v.block) ?? "nearest" }), Promise.resolve();
971
+ }, de = (r) => {
972
+ var v;
973
+ (v = C.value) == null || v.clearValidate(r);
974
+ }, fe = async (r) => {
975
+ (Array.isArray(r) ? r : [r]).forEach((y) => {
976
+ const w = f.value.findIndex((b) => b.field === y.field);
977
+ w >= 0 && (f.value[w] = { ...f.value[w], ...y });
943
978
  });
944
- }, me = async (i, _, S) => {
945
- if (S)
946
- c.value.unshift(i);
947
- else if (_) {
948
- const P = c.value.findIndex((w) => w.field === _);
949
- c.value.splice(P + 1, 0, i);
979
+ }, pe = async (r, v, y) => {
980
+ if (y)
981
+ f.value.unshift(r);
982
+ else if (v) {
983
+ const w = f.value.findIndex((b) => b.field === v);
984
+ f.value.splice(w + 1, 0, r);
950
985
  } else
951
- c.value.push(i);
952
- W();
953
- }, he = async (i) => {
954
- const _ = Array.isArray(i) ? i : [i];
955
- c.value = c.value.filter((S) => !_.includes(S.field));
956
- }, be = async (i) => {
957
- m.value = { ...m.value, ...i }, i.schemas && (c.value = [...i.schemas], W());
958
- }, J = {
959
- getFieldsValue: te,
960
- setFieldsValue: j,
961
- resetFields: ue,
962
- validate: de,
963
- validateFields: fe,
964
- submit: q,
965
- scrollToField: pe,
966
- clearValidate: ve,
967
- updateSchema: Z,
968
- appendSchemaByField: me,
969
- removeSchemaByField: he,
970
- setProps: be
986
+ f.value.push(r);
987
+ U();
988
+ }, ve = async (r) => {
989
+ const v = Array.isArray(r) ? r : [r];
990
+ f.value = f.value.filter((y) => !v.includes(y.field));
991
+ }, me = async (r) => {
992
+ M.value = { ...M.value, ...r }, r.schemas && (f.value = [...r.schemas], U());
993
+ }, ae = {
994
+ getFieldsValue: Z,
995
+ setFieldsValue: re,
996
+ resetFields: ie,
997
+ validate: ce,
998
+ validateFields: J,
999
+ submit: oe,
1000
+ scrollToField: ue,
1001
+ clearValidate: de,
1002
+ updateSchema: fe,
1003
+ appendSchemaByField: pe,
1004
+ removeSchemaByField: ve,
1005
+ setProps: me
971
1006
  };
972
- e(J);
973
- const se = () => {
974
- c.value = [...t.schemas ?? []], W();
975
- }, re = () => {
976
- typeof window < "u" && (p.value = window.innerWidth);
1007
+ e(ae);
1008
+ const te = () => {
1009
+ f.value = [...t.schemas ?? []], U();
1010
+ }, Y = () => {
1011
+ typeof window < "u" && (T.value = window.innerWidth);
977
1012
  };
978
- return we(() => {
979
- se(), l("register", J), typeof window < "u" && window.addEventListener("resize", re);
1013
+ return ge(() => {
1014
+ te(), o("register", ae), typeof window < "u" && window.addEventListener("resize", Y);
980
1015
  }), Re(() => {
981
- 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 };
1016
+ typeof window < "u" && window.removeEventListener("resize", Y);
1017
+ }), H(() => c.value, (r) => {
1018
+ !p.value || r === void 0 || q(K(r), !1);
1019
+ }, { deep: !0, immediate: !0 }), H(() => [t.schemas, t.initialValues], te, { deep: !0 }), { __sfc: !0, props: t, emit: o, slots: a, formRef: C, formWrapRef: i, submitLoading: S, collapsed: s, formModel: _, formRules: $, innerSchemas: f, innerProps: M, BREAKPOINTS: h, getEffectiveSpan: A, getComponentSetting: m, effectiveProps: B, controlledModelValue: c, isControlled: p, currentFormModel: d, formCustomComponents: z, effectiveActionColOptions: E, windowWidth: T, getVisibleSchemaCount: L, hasMoreFields: P, formListeners: I, displaySchemas: V, shouldShow: G, getColProps: X, getSlotName: N, resolveSchemaModel: K, applyFormModel: q, updateFormModel: W, initForm: U, filterByIfShow: se, processFieldMapToTime: le, handleSubmit: oe, handleReset: ye, setFieldsValue: re, getFieldsValue: Z, resetFields: ie, handleFieldChange: we, validate: ce, validateFields: J, scrollToField: ue, clearValidate: de, updateSchema: fe, appendSchemaByField: pe, removeSchemaByField: ve, setProps: me, formActionRef: ae, syncSchemas: te, handleResize: Y, ProFormItem: Te, FormActions: De };
983
1020
  }
984
1021
  });
985
1022
  var ct = function() {
986
- var e = this, l = e._self._c, t = e._self._setupProxy;
987
- 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.formModel, 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) {
988
- var y, r;
989
- return [t.shouldShow(a) ? l("el-col", e._b({ key: a.field, attrs: { offset: ((y = a.colProps) == null ? void 0 : y.offset) ?? ((r = t.effectiveProps.baseColProps) == null ? void 0 : r.offset) ?? 0, "data-field": a.field } }, "el-col", t.getColProps(a), !1), [l(t.ProFormItem, { attrs: { schema: a, "form-model": t.formModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, "custom-components": t.formCustomComponents } }, [t.slots[t.getSlotName(a)] ? [e._t(t.getSlotName(a), null, { model: t.formModel, schema: a, field: a.field, values: t.formModel })] : e._e()], 2)], 1) : e._e()];
990
- }), 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) {
1023
+ var e = this, o = e._self._c, t = e._self._setupProxy;
1024
+ return o("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [o("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"), o("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(a) {
1025
+ var C, i;
1026
+ return [t.shouldShow(a) ? o("el-col", e._b({ key: a.field, attrs: { offset: ((C = a.colProps) == null ? void 0 : C.offset) ?? ((i = t.effectiveProps.baseColProps) == null ? void 0 : i.offset) ?? 0, "data-field": a.field } }, "el-col", t.getColProps(a), !1), [o(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 ? o("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [o(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) {
991
1028
  t.collapsed = !t.collapsed;
992
- } } }, [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) {
1029
+ } } }, [o("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), o("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), o("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), o("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), o("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? o("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(a) {
993
1030
  t.collapsed = !t.collapsed;
994
- } } }, [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);
995
- }, ut = [], dt = /* @__PURE__ */ ae(
1031
+ } } }, [o("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
+ }, ut = [], dt = /* @__PURE__ */ ee(
996
1033
  it,
997
1034
  ct,
998
1035
  ut,
999
1036
  !1,
1000
1037
  null,
1001
- "4ee1cb87",
1038
+ "6171d80d",
1002
1039
  null,
1003
1040
  null
1004
1041
  );
1005
1042
  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);
1043
+ function bt(x) {
1044
+ const e = k(null), o = k(x ? _e(x) : void 0), t = () => x ? _e(x) : void 0, a = (p) => {
1045
+ e.value = p;
1046
+ const d = t();
1047
+ d && Object.keys(d).length > 0 && p.setProps(d);
1011
1048
  };
1012
- return F && U(
1049
+ return x && H(
1013
1050
  () => t(),
1014
- (f) => {
1015
- l.value = f, f && e.value && e.value.setProps(f);
1051
+ (p) => {
1052
+ o.value = p, p && e.value && e.value.setProps(p);
1016
1053
  },
1017
1054
  { deep: !0 }
1018
1055
  ), [a, {
1019
1056
  register: a,
1020
1057
  formAction: e,
1021
1058
  getFieldsValue: () => {
1022
- var f;
1023
- return ((f = e.value) == null ? void 0 : f.getFieldsValue()) ?? {};
1024
- },
1025
- setFieldsValue: async (f) => {
1026
1059
  var p;
1027
- await ((p = e.value) == null ? void 0 : p.setFieldsValue(f));
1060
+ return ((p = e.value) == null ? void 0 : p.getFieldsValue()) ?? {};
1028
1061
  },
1029
- resetFields: async () => {
1030
- var f;
1031
- await ((f = e.value) == null ? void 0 : f.resetFields());
1062
+ setFieldsValue: async (p) => {
1063
+ var d;
1064
+ await ((d = e.value) == null ? void 0 : d.setFieldsValue(p));
1032
1065
  },
1033
- validate: (f) => {
1066
+ resetFields: async () => {
1034
1067
  var p;
1035
- return ((p = e.value) == null ? void 0 : p.validate(f)) ?? Promise.resolve();
1068
+ await ((p = e.value) == null ? void 0 : p.resetFields());
1036
1069
  },
1037
- validateFields: (f) => {
1038
- var p;
1039
- return ((p = e.value) == null ? void 0 : p.validateFields(f)) ?? Promise.resolve();
1070
+ validate: (p) => {
1071
+ var d;
1072
+ return ((d = e.value) == null ? void 0 : d.validate(p)) ?? Promise.resolve();
1073
+ },
1074
+ validateFields: (p) => {
1075
+ var d;
1076
+ return ((d = e.value) == null ? void 0 : d.validateFields(p)) ?? Promise.resolve();
1040
1077
  },
1041
1078
  submit: () => {
1042
- var f;
1043
- return ((f = e.value) == null ? void 0 : f.submit()) ?? Promise.resolve();
1079
+ var p;
1080
+ return ((p = e.value) == null ? void 0 : p.submit()) ?? Promise.resolve();
1044
1081
  },
1045
- scrollToField: (f, p) => {
1046
- var O;
1047
- return ((O = e.value) == null ? void 0 : O.scrollToField(f, p)) ?? Promise.resolve();
1082
+ scrollToField: (p, d) => {
1083
+ var z;
1084
+ return ((z = e.value) == null ? void 0 : z.scrollToField(p, d)) ?? Promise.resolve();
1048
1085
  },
1049
- clearValidate: (f) => {
1050
- var p;
1051
- (p = e.value) == null || p.clearValidate(f);
1086
+ clearValidate: (p) => {
1087
+ var d;
1088
+ (d = e.value) == null || d.clearValidate(p);
1052
1089
  },
1053
- updateSchema: (f) => {
1054
- var p;
1055
- return ((p = e.value) == null ? void 0 : p.updateSchema(f)) ?? Promise.resolve();
1090
+ updateSchema: (p) => {
1091
+ var d;
1092
+ return ((d = e.value) == null ? void 0 : d.updateSchema(p)) ?? Promise.resolve();
1056
1093
  },
1057
- appendSchemaByField: (f, p, O) => {
1058
- var K;
1059
- return ((K = e.value) == null ? void 0 : K.appendSchemaByField(f, p, O)) ?? Promise.resolve();
1094
+ appendSchemaByField: (p, d, z) => {
1095
+ var E;
1096
+ return ((E = e.value) == null ? void 0 : E.appendSchemaByField(p, d, z)) ?? Promise.resolve();
1060
1097
  },
1061
- removeSchemaByField: (f) => {
1062
- var p;
1063
- return ((p = e.value) == null ? void 0 : p.removeSchemaByField(f)) ?? Promise.resolve();
1098
+ removeSchemaByField: (p) => {
1099
+ var d;
1100
+ return ((d = e.value) == null ? void 0 : d.removeSchemaByField(p)) ?? Promise.resolve();
1064
1101
  },
1065
- setProps: async (f) => {
1066
- var p;
1067
- l.value = { ...l.value, ...f }, await ((p = e.value) == null ? void 0 : p.setProps(f));
1102
+ setProps: async (p) => {
1103
+ var d;
1104
+ o.value = { ...o.value, ...p }, await ((d = e.value) == null ? void 0 : d.setProps(p));
1068
1105
  }
1069
1106
  }];
1070
1107
  }
@@ -1075,9 +1112,9 @@ const ft = [
1075
1112
  { name: "ProFormItem", component: Te },
1076
1113
  { name: "FormActions", component: De }
1077
1114
  ];
1078
- function pt(F) {
1079
- ft.forEach(({ name: e, component: l }) => {
1080
- F.component(e, l);
1115
+ function pt(x) {
1116
+ ft.forEach(({ name: e, component: o }) => {
1117
+ x.component(e, o);
1081
1118
  });
1082
1119
  }
1083
1120
  const _t = {