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

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,132 +1,787 @@
1
- import { defineComponent as W, useSlots as te, computed as w, h as ce, ref as g, onMounted as fe, onUnmounted as ue, watch as oe, unref as ee } from "vue";
2
- const de = /* @__PURE__ */ W({
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";
2
+ import { MessageBox as ze } from "element-ui";
3
+ const ge = $e({});
4
+ function Be() {
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 };
10
+ }
11
+ };
12
+ }
13
+ const Ee = /* @__PURE__ */ ee({
14
+ __name: "ProTable",
15
+ props: {
16
+ columns: null,
17
+ dataSource: null,
18
+ api: null,
19
+ rowKey: { default: "id" },
20
+ title: null,
21
+ titleHelpMessage: null,
22
+ bordered: { type: Boolean, default: !1 },
23
+ striped: { type: Boolean, default: !0 },
24
+ size: { default: "medium" },
25
+ loading: { type: Boolean, default: !1 },
26
+ maxHeight: null,
27
+ height: null,
28
+ ellipsis: { type: Boolean, default: !0 },
29
+ showIndexColumn: { type: Boolean, default: !0 },
30
+ indexColumnProps: null,
31
+ actionColumn: null,
32
+ rowSelection: null,
33
+ clearSelectOnPageChange: { type: Boolean, default: !1 },
34
+ pagination: { type: [Boolean, Object], default: () => ({ pageSize: 10, pageSizes: [10, 20, 50, 100] }) },
35
+ tableSetting: { default: () => ({ redo: !0 }) },
36
+ fetchSetting: { default: () => ({
37
+ pageField: "page",
38
+ sizeField: "pageSize",
39
+ listField: "list",
40
+ totalField: "total"
41
+ }) },
42
+ beforeFetch: null,
43
+ afterFetch: null,
44
+ immediate: { type: Boolean, default: !0 },
45
+ searchInfo: null,
46
+ defaultSort: null,
47
+ tableProps: null,
48
+ rowClassName: null,
49
+ spanMethod: null,
50
+ treeProps: null,
51
+ defaultExpandAll: { type: Boolean },
52
+ expandRowKeys: null,
53
+ lazy: { type: Boolean },
54
+ load: null
55
+ },
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({
59
+ name: "EcpProTableDefaultCellRenderer",
60
+ props: {
61
+ column: { type: Object, required: !0 },
62
+ record: { type: Object, required: !0 },
63
+ index: { type: Number, required: !0 },
64
+ value: { required: !1 }
65
+ },
66
+ setup(o) {
67
+ return () => {
68
+ var d, b;
69
+ const n = o.column;
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;
73
+ }
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));
77
+ }
78
+ return ce("span", o.value == null ? "" : String(o.value));
79
+ };
80
+ }
81
+ }), y = ee({
82
+ name: "EcpProTableBodyCellRenderer",
83
+ props: {
84
+ slotRender: { type: Function, required: !0 },
85
+ column: { type: Object, required: !0 },
86
+ record: { type: Object, required: !0 },
87
+ index: { type: Number, required: !0 },
88
+ value: { required: !1 },
89
+ customRender: { type: Function, required: !1 },
90
+ valueEnum: { type: Object, required: !1 }
91
+ },
92
+ setup(o) {
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 } });
99
+ };
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({
102
+ page: 1,
103
+ pageSize: t.pagination && typeof t.pagination == "object" ? t.pagination.pageSize ?? 10 : 10,
104
+ pageSizes: t.pagination && typeof t.pagination == "object" ? t.pagination.pageSizes ?? [10, 20, 50, 100] : [10, 20, 50, 100],
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;
119
+ }
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;
124
+ }
125
+ return o.width;
126
+ }, Y = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, j = B(() => {
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;
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];
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]));
157
+ }
158
+ Z();
159
+ }, J = async (o) => {
160
+ if (!t.api) {
161
+ if (t.dataSource)
162
+ return;
163
+ c.value = [];
164
+ return;
165
+ }
166
+ h.value = !0;
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,
171
+ ...t.searchInfo,
172
+ ...o == null ? void 0 : o.searchInfo
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 });
179
+ } catch (n) {
180
+ l("fetch-error", n);
181
+ } finally {
182
+ h.value = !1;
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 };
191
+ },
192
+ reload: (o) => J(o),
193
+ redoHeight: () => {
194
+ var o, n;
195
+ (n = (o = C.value) == null ? void 0 : o.doLayout) == null || n.call(o);
196
+ },
197
+ setLoading: (o) => {
198
+ h.value = o;
199
+ },
200
+ getDataSource: () => c.value,
201
+ getRawDataSource: () => m.value,
202
+ setTableData: (o) => {
203
+ c.value = o ?? [];
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);
210
+ } else
211
+ k.value = o ?? [];
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);
215
+ },
216
+ getSelectRowKeys: () => x.value.map((o) => o[M.value]),
217
+ getSelectRows: () => x.value,
218
+ clearSelectedRowKeys: () => {
219
+ x.value = [], Z();
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();
226
+ },
227
+ deleteSelectRowByKey: (o) => {
228
+ x.value = x.value.filter((n) => n[M.value] !== o), Z();
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 });
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];
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]));
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;
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;
250
+ },
251
+ getRowSelection: () => p.value.rowSelection,
252
+ expandAll: () => {
253
+ var b;
254
+ const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
255
+ const R = [];
256
+ return D.forEach((L) => {
257
+ R.push(L);
258
+ const G = L[o];
259
+ Array.isArray(G) && G.length > 0 && R.push(...n(G));
260
+ }), R;
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);
265
+ });
266
+ },
267
+ collapseAll: () => {
268
+ var b;
269
+ const o = ((b = p.value.treeProps) == null ? void 0 : b.children) ?? "children", n = (D) => {
270
+ const R = [];
271
+ return D.forEach((L) => {
272
+ R.push(L);
273
+ const G = L[o];
274
+ Array.isArray(G) && G.length > 0 && R.push(...n(G));
275
+ }), R;
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);
280
+ });
281
+ }
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);
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));
295
+ }));
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 };
303
+ }
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
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() {
314
+ a.call(
315
+ this,
316
+ (s.functional ? this.parent : this).$root.$options.shadowRoot
317
+ );
318
+ } : a), v)
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);
324
+ };
325
+ } else {
326
+ var c = s.beforeCreate;
327
+ s.beforeCreate = c ? [].concat(c, v) : [v];
328
+ }
329
+ return {
330
+ exports: F,
331
+ options: s
332
+ };
333
+ }
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() {
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")];
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) {
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] } })];
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(
365
+ Ee,
366
+ Ie,
367
+ Le,
368
+ !1,
369
+ null,
370
+ "c5638c20",
371
+ null,
372
+ null
373
+ );
374
+ const Ae = Oe.exports, Ve = /* @__PURE__ */ ee({
375
+ __name: "TableAction",
376
+ props: {
377
+ actions: { default: () => [] },
378
+ dropDownActions: { default: () => [] },
379
+ stopButtonPropagation: { type: Boolean, default: !1 }
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) => {
387
+ 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));
392
+ }, handleDropdownCommand: (h) => {
393
+ var k;
394
+ const c = Number(h), m = r.value[c];
395
+ if (!(!m || m.disabled)) {
396
+ 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,
401
+ type: "warning"
402
+ }).then(() => {
403
+ var u, f;
404
+ return (f = (u = m.popConfirm) == null ? void 0 : u.confirm) == null ? void 0 : f.call(u);
405
+ }).catch(() => {
406
+ var u, f;
407
+ return (f = (u = m.popConfirm) == null ? void 0 : u.cancel) == null ? void 0 : f.call(u);
408
+ });
409
+ return;
410
+ }
411
+ (k = m.onClick) == null || k.call(m, {});
412
+ }
413
+ } };
414
+ }
415
+ });
416
+ 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))])])]);
422
+ }), 1)], 1) : e._e()], 2);
423
+ }, Ne = [], We = /* @__PURE__ */ ae(
424
+ Ve,
425
+ Ke,
426
+ Ne,
427
+ !1,
428
+ null,
429
+ "1b2d6c42",
430
+ null,
431
+ null
432
+ );
433
+ 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)
438
+ 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);
444
+ };
445
+ return F && U(
446
+ () => l(),
447
+ (r) => {
448
+ r && e.value && e.value.setProps(r);
449
+ },
450
+ { deep: !0 }
451
+ ), [a, {
452
+ setProps: (r) => t().setProps(r),
453
+ reload: (r) => t().reload(r),
454
+ redoHeight: () => t().redoHeight(),
455
+ setLoading: (r) => t().setLoading(r),
456
+ getDataSource: () => t().getDataSource(),
457
+ getRawDataSource: () => t().getRawDataSource(),
458
+ setTableData: (r) => t().setTableData(r),
459
+ getColumns: () => t().getColumns(),
460
+ setColumns: (r) => t().setColumns(r),
461
+ setPagination: (r) => t().setPagination(r),
462
+ getSelectRowKeys: () => t().getSelectRowKeys(),
463
+ getSelectRows: () => t().getSelectRows(),
464
+ 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),
471
+ getPaginationRef: () => t().getPaginationRef(),
472
+ getShowPagination: () => t().getShowPagination(),
473
+ setShowPagination: (r) => t().setShowPagination(r),
474
+ getRowSelection: () => t().getRowSelection(),
475
+ expandAll: () => {
476
+ var r, C;
477
+ return (C = (r = t()).expandAll) == null ? void 0 : C.call(r);
478
+ },
479
+ collapseAll: () => {
480
+ var r, C;
481
+ return (C = (r = t()).collapseAll) == null ? void 0 : C.call(r);
482
+ }
483
+ }];
484
+ }
485
+ const qe = /* @__PURE__ */ ee({
486
+ __name: "ApiSelect",
487
+ props: {
488
+ value: null,
489
+ api: null,
490
+ params: null,
491
+ lazy: { type: Boolean, default: !1 },
492
+ labelField: { default: "label" },
493
+ valueField: { default: "value" },
494
+ placeholder: null,
495
+ disabled: { type: Boolean },
496
+ clearable: { type: Boolean },
497
+ filterable: { type: Boolean },
498
+ multiple: { type: Boolean }
499
+ },
500
+ emits: ["input"],
501
+ setup(F) {
502
+ const e = F, l = A(!1), t = A([]), a = (r) => {
503
+ e.lazy && r && y();
504
+ }, y = async () => {
505
+ if (e.api) {
506
+ l.value = !0;
507
+ 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;
511
+ return {
512
+ label: String(c[s] ?? c.label ?? ""),
513
+ value: c[v] ?? c.value
514
+ };
515
+ });
516
+ } finally {
517
+ l.value = !1;
518
+ }
519
+ }
520
+ };
521
+ return we(() => {
522
+ e.lazy || y();
523
+ }), U(
524
+ () => e.api,
525
+ () => {
526
+ e.lazy ? t.value = [] : y();
527
+ },
528
+ { 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 };
532
+ }
533
+ });
534
+ 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) {
537
+ return e.$emit("input", a);
538
+ }, "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 } });
540
+ }), 1);
541
+ }, He = [], Ge = /* @__PURE__ */ ae(
542
+ qe,
543
+ je,
544
+ He,
545
+ !1,
546
+ null,
547
+ null,
548
+ null,
549
+ null
550
+ );
551
+ const Ue = Ge.exports, Xe = /* @__PURE__ */ ee({
552
+ __name: "TreeSelect",
553
+ props: {
554
+ value: null,
555
+ treeData: null,
556
+ api: null,
557
+ params: null,
558
+ lazy: { type: Boolean, default: !1 },
559
+ labelField: { default: "label" },
560
+ valueField: { default: "value" },
561
+ childrenField: { default: "children" },
562
+ filterable: { type: Boolean },
563
+ placeholder: null,
564
+ disabled: { type: Boolean },
565
+ clearable: { type: Boolean }
566
+ },
567
+ 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
572
+ }));
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;
576
+ }
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));
584
+ }
585
+ return I;
586
+ }
587
+ function k() {
588
+ const g = l.treeData;
589
+ return Array.isArray(g) && g.length > 0;
590
+ }
591
+ function z(g) {
592
+ s.value = g, v.value = m(g);
593
+ }
594
+ function x() {
595
+ const g = l.treeData;
596
+ if (!Array.isArray(g) || g.length === 0)
597
+ return;
598
+ const E = g.map((I) => c(I));
599
+ z(E);
600
+ }
601
+ const T = B(() => l.value == null || l.value === "" ? "" : v.value[String(l.value)] ?? String(l.value)), u = (g, E) => {
602
+ if (!g)
603
+ return !0;
604
+ const I = l.labelField ?? "label";
605
+ return String(E[I] ?? E.label ?? "").toLowerCase().includes(g.toLowerCase());
606
+ };
607
+ U(C, (g) => {
608
+ var E;
609
+ (E = a.value) == null || E.filter(g);
610
+ });
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);
617
+ }));
618
+ }
619
+ function O() {
620
+ y.value = !1, C.value = "", f && (document.removeEventListener("click", f), f = null);
621
+ }
622
+ function K() {
623
+ e("input", void 0);
624
+ }
625
+ function M(g) {
626
+ const E = l.valueField ?? "value", I = g[E] ?? g.value;
627
+ e("input", I), O();
628
+ }
629
+ async function N() {
630
+ if (!(!l.api || k())) {
631
+ r.value = !0;
632
+ 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);
635
+ } finally {
636
+ r.value = !1;
637
+ }
638
+ }
639
+ }
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 };
649
+ }
650
+ });
651
+ 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) {
654
+ a.stopPropagation();
655
+ } }, model: { value: t.filterText, callback: function(a) {
656
+ 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(
659
+ Xe,
660
+ Ze,
661
+ Je,
662
+ !1,
663
+ null,
664
+ "f30bba11",
665
+ null,
666
+ null
667
+ );
668
+ const Ye = Qe.exports, et = /* @__PURE__ */ ee({
3
669
  __name: "ProFormItem",
4
670
  props: {
5
671
  schema: null,
6
672
  formModel: null,
7
673
  formDisabled: { type: Boolean },
8
674
  autoPlaceholder: { type: Boolean },
9
- formActionType: null
675
+ formActionType: null,
676
+ customComponents: null
10
677
  },
11
- setup(_) {
12
- const e = _, l = te(), t = w(() => ({
678
+ setup(F) {
679
+ const e = F, l = /* @__PURE__ */ new Set([
680
+ "input",
681
+ "select",
682
+ "api-select",
683
+ "tree-select",
684
+ "date-picker",
685
+ "date-range",
686
+ "input-number",
687
+ "switch",
688
+ "cascader",
689
+ "checkbox",
690
+ "radio"
691
+ ]), t = Ce(), a = B(() => ({
13
692
  schema: e.schema,
14
693
  values: e.formModel,
15
694
  model: e.formModel,
16
695
  field: e.schema.field
17
- })), s = w(() => {
18
- const c = e.schema.ifShow;
19
- return c === void 0 ? !0 : typeof c == "boolean" ? c : c(t.value);
20
- }), b = w(() => {
21
- const c = e.schema.show;
22
- return c === void 0 ? !0 : typeof c == "boolean" ? c : c(t.value);
23
- }), P = w(() => {
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(() => {
24
703
  if (e.formDisabled)
25
704
  return !0;
26
- const c = e.schema.dynamicDisabled;
27
- return c === void 0 ? !1 : typeof c == "boolean" ? c : c(t.value);
28
- }), C = w(() => {
29
- const c = e.schema.dynamicRules;
30
- return c ? Array.isArray(c) ? c : c(t.value) : e.schema.rules;
31
- }), p = w(() => {
32
- const c = e.schema.componentProps;
33
- if (!c)
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)
34
713
  return { props: {}, listeners: {} };
35
- const d = typeof c == "function" ? c({
36
- ...t.value,
714
+ const f = typeof u == "function" ? u({
715
+ ...a.value,
37
716
  formActionType: e.formActionType
38
- }) : { ...c }, R = {}, S = {};
39
- for (const [n, u] of Object.entries(d))
40
- if (n.length > 2 && /^on[A-Za-z]/.test(n) && typeof u == "function") {
41
- const x = n.slice(2).charAt(0).toLowerCase() + n.slice(3);
42
- S[x] = u;
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;
43
722
  } else
44
- R[n] = u;
45
- return { props: R, listeners: S };
46
- }), m = w(() => p.value.props), M = w(() => p.value.listeners), v = w(() => !!l.default), y = (c) => {
47
- const d = c == null ? void 0 : c.options;
48
- return Array.isArray(d) ? d : void 0;
49
- }, F = w(() => {
50
- const c = e.schema.render;
51
- return c ? {
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 ? {
52
736
  render() {
53
- const d = c(t.value);
54
- return Array.isArray(d) ? ce("span", d) : d;
737
+ const f = u(a.value);
738
+ return Array.isArray(f) ? ce("span", f) : f;
55
739
  }
56
740
  } : null;
57
741
  });
58
- return { __sfc: !0, props: e, slots: l, renderParams: t, shouldRender: s, shouldShow: b, effectiveDisabled: P, effectiveRules: C, effectiveComponentPropsAndListeners: p, effectiveComponentProps: m, effectiveComponentListeners: M, hasSlot: v, getOptions: y, renderComponent: F };
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 };
59
743
  }
60
744
  });
61
- function z(_, e, l, t, s, b, P, C) {
62
- var p = typeof _ == "function" ? _.options : _;
63
- e && (p.render = e, p.staticRenderFns = l, p._compiled = !0), t && (p.functional = !0), b && (p._scopeId = "data-v-" + b);
64
- var m;
65
- if (P ? (m = function(y) {
66
- y = y || // cached call
67
- this.$vnode && this.$vnode.ssrContext || // stateful
68
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !y && typeof __VUE_SSR_CONTEXT__ < "u" && (y = __VUE_SSR_CONTEXT__), s && s.call(this, y), y && y._registeredComponents && y._registeredComponents.add(P);
69
- }, p._ssrRegister = m) : s && (m = C ? function() {
70
- s.call(
71
- this,
72
- (p.functional ? this.parent : this).$root.$options.shadowRoot
73
- );
74
- } : s), m)
75
- if (p.functional) {
76
- p._injectStyles = m;
77
- var M = p.render;
78
- p.render = function(F, c) {
79
- return m.call(c), M(F, c);
80
- };
81
- } else {
82
- var v = p.beforeCreate;
83
- p.beforeCreate = v ? [].concat(v, m) : [m];
84
- }
85
- return {
86
- exports: _,
87
- options: p
88
- };
89
- }
90
- var me = function() {
745
+ var tt = function() {
91
746
  var e = this, l = e._self._c, t = e._self._setupProxy;
92
- 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(s, b) {
93
- return l("div", { key: b, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(s) + " ")]);
94
- }) : 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 }) : [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(s) {
95
- e.$set(e.formModel, e.schema.field, s);
96
- }, 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(s) {
97
- e.$set(e.formModel, e.schema.field, s);
98
- }, 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(s) {
99
- e.$set(e.formModel, e.schema.field, s);
100
- }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(s) {
101
- return l("el-option", { key: String(s.value), attrs: { label: s.label, value: s.value } });
102
- }), 1) : 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(s) {
103
- e.$set(e.formModel, e.schema.field, s);
104
- }, 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(s) {
105
- e.$set(e.formModel, e.schema.field, s);
106
- }, 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(s) {
107
- e.$set(e.formModel, e.schema.field, s);
108
- }, 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(s) {
109
- e.$set(e.formModel, e.schema.field, s);
110
- }, 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(s) {
111
- e.$set(e.formModel, e.schema.field, s);
112
- }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(s) {
113
- return l("el-checkbox", { key: String(s.value), attrs: { label: s.value } }, [e._v(" " + e._s(s.label) + " ")]);
114
- }), 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(s) {
115
- e.$set(e.formModel, e.schema.field, s);
116
- }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(s) {
117
- return l("el-radio", { key: String(s.value), attrs: { label: s.value } }, [e._v(" " + e._s(s.label) + " ")]);
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) {
750
+ 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) {
752
+ 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) {
754
+ e.$set(e.formModel, e.schema.field, a);
755
+ }, 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) {
758
+ 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) {
760
+ 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) {
762
+ 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) {
764
+ 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) {
766
+ e.$set(e.formModel, e.schema.field, a);
767
+ }, 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) {
770
+ e.$set(e.formModel, e.schema.field, a);
771
+ }, 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) + " ")]);
118
773
  }), 1) : e._e()]], 2) : e._e();
119
- }, pe = [], ve = /* @__PURE__ */ z(
120
- de,
121
- me,
122
- pe,
774
+ }, lt = [], ot = /* @__PURE__ */ ae(
775
+ et,
776
+ tt,
777
+ lt,
123
778
  !1,
124
779
  null,
125
- "cfc968c5",
780
+ "0dcbe9b0",
126
781
  null,
127
782
  null
128
783
  );
129
- const se = ve.exports, he = /* @__PURE__ */ W({
784
+ const Te = ot.exports, at = /* @__PURE__ */ ee({
130
785
  __name: "FormActions",
131
786
  props: {
132
787
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -143,28 +798,28 @@ const se = ve.exports, he = /* @__PURE__ */ W({
143
798
  actionColOptions: null
144
799
  },
145
800
  emits: ["submit", "reset", "toggle"],
146
- setup(_) {
801
+ setup(F) {
147
802
  return { __sfc: !0 };
148
803
  }
149
804
  });
150
- var _e = function() {
805
+ var nt = function() {
151
806
  var e = this, l = e._self._c;
152
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) {
153
808
  return e.$emit("submit");
154
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) {
155
810
  return e.$emit("reset");
156
811
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
157
- }, be = [], ye = /* @__PURE__ */ z(
158
- he,
159
- _e,
160
- be,
812
+ }, st = [], rt = /* @__PURE__ */ ae(
813
+ at,
814
+ nt,
815
+ st,
161
816
  !1,
162
817
  null,
163
818
  "489c88d2",
164
819
  null,
165
820
  null
166
821
  );
167
- const le = ye.exports, we = /* @__PURE__ */ W({
822
+ const De = rt.exports, it = /* @__PURE__ */ ee({
168
823
  __name: "ProForm",
169
824
  props: {
170
825
  schemas: null,
@@ -191,254 +846,256 @@ const le = ye.exports, we = /* @__PURE__ */ W({
191
846
  submitFunc: null,
192
847
  resetFunc: null,
193
848
  submitOnReset: { type: Boolean, default: !1 },
194
- formListeners: null
849
+ formListeners: null,
850
+ components: null
195
851
  },
196
852
  emits: ["submit", "reset", "register"],
197
- setup(_, { expose: e, emit: l }) {
198
- const t = _, s = te(), b = g(), P = g(), C = g(!1), p = g(!0), m = g({}), M = g({}), v = g([]), y = g({}), F = { xl: 1920, lg: 1200, md: 992, sm: 768 }, c = (o, a, f) => {
199
- const i = f ?? (typeof window < "u" ? window.innerWidth : 1920), r = o ?? {}, h = a ?? {}, B = h.span ?? 8;
200
- return i >= F.xl ? r.xl ?? h.xl ?? r.lg ?? h.lg ?? r.md ?? h.md ?? r.sm ?? h.sm ?? r.xs ?? h.xs ?? r.span ?? B : i >= F.lg ? r.lg ?? h.lg ?? r.md ?? h.md ?? r.sm ?? h.sm ?? r.xs ?? h.xs ?? r.span ?? B : i >= F.md ? r.md ?? h.md ?? r.sm ?? h.sm ?? r.xs ?? h.xs ?? r.span ?? B : i >= F.sm ? r.sm ?? h.sm ?? r.xs ?? h.xs ?? r.span ?? B : r.xs ?? h.xs ?? r.span ?? B;
201
- }, d = w(() => ({ ...t, ...y.value })), R = w(() => d.value.actionColOptions ?? { span: 24 }), S = g(typeof window < "u" ? window.innerWidth : 1920), n = (o, a, f, i) => {
202
- let r = 24, h = 1, B = 0;
203
- for (const $ of o) {
204
- const D = c($.colProps, a, i);
205
- if (D > r) {
206
- if (h++, h > f)
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)
207
867
  break;
208
- r = 24 - D;
868
+ w = 24 - ne;
209
869
  } else
210
- r -= D;
211
- B++;
870
+ w -= ne;
871
+ H++;
212
872
  }
213
- return B;
214
- }, u = w(() => {
215
- const o = v.value.filter((r) => T(r));
216
- if (!d.value.showAdvancedButton)
873
+ return H;
874
+ }, K = B(() => {
875
+ const i = c.value.filter((w) => g(w));
876
+ if (!T.value.showAdvancedButton)
217
877
  return !1;
218
- const a = d.value.alwaysShowLines ?? 1, f = d.value.baseColProps, i = n(o, f, a, S.value);
219
- return console.log(o.length, i), o.length > i;
220
- }), x = w(() => d.value.formListeners ?? {}), k = w(() => {
221
- const o = v.value.filter((r) => T(r));
222
- if (!d.value.showAdvancedButton || !p.value)
223
- return o;
224
- const a = d.value.alwaysShowLines ?? 1, f = d.value.baseColProps, i = n(o, f, a, S.value);
225
- return o.slice(0, i);
226
- }), T = (o) => {
227
- let a = !0, f = !0;
228
- return typeof o.ifShow == "function" && (a = o.ifShow({ schema: o, values: m.value, model: m.value, field: o.field })), typeof o.ifShow == "boolean" && (a = o.ifShow), typeof o.show == "function" && (f = o.show({ schema: o, values: m.value, model: m.value, field: o.field })), typeof o.show == "boolean" && (f = o.show), a && f;
229
- }, ae = (o) => o.colProps ?? d.value.baseColProps ?? {}, re = (o) => o.slot || o.field, A = () => {
230
- const o = {}, a = {}, f = d.value.initialValues ?? t.initialValues;
231
- v.value.forEach((i) => {
232
- var r;
233
- o[i.field] = i.defaultValue ?? (f == null ? void 0 : f[i.field]), (r = i.rules) != null && r.length && (a[i.field] = i.rules);
234
- }), m.value = { ...m.value, ...o }, M.value = a;
235
- }, N = (o) => {
236
- const a = { ...o };
237
- return v.value.forEach((f) => {
238
- const i = f.ifShow;
239
- if (i === void 0)
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)
240
900
  return;
241
- (typeof i == "boolean" ? i : i({ schema: f, values: o, model: o, field: f.field })) || delete a[f.field];
242
- }), a;
243
- }, V = (o) => {
244
- const a = N(o), f = y.value.fieldMapToTime;
245
- if (!(f != null && f.length))
246
- return a;
247
- const i = { ...a };
248
- return f.forEach(([r, [h, B]]) => {
249
- const $ = i[r];
250
- Array.isArray($) && $.length === 2 && (delete i[r], i[h] = $[0], i[B] = $[1]);
251
- }), i;
252
- }, L = async () => {
253
- var o;
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;
254
914
  try {
255
- await ((o = b.value) == null ? void 0 : o.validate()), d.value.submitFunc ? await d.value.submitFunc() : (C.value = !0, l("submit", V({ ...m.value })));
256
- } catch (a) {
257
- console.error("Form validation failed:", a);
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:", _);
258
918
  } finally {
259
919
  C.value = !1;
260
920
  }
261
- }, ie = async () => {
262
- var o;
263
- d.value.resetFunc ? await d.value.resetFunc() : ((o = b.value) == null || o.resetFields(), A(), l("reset"), d.value.submitOnReset && await L());
264
- }, q = (o) => (m.value = { ...m.value, ...o }, Promise.resolve()), G = () => V({ ...m.value }), U = async () => {
265
- var o;
266
- (o = b.value) == null || o.resetFields(), A();
267
- }, X = (o) => {
268
- var a;
269
- return ((a = b.value) == null ? void 0 : a.validate(o)) ?? Promise.resolve();
270
- }, H = (o) => b.value ? o != null && o.length ? Promise.all(o.map((a) => new Promise((f, i) => {
271
- b.value.validateField(a, (r) => r ? f(void 0) : i(new Error("Validation failed")));
272
- }))) : b.value.validate() : Promise.resolve(), K = async (o, a) => {
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 () => {
273
925
  var i;
274
- const f = (i = P.value) == null ? void 0 : i.querySelector(`[data-field="${o}"]`);
275
- return f && f.scrollIntoView({ behavior: (a == null ? void 0 : a.behavior) ?? "smooth", block: (a == null ? void 0 : a.block) ?? "nearest" }), Promise.resolve();
276
- }, Z = (o) => {
277
- var a;
278
- (a = b.value) == null || a.clearValidate(o);
279
- }, j = async (o) => {
280
- (Array.isArray(o) ? o : [o]).forEach((f) => {
281
- const i = v.value.findIndex((r) => r.field === f.field);
282
- i >= 0 && (v.value[i] = { ...v.value[i], ...f });
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 });
283
943
  });
284
- }, J = async (o, a, f) => {
285
- if (f)
286
- v.value.unshift(o);
287
- else if (a) {
288
- const i = v.value.findIndex((r) => r.field === a);
289
- v.value.splice(i + 1, 0, o);
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);
290
950
  } else
291
- v.value.push(o);
292
- A();
293
- }, Q = async (o) => {
294
- const a = Array.isArray(o) ? o : [o];
295
- v.value = v.value.filter((f) => !a.includes(f.field));
296
- }, Y = async (o) => {
297
- if (y.value = { ...y.value, ...o }, o.schemas) {
298
- v.value = [...o.schemas];
299
- debugger;
300
- A();
301
- }
302
- }, I = {
303
- getFieldsValue: G,
304
- setFieldsValue: q,
305
- resetFields: U,
306
- validate: X,
307
- validateFields: H,
308
- submit: L,
309
- scrollToField: K,
310
- clearValidate: Z,
311
- updateSchema: j,
312
- appendSchemaByField: J,
313
- removeSchemaByField: Q,
314
- setProps: Y
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
315
971
  };
316
- e(I);
317
- const O = () => {
318
- v.value = [...t.schemas ?? []], A();
319
- }, E = () => {
320
- typeof window < "u" && (S.value = window.innerWidth);
972
+ e(J);
973
+ const se = () => {
974
+ c.value = [...t.schemas ?? []], W();
975
+ }, re = () => {
976
+ typeof window < "u" && (p.value = window.innerWidth);
321
977
  };
322
- return fe(() => {
323
- O(), l("register", I), typeof window < "u" && window.addEventListener("resize", E);
324
- }), ue(() => {
325
- typeof window < "u" && window.removeEventListener("resize", E);
326
- }), oe(() => [t.schemas, t.initialValues], O, { deep: !0 }), { __sfc: !0, props: t, emit: l, slots: s, formRef: b, formWrapRef: P, submitLoading: C, collapsed: p, formModel: m, formRules: M, innerSchemas: v, innerProps: y, BREAKPOINTS: F, getEffectiveSpan: c, effectiveProps: d, effectiveActionColOptions: R, windowWidth: S, getVisibleSchemaCount: n, hasMoreFields: u, formListeners: x, displaySchemas: k, shouldShow: T, getColProps: ae, getSlotName: re, initForm: A, filterByIfShow: N, processFieldMapToTime: V, handleSubmit: L, handleReset: ie, setFieldsValue: q, getFieldsValue: G, resetFields: U, validate: X, validateFields: H, scrollToField: K, clearValidate: Z, updateSchema: j, appendSchemaByField: J, removeSchemaByField: Q, setProps: Y, formActionRef: I, syncSchemas: O, handleResize: E, ProFormItem: se, FormActions: le };
978
+ return we(() => {
979
+ se(), l("register", J), typeof window < "u" && window.addEventListener("resize", re);
980
+ }), 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 };
327
983
  }
328
984
  });
329
- var Pe = function() {
985
+ var ct = function() {
330
986
  var e = this, l = e._self._c, t = e._self._setupProxy;
331
- 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(s) {
332
- var b, P;
333
- return [t.shouldShow(s) ? l("el-col", e._b({ key: s.field, attrs: { offset: ((b = s.colProps) == null ? void 0 : b.offset) ?? ((P = t.effectiveProps.baseColProps) == null ? void 0 : P.offset) ?? 0, "data-field": s.field } }, "el-col", t.getColProps(s), !1), [l(t.ProFormItem, { attrs: { schema: s, "form-model": t.formModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef } }, [t.slots[t.getSlotName(s)] ? [e._t(t.getSlotName(s), null, { model: t.formModel, schema: s, field: s.field, values: t.formModel })] : e._e()], 2)], 1) : e._e()];
334
- }), 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(s) {
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) {
335
991
  t.collapsed = !t.collapsed;
336
- } } }, [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(s) {
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) {
337
993
  t.collapsed = !t.collapsed;
338
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);
339
- }, ge = [], Fe = /* @__PURE__ */ z(
340
- we,
341
- Pe,
342
- ge,
995
+ }, ut = [], dt = /* @__PURE__ */ ae(
996
+ it,
997
+ ct,
998
+ ut,
343
999
  !1,
344
1000
  null,
345
- "af9453ad",
1001
+ "4ee1cb87",
346
1002
  null,
347
1003
  null
348
1004
  );
349
- const ne = Fe.exports;
350
- function xe(_) {
351
- const e = g(null), l = g(_ ? ee(_) : void 0), t = () => _ ? ee(_) : void 0, s = (n) => {
352
- e.value = n;
353
- const u = t();
354
- debugger;
355
- u && Object.keys(u).length > 0 && n.setProps(u);
1005
+ 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);
356
1011
  };
357
- return _ && oe(
1012
+ return F && U(
358
1013
  () => t(),
359
- (n) => {
360
- l.value = n, n && e.value && e.value.setProps(n);
1014
+ (f) => {
1015
+ l.value = f, f && e.value && e.value.setProps(f);
361
1016
  },
362
1017
  { deep: !0 }
363
- ), [s, {
364
- register: s,
1018
+ ), [a, {
1019
+ register: a,
365
1020
  formAction: e,
366
1021
  getFieldsValue: () => {
367
- var n;
368
- return ((n = e.value) == null ? void 0 : n.getFieldsValue()) ?? {};
1022
+ var f;
1023
+ return ((f = e.value) == null ? void 0 : f.getFieldsValue()) ?? {};
369
1024
  },
370
- setFieldsValue: async (n) => {
371
- var u;
372
- await ((u = e.value) == null ? void 0 : u.setFieldsValue(n));
1025
+ setFieldsValue: async (f) => {
1026
+ var p;
1027
+ await ((p = e.value) == null ? void 0 : p.setFieldsValue(f));
373
1028
  },
374
1029
  resetFields: async () => {
375
- var n;
376
- await ((n = e.value) == null ? void 0 : n.resetFields());
1030
+ var f;
1031
+ await ((f = e.value) == null ? void 0 : f.resetFields());
377
1032
  },
378
- validate: (n) => {
379
- var u;
380
- return ((u = e.value) == null ? void 0 : u.validate(n)) ?? Promise.resolve();
1033
+ validate: (f) => {
1034
+ var p;
1035
+ return ((p = e.value) == null ? void 0 : p.validate(f)) ?? Promise.resolve();
381
1036
  },
382
- validateFields: (n) => {
383
- var u;
384
- return ((u = e.value) == null ? void 0 : u.validateFields(n)) ?? Promise.resolve();
1037
+ validateFields: (f) => {
1038
+ var p;
1039
+ return ((p = e.value) == null ? void 0 : p.validateFields(f)) ?? Promise.resolve();
385
1040
  },
386
1041
  submit: () => {
387
- var n;
388
- return ((n = e.value) == null ? void 0 : n.submit()) ?? Promise.resolve();
1042
+ var f;
1043
+ return ((f = e.value) == null ? void 0 : f.submit()) ?? Promise.resolve();
389
1044
  },
390
- scrollToField: (n, u) => {
391
- var x;
392
- return ((x = e.value) == null ? void 0 : x.scrollToField(n, u)) ?? Promise.resolve();
1045
+ scrollToField: (f, p) => {
1046
+ var O;
1047
+ return ((O = e.value) == null ? void 0 : O.scrollToField(f, p)) ?? Promise.resolve();
393
1048
  },
394
- clearValidate: (n) => {
395
- var u;
396
- (u = e.value) == null || u.clearValidate(n);
1049
+ clearValidate: (f) => {
1050
+ var p;
1051
+ (p = e.value) == null || p.clearValidate(f);
397
1052
  },
398
- updateSchema: (n) => {
399
- var u;
400
- return ((u = e.value) == null ? void 0 : u.updateSchema(n)) ?? Promise.resolve();
1053
+ updateSchema: (f) => {
1054
+ var p;
1055
+ return ((p = e.value) == null ? void 0 : p.updateSchema(f)) ?? Promise.resolve();
401
1056
  },
402
- appendSchemaByField: (n, u, x) => {
403
- var k;
404
- return ((k = e.value) == null ? void 0 : k.appendSchemaByField(n, u, x)) ?? Promise.resolve();
1057
+ appendSchemaByField: (f, p, O) => {
1058
+ var K;
1059
+ return ((K = e.value) == null ? void 0 : K.appendSchemaByField(f, p, O)) ?? Promise.resolve();
405
1060
  },
406
- removeSchemaByField: (n) => {
407
- var u;
408
- return ((u = e.value) == null ? void 0 : u.removeSchemaByField(n)) ?? Promise.resolve();
1061
+ removeSchemaByField: (f) => {
1062
+ var p;
1063
+ return ((p = e.value) == null ? void 0 : p.removeSchemaByField(f)) ?? Promise.resolve();
409
1064
  },
410
- setProps: async (n) => {
411
- var u;
412
- l.value = { ...l.value, ...n }, await ((u = e.value) == null ? void 0 : u.setProps(n));
1065
+ setProps: async (f) => {
1066
+ var p;
1067
+ l.value = { ...l.value, ...f }, await ((p = e.value) == null ? void 0 : p.setProps(f));
413
1068
  }
414
1069
  }];
415
1070
  }
416
- const Be = [
417
- // { name: 'ProTable', component: ProTable },
418
- { name: "ProForm", component: ne },
419
- { name: "ProFormItem", component: se },
420
- { name: "FormActions", component: le }
421
- // { name: 'ProCard', component: ProCard },
422
- // { name: 'ProDescriptions', component: ProDescriptions },
1071
+ const ft = [
1072
+ { name: "ProTable", component: Ae },
1073
+ { name: "TableAction", component: ke },
1074
+ { name: "ProForm", component: Me },
1075
+ { name: "ProFormItem", component: Te },
1076
+ { name: "FormActions", component: De }
423
1077
  ];
424
- function Ce(_) {
425
- Be.forEach(({ name: e, component: l }) => {
426
- _.component(e, l);
1078
+ function pt(F) {
1079
+ ft.forEach(({ name: e, component: l }) => {
1080
+ F.component(e, l);
427
1081
  });
428
1082
  }
429
- const Me = {
430
- install: Ce,
431
- // ProTable,
432
- ProForm: ne
433
- // ProCard,
434
- // ProDescriptions,
1083
+ const _t = {
1084
+ install: pt,
1085
+ ProTable: Ae,
1086
+ ProForm: Me,
1087
+ TableAction: ke
435
1088
  };
436
1089
  export {
437
- le as FormActions,
438
- ne as ProForm,
439
- se as ProFormItem,
440
- Me as default,
441
- Ce as install,
442
- xe as useForm
1090
+ De as FormActions,
1091
+ Me as ProForm,
1092
+ Te as ProFormItem,
1093
+ Ae as ProTable,
1094
+ ke as TableAction,
1095
+ _t as default,
1096
+ pt as install,
1097
+ Be as useComponentSetting,
1098
+ bt as useForm,
1099
+ ht as useProTable
443
1100
  };
444
1101
  //# sourceMappingURL=element-component-pro.es.js.map