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