@vue-start/element-pro 0.2.26 → 0.2.28
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/CHANGELOG.md +9 -0
- package/dist/index.d.ts +3560 -112
- package/dist/index.es.js +647 -527
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { createExpose as
|
|
2
|
-
import { ElFormItem as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { keys as
|
|
5
|
-
import { useEffect as
|
|
6
|
-
const
|
|
1
|
+
import { createExpose as Ie, createFormItemCompFn as He, createExposeObj as q, useProConfig as Je, ProForm as O, ProSearchForm as Z, ProFormList as te, ProTable as H, ProDesc as J, ProCurdDesc as ne, ProCurdForm as ae, ProCurdModal as le, ProUploaderText as re, ProTip as oe, ElementKeys as b, ProCurd as Qe, ProList as Xe, ProPage as Ye, ProShowText as ue, ProShowDigit as _e, ProShowDate as et, ProShowOptions as W, ProShowTree as ce } from "@vue-start/pro";
|
|
2
|
+
import { ElFormItem as Q, ElForm as X, ElLoading as Ve, ElDialog as de, ElButton as U, ElPagination as ie, ElPopover as fe, ElCheckboxGroup as me, ElCheckboxButton as tt, ElCheckbox as Be, ElRadioGroup as ye, ElRadioButton as nt, ElRadio as at, ElSelect as se, ElOption as lt, ElTabs as ge, ElTabPane as rt, ElMenu as j, ElUpload as ve, useFormItem as ot, ElInputNumber as D, ElTree as be, ElInput as ut, ElDatePicker as ct, ElTimePicker as dt, ElTreeSelect as it, ElSwitch as ft, ElCascader as mt, ElTableColumn as Y, ElTable as he, ElDescriptions as Ne, ElTooltip as Le, ElRow as yt, ElCol as st, ElDescriptionsItem as gt } from "element-plus";
|
|
3
|
+
import { defineComponent as p, createVNode as c, mergeProps as g, reactive as vt, ref as T, toRaw as bt, computed as N, Fragment as Ae, nextTick as Pe } from "vue";
|
|
4
|
+
import { keys as w, omit as y, isBoolean as $, isString as ht, debounce as Pt, map as R, size as L, pick as _, get as B, isNumber as A, isArray as St, filter as Se, reduce as Ce, forEach as Ct, find as pt, isFunction as kt } from "lodash";
|
|
5
|
+
import { useEffect as G, generateId as Ft, useWatch as z, convertCollection as Kt, isValidFileType as xt, convertFileSize as Et, isSame as pe, getNameMapByMergeOpts as Tt } from "@vue-start/hooks";
|
|
6
|
+
const ke = () => ({
|
|
7
7
|
name: {
|
|
8
8
|
type: [String, Array]
|
|
9
9
|
}
|
|
10
|
-
}),
|
|
10
|
+
}), ze = p({
|
|
11
11
|
props: {
|
|
12
|
-
...
|
|
13
|
-
...
|
|
12
|
+
...Q.props,
|
|
13
|
+
...ke()
|
|
14
14
|
},
|
|
15
15
|
setup: (e, {
|
|
16
16
|
slots: t
|
|
17
17
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return () => c(
|
|
18
|
+
const u = w(ke());
|
|
19
|
+
return () => c(Q, g(y(e, ...u, "name", "prop"), {
|
|
20
20
|
prop: e.prop || e.name
|
|
21
21
|
}), {
|
|
22
22
|
label: e.label ? () => e.label : void 0,
|
|
23
23
|
...t
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), Oe = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], Rt = p({
|
|
27
27
|
props: {
|
|
28
|
-
...
|
|
28
|
+
...X.props,
|
|
29
29
|
hideRequiredMark: {
|
|
30
30
|
type: [Boolean, Object],
|
|
31
31
|
default: void 0
|
|
@@ -33,30 +33,30 @@ const fe = () => ({
|
|
|
33
33
|
},
|
|
34
34
|
setup: (e, {
|
|
35
35
|
slots: t,
|
|
36
|
-
emit:
|
|
37
|
-
expose:
|
|
36
|
+
emit: u,
|
|
37
|
+
expose: n
|
|
38
38
|
}) => {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
41
|
-
!
|
|
42
|
-
var
|
|
43
|
-
(
|
|
44
|
-
|
|
39
|
+
const o = e.model || vt({}), r = T();
|
|
40
|
+
return G(() => {
|
|
41
|
+
!r.value || (r.value.submit = () => {
|
|
42
|
+
var a;
|
|
43
|
+
(a = r.value) == null || a.validate((m, l) => {
|
|
44
|
+
m ? u("finish", bt(o)) : u("finishFailed", l);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
-
}, []),
|
|
48
|
-
ref:
|
|
49
|
-
},
|
|
47
|
+
}, []), n(Ie(Oe, r)), () => c(X, g({
|
|
48
|
+
ref: r
|
|
49
|
+
}, y(e, "model"), {
|
|
50
50
|
hideRequiredAsterisk: $(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
|
|
51
|
-
model:
|
|
51
|
+
model: o
|
|
52
52
|
}), t);
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), M = He(ze, (e, t, u) => ({
|
|
55
55
|
modelValue: e,
|
|
56
56
|
"onUpdate:modelValue": t,
|
|
57
57
|
clearable: !0,
|
|
58
|
-
disabled:
|
|
59
|
-
})),
|
|
58
|
+
disabled: u
|
|
59
|
+
})), Ue = (e = "comp") => e + "-" + Ft(), Mt = () => ({
|
|
60
60
|
loading: {
|
|
61
61
|
type: Boolean
|
|
62
62
|
},
|
|
@@ -84,22 +84,22 @@ const fe = () => ({
|
|
|
84
84
|
customClass: {
|
|
85
85
|
type: String
|
|
86
86
|
}
|
|
87
|
-
}),
|
|
87
|
+
}), De = p({
|
|
88
88
|
props: {
|
|
89
|
-
...
|
|
89
|
+
...Mt()
|
|
90
90
|
},
|
|
91
91
|
setup: (e, {
|
|
92
92
|
slots: t
|
|
93
93
|
}) => {
|
|
94
|
-
const
|
|
95
|
-
return
|
|
94
|
+
const u = Ue();
|
|
95
|
+
return G(() => {
|
|
96
96
|
if (!e.loading)
|
|
97
97
|
return;
|
|
98
|
-
let
|
|
99
|
-
if (t.default ?
|
|
98
|
+
let n = e.target;
|
|
99
|
+
if (t.default ? n = document.getElementById(u) : e.target && ht(e.target) && (n = document.querySelector("#" + e.target)), !n)
|
|
100
100
|
return;
|
|
101
|
-
const
|
|
102
|
-
target:
|
|
101
|
+
const o = Ve.service({
|
|
102
|
+
target: n,
|
|
103
103
|
body: e.body,
|
|
104
104
|
fullscreen: e.fullscreen,
|
|
105
105
|
lock: e.lock,
|
|
@@ -109,13 +109,13 @@ const fe = () => ({
|
|
|
109
109
|
customClass: e.customClass
|
|
110
110
|
});
|
|
111
111
|
return () => {
|
|
112
|
-
|
|
112
|
+
o && o.close();
|
|
113
113
|
};
|
|
114
114
|
}, () => e.loading), () => t.default ? c("div", {
|
|
115
|
-
id:
|
|
115
|
+
id: u
|
|
116
116
|
}, [t.default()]) : null;
|
|
117
117
|
}
|
|
118
|
-
}),
|
|
118
|
+
}), Fe = () => ({
|
|
119
119
|
clsName: {
|
|
120
120
|
type: String,
|
|
121
121
|
default: "pro-modal"
|
|
@@ -147,72 +147,72 @@ const fe = () => ({
|
|
|
147
147
|
type: [Object, Boolean],
|
|
148
148
|
default: void 0
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), je = p({
|
|
151
151
|
inheritAttrs: !1,
|
|
152
152
|
props: {
|
|
153
|
-
...
|
|
153
|
+
...de.props,
|
|
154
154
|
appendToBody: {
|
|
155
155
|
type: Boolean,
|
|
156
156
|
default: !0
|
|
157
157
|
},
|
|
158
|
-
...
|
|
158
|
+
...Fe()
|
|
159
159
|
},
|
|
160
160
|
setup: (e, {
|
|
161
161
|
slots: t,
|
|
162
|
-
emit:
|
|
163
|
-
attrs:
|
|
162
|
+
emit: u,
|
|
163
|
+
attrs: n
|
|
164
164
|
}) => {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
const o = T(e.visible);
|
|
166
|
+
z(() => {
|
|
167
|
+
o.value !== e.visible && (o.value = e.visible);
|
|
168
168
|
}, () => e.visible);
|
|
169
|
-
const
|
|
169
|
+
const r = () => {
|
|
170
170
|
var l;
|
|
171
171
|
if ((l = e.cancelButtonProps) != null && l.onClick) {
|
|
172
172
|
e.cancelButtonProps.onClick();
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
},
|
|
175
|
+
o.value = !1, u("update:visible", !1);
|
|
176
|
+
}, a = () => {
|
|
177
177
|
var l;
|
|
178
178
|
if ((l = e.okButtonProps) != null && l.onClick) {
|
|
179
179
|
e.okButtonProps.onClick();
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
|
|
183
|
-
},
|
|
184
|
-
return () => c(
|
|
182
|
+
u("ok");
|
|
183
|
+
}, m = w(Fe());
|
|
184
|
+
return () => c(de, g({
|
|
185
185
|
class: e.clsName
|
|
186
|
-
},
|
|
186
|
+
}, y(n, "onCancel"), y(e, ...m, "modelValue"), {
|
|
187
187
|
closeOnClickModal: $(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
|
|
188
|
-
modelValue:
|
|
189
|
-
"onUpdate:modelValue": [(l) =>
|
|
190
|
-
|
|
188
|
+
modelValue: o.value,
|
|
189
|
+
"onUpdate:modelValue": [(l) => o.value = l, (l) => {
|
|
190
|
+
u("update:visible", l);
|
|
191
191
|
}],
|
|
192
192
|
onClose: () => {
|
|
193
|
-
|
|
193
|
+
u("cancel");
|
|
194
194
|
}
|
|
195
195
|
}), {
|
|
196
196
|
footer: e.footer === !1 ? void 0 : () => c("div", {
|
|
197
197
|
class: `${e.clsName}-operate`
|
|
198
|
-
}, [c(
|
|
199
|
-
onClick:
|
|
198
|
+
}, [c(U, g(y(e.cancelButtonProps, "onClick"), {
|
|
199
|
+
onClick: r
|
|
200
200
|
}), {
|
|
201
201
|
default: () => [e.cancelText]
|
|
202
|
-
}), c(
|
|
202
|
+
}), c(U, g({
|
|
203
203
|
type: "primary",
|
|
204
204
|
loading: e.confirmLoading
|
|
205
|
-
},
|
|
206
|
-
onClick:
|
|
205
|
+
}, y(e.okButtonProps, "onClick"), {
|
|
206
|
+
onClick: a
|
|
207
207
|
}), {
|
|
208
208
|
default: () => [e.okText]
|
|
209
209
|
})]),
|
|
210
210
|
...t
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
-
}),
|
|
213
|
+
}), wt = p({
|
|
214
214
|
props: {
|
|
215
|
-
...
|
|
215
|
+
...ie.props,
|
|
216
216
|
page: {
|
|
217
217
|
type: Number,
|
|
218
218
|
default: 1
|
|
@@ -220,41 +220,41 @@ const fe = () => ({
|
|
|
220
220
|
},
|
|
221
221
|
setup: (e, {
|
|
222
222
|
slots: t,
|
|
223
|
-
emit:
|
|
223
|
+
emit: u
|
|
224
224
|
}) => {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}, () => e.page),
|
|
229
|
-
|
|
225
|
+
const n = T(e.page), o = T(e.pageSize);
|
|
226
|
+
z(() => {
|
|
227
|
+
n.value !== e.page && (n.value = e.page);
|
|
228
|
+
}, () => e.page), z(() => {
|
|
229
|
+
o.value !== e.pageSize && (o.value = e.pageSize);
|
|
230
230
|
}, () => e.pageSize);
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
}, 300),
|
|
234
|
-
|
|
235
|
-
},
|
|
236
|
-
|
|
231
|
+
const r = Pt(() => {
|
|
232
|
+
u("composeChange", n.value, o.value);
|
|
233
|
+
}, 300), a = () => {
|
|
234
|
+
r(), u("update:page", n.value);
|
|
235
|
+
}, m = () => {
|
|
236
|
+
r(), u("update:pageSize", o.value);
|
|
237
237
|
};
|
|
238
|
-
return () => c(
|
|
239
|
-
currentPage:
|
|
240
|
-
"onUpdate:currentPage": (l) =>
|
|
241
|
-
pageSize:
|
|
242
|
-
"onUpdate:pageSize": (l) =>
|
|
243
|
-
onCurrentChange:
|
|
244
|
-
onSizeChange:
|
|
245
|
-
},
|
|
238
|
+
return () => c(ie, g({
|
|
239
|
+
currentPage: n.value,
|
|
240
|
+
"onUpdate:currentPage": (l) => n.value = l,
|
|
241
|
+
pageSize: o.value,
|
|
242
|
+
"onUpdate:pageSize": (l) => o.value = l,
|
|
243
|
+
onCurrentChange: a,
|
|
244
|
+
onSizeChange: m
|
|
245
|
+
}, y(e, "currentPage", "pageSize")), t);
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
247
|
+
}), It = p({
|
|
248
248
|
props: {
|
|
249
|
-
...
|
|
249
|
+
...fe.props
|
|
250
250
|
},
|
|
251
251
|
setup: (e, {
|
|
252
252
|
slots: t
|
|
253
|
-
}) => () => c(
|
|
253
|
+
}) => () => c(fe, e, {
|
|
254
254
|
reference: t.default,
|
|
255
255
|
default: t.content
|
|
256
256
|
})
|
|
257
|
-
}),
|
|
257
|
+
}), Ke = () => ({
|
|
258
258
|
options: Array,
|
|
259
259
|
buttonStyle: {
|
|
260
260
|
type: String,
|
|
@@ -264,49 +264,49 @@ const fe = () => ({
|
|
|
264
264
|
type: String,
|
|
265
265
|
default: "default"
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
267
|
+
}), Vt = p({
|
|
268
268
|
props: {
|
|
269
|
-
...
|
|
270
|
-
...
|
|
269
|
+
...me.props,
|
|
270
|
+
...Ke()
|
|
271
271
|
},
|
|
272
272
|
setup: (e, {
|
|
273
273
|
slots: t,
|
|
274
|
-
emit:
|
|
275
|
-
expose:
|
|
274
|
+
emit: u,
|
|
275
|
+
expose: n
|
|
276
276
|
}) => {
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
return () => c(
|
|
281
|
-
ref:
|
|
282
|
-
},
|
|
283
|
-
"onUpdate:modelValue": (
|
|
284
|
-
|
|
277
|
+
const o = T();
|
|
278
|
+
n(q(o));
|
|
279
|
+
const r = w(Ke());
|
|
280
|
+
return () => c(me, g({
|
|
281
|
+
ref: o
|
|
282
|
+
}, y(e, r), {
|
|
283
|
+
"onUpdate:modelValue": (a) => {
|
|
284
|
+
u("update:modelValue", a || void 0);
|
|
285
285
|
}
|
|
286
286
|
}), {
|
|
287
287
|
default: () => {
|
|
288
|
-
var
|
|
289
|
-
return [(
|
|
290
|
-
var
|
|
291
|
-
const
|
|
292
|
-
return e.optionType === "button" || e.buttonStyle === "button" ? c(
|
|
288
|
+
var a, m;
|
|
289
|
+
return [(a = t.start) == null ? void 0 : a.call(t), R(e.options, (l) => {
|
|
290
|
+
var P;
|
|
291
|
+
const h = (P = t.label) == null ? void 0 : P.call(t, l);
|
|
292
|
+
return e.optionType === "button" || e.buttonStyle === "button" ? c(tt, g({
|
|
293
293
|
key: l.value
|
|
294
|
-
},
|
|
294
|
+
}, y(l, "value"), {
|
|
295
295
|
label: l.value
|
|
296
296
|
}), {
|
|
297
|
-
default: () => [
|
|
298
|
-
}) : c(
|
|
297
|
+
default: () => [h || l.label]
|
|
298
|
+
}) : c(Be, g({
|
|
299
299
|
key: l.value
|
|
300
300
|
}, l, {
|
|
301
301
|
label: l.value
|
|
302
302
|
}), {
|
|
303
|
-
default: () => [
|
|
303
|
+
default: () => [h || l.label]
|
|
304
304
|
});
|
|
305
|
-
}), (
|
|
305
|
+
}), (m = t.default) == null ? void 0 : m.call(t)];
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
}),
|
|
309
|
+
}), xe = () => ({
|
|
310
310
|
options: {
|
|
311
311
|
type: Array
|
|
312
312
|
},
|
|
@@ -318,116 +318,116 @@ const fe = () => ({
|
|
|
318
318
|
type: String,
|
|
319
319
|
default: "default"
|
|
320
320
|
}
|
|
321
|
-
}),
|
|
321
|
+
}), Bt = p({
|
|
322
322
|
props: {
|
|
323
|
-
...
|
|
324
|
-
...
|
|
323
|
+
...ye.props,
|
|
324
|
+
...xe()
|
|
325
325
|
},
|
|
326
326
|
setup: (e, {
|
|
327
327
|
slots: t,
|
|
328
|
-
emit:
|
|
329
|
-
expose:
|
|
328
|
+
emit: u,
|
|
329
|
+
expose: n
|
|
330
330
|
}) => {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
return () => c(
|
|
335
|
-
ref:
|
|
336
|
-
},
|
|
337
|
-
"onUpdate:modelValue": (
|
|
338
|
-
|
|
331
|
+
const o = T();
|
|
332
|
+
n(q(o));
|
|
333
|
+
const r = w(xe());
|
|
334
|
+
return () => c(ye, g({
|
|
335
|
+
ref: o
|
|
336
|
+
}, y(e, r), {
|
|
337
|
+
"onUpdate:modelValue": (a) => {
|
|
338
|
+
u("update:modelValue", a);
|
|
339
339
|
}
|
|
340
340
|
}), {
|
|
341
341
|
default: () => {
|
|
342
|
-
var
|
|
343
|
-
return [(
|
|
344
|
-
var
|
|
345
|
-
const
|
|
346
|
-
return e.optionType === "button" || e.buttonStyle === "button" ? c(
|
|
342
|
+
var a, m;
|
|
343
|
+
return [(a = t.start) == null ? void 0 : a.call(t), R(e.options, (l) => {
|
|
344
|
+
var P;
|
|
345
|
+
const h = (P = t.label) == null ? void 0 : P.call(t, l);
|
|
346
|
+
return e.optionType === "button" || e.buttonStyle === "button" ? c(nt, g({
|
|
347
347
|
key: l.value
|
|
348
|
-
},
|
|
348
|
+
}, y(l, "value"), {
|
|
349
349
|
label: l.value
|
|
350
350
|
}), {
|
|
351
|
-
default: () => [
|
|
352
|
-
}) : c(
|
|
351
|
+
default: () => [h || l.label]
|
|
352
|
+
}) : c(at, g({
|
|
353
353
|
key: l.value
|
|
354
|
-
},
|
|
354
|
+
}, y(l, "value"), {
|
|
355
355
|
label: l.value
|
|
356
356
|
}), {
|
|
357
|
-
default: () => [
|
|
357
|
+
default: () => [h || l.label]
|
|
358
358
|
});
|
|
359
|
-
}), (
|
|
359
|
+
}), (m = t.default) == null ? void 0 : m.call(t)];
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
|
-
}),
|
|
363
|
+
}), Ee = () => ({
|
|
364
364
|
options: Array
|
|
365
|
-
}),
|
|
365
|
+
}), Nt = p({
|
|
366
366
|
props: {
|
|
367
|
-
...
|
|
368
|
-
...
|
|
367
|
+
...se.props,
|
|
368
|
+
...Ee()
|
|
369
369
|
},
|
|
370
370
|
setup: (e, {
|
|
371
371
|
slots: t,
|
|
372
|
-
emit:
|
|
373
|
-
expose:
|
|
372
|
+
emit: u,
|
|
373
|
+
expose: n
|
|
374
374
|
}) => {
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
return () => c(
|
|
379
|
-
ref:
|
|
380
|
-
},
|
|
381
|
-
"onUpdate:modelValue": (
|
|
382
|
-
|
|
375
|
+
const o = T();
|
|
376
|
+
n(q(o));
|
|
377
|
+
const r = w(Ee());
|
|
378
|
+
return () => c(se, g({
|
|
379
|
+
ref: o
|
|
380
|
+
}, y(e, r), {
|
|
381
|
+
"onUpdate:modelValue": (a) => {
|
|
382
|
+
u("update:modelValue", a || void 0);
|
|
383
383
|
}
|
|
384
384
|
}), {
|
|
385
385
|
default: () => {
|
|
386
|
-
var
|
|
387
|
-
return [(
|
|
388
|
-
var
|
|
389
|
-
const
|
|
390
|
-
return c(
|
|
386
|
+
var a, m;
|
|
387
|
+
return [(a = t.start) == null ? void 0 : a.call(t), R(e.options, (l) => {
|
|
388
|
+
var P;
|
|
389
|
+
const h = (P = t.label) == null ? void 0 : P.call(t, l);
|
|
390
|
+
return c(lt, g({
|
|
391
391
|
key: l.value
|
|
392
392
|
}, l), {
|
|
393
|
-
default: () => [
|
|
393
|
+
default: () => [h || l.label]
|
|
394
394
|
});
|
|
395
|
-
}), (
|
|
395
|
+
}), (m = t.default) == null ? void 0 : m.call(t)];
|
|
396
396
|
},
|
|
397
|
-
...
|
|
397
|
+
...y(t, "default")
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
}),
|
|
400
|
+
}), ln = p({
|
|
401
401
|
props: {
|
|
402
|
-
...
|
|
402
|
+
...ge.props,
|
|
403
403
|
options: {
|
|
404
404
|
type: Array
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
407
|
setup: (e, {
|
|
408
408
|
slots: t,
|
|
409
|
-
emit:
|
|
410
|
-
}) => () => c(
|
|
411
|
-
"onUpdate:modelValue": (
|
|
412
|
-
|
|
409
|
+
emit: u
|
|
410
|
+
}) => () => c(ge, g(y(e, "options"), {
|
|
411
|
+
"onUpdate:modelValue": (n) => {
|
|
412
|
+
u("update:modelValue", n);
|
|
413
413
|
}
|
|
414
414
|
}), {
|
|
415
415
|
default: () => {
|
|
416
|
-
var
|
|
417
|
-
return [(
|
|
418
|
-
key:
|
|
419
|
-
},
|
|
420
|
-
name:
|
|
416
|
+
var n, o;
|
|
417
|
+
return [(n = t.start) == null ? void 0 : n.call(t), R(e.options, (r) => c(rt, g({
|
|
418
|
+
key: r.value
|
|
419
|
+
}, y(r, "value"), {
|
|
420
|
+
name: r.value
|
|
421
421
|
}), {
|
|
422
422
|
label: () => {
|
|
423
|
-
var
|
|
424
|
-
return ((
|
|
423
|
+
var a;
|
|
424
|
+
return ((a = t.label) == null ? void 0 : a.call(t, r)) || r.label;
|
|
425
425
|
}
|
|
426
|
-
})), (
|
|
426
|
+
})), (o = t.end) == null ? void 0 : o.call(t)];
|
|
427
427
|
},
|
|
428
428
|
...t
|
|
429
429
|
})
|
|
430
|
-
}),
|
|
430
|
+
}), ee = {
|
|
431
431
|
convertSubMenuProps: {
|
|
432
432
|
type: Function
|
|
433
433
|
},
|
|
@@ -437,51 +437,51 @@ const fe = () => ({
|
|
|
437
437
|
onMenuItemClick: {
|
|
438
438
|
type: Function
|
|
439
439
|
}
|
|
440
|
-
},
|
|
440
|
+
}, qe = w(ee), $e = p({
|
|
441
441
|
inheritAttrs: !1,
|
|
442
442
|
props: {
|
|
443
443
|
menu: {
|
|
444
444
|
type: Object
|
|
445
445
|
},
|
|
446
|
-
...
|
|
446
|
+
...ee
|
|
447
447
|
},
|
|
448
448
|
setup: (e, {
|
|
449
449
|
slots: t
|
|
450
450
|
}) => {
|
|
451
|
-
const
|
|
452
|
-
var
|
|
453
|
-
(
|
|
451
|
+
const u = () => {
|
|
452
|
+
var n;
|
|
453
|
+
(n = e.onMenuItemClick) == null || n.call(e, e.menu);
|
|
454
454
|
};
|
|
455
455
|
return () => {
|
|
456
|
-
var
|
|
457
|
-
const
|
|
458
|
-
return (
|
|
459
|
-
index:
|
|
460
|
-
}, (
|
|
461
|
-
default: () => [
|
|
462
|
-
menu:
|
|
463
|
-
},
|
|
456
|
+
var o, r;
|
|
457
|
+
const n = e.menu;
|
|
458
|
+
return (n == null ? void 0 : n.children) && L(n.children) > 0 ? c(j.SubMenu, g({
|
|
459
|
+
index: n == null ? void 0 : n.value
|
|
460
|
+
}, (o = e.convertSubMenuProps) == null ? void 0 : o.call(e, n)), {
|
|
461
|
+
default: () => [R(n.children, (a) => c($e, g({
|
|
462
|
+
menu: a
|
|
463
|
+
}, _(e, qe)), t))],
|
|
464
464
|
title: () => {
|
|
465
|
-
var
|
|
466
|
-
return ((
|
|
465
|
+
var a;
|
|
466
|
+
return ((a = t.title) == null ? void 0 : a.call(t, n)) || (n == null ? void 0 : n.label);
|
|
467
467
|
}
|
|
468
|
-
}) : c(
|
|
469
|
-
index:
|
|
470
|
-
}, (
|
|
471
|
-
onClick:
|
|
468
|
+
}) : c(j.MenuItem, g({
|
|
469
|
+
index: n == null ? void 0 : n.value
|
|
470
|
+
}, (r = e.convertMenuItemProps) == null ? void 0 : r.call(e, n), {
|
|
471
|
+
onClick: u
|
|
472
472
|
}), {
|
|
473
473
|
title: () => {
|
|
474
|
-
var
|
|
475
|
-
return ((
|
|
474
|
+
var a;
|
|
475
|
+
return ((a = t.title) == null ? void 0 : a.call(t, n)) || (n == null ? void 0 : n.label);
|
|
476
476
|
},
|
|
477
477
|
default: t.default ? () => {
|
|
478
|
-
var
|
|
479
|
-
return (
|
|
478
|
+
var a;
|
|
479
|
+
return (a = t.default) == null ? void 0 : a.call(t, n);
|
|
480
480
|
} : void 0
|
|
481
481
|
});
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
}),
|
|
484
|
+
}), Te = () => ({
|
|
485
485
|
activeKey: {
|
|
486
486
|
type: String
|
|
487
487
|
},
|
|
@@ -496,43 +496,43 @@ const fe = () => ({
|
|
|
496
496
|
label: "label"
|
|
497
497
|
}
|
|
498
498
|
},
|
|
499
|
-
...
|
|
500
|
-
}),
|
|
499
|
+
...ee
|
|
500
|
+
}), Lt = p({
|
|
501
501
|
props: {
|
|
502
|
-
...
|
|
503
|
-
...
|
|
502
|
+
...y(j.props, "defaultActive"),
|
|
503
|
+
...Te()
|
|
504
504
|
},
|
|
505
505
|
setup: (e, {
|
|
506
506
|
slots: t
|
|
507
507
|
}) => {
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
e.activeKey !==
|
|
508
|
+
const u = T(e.activeKey);
|
|
509
|
+
z(() => {
|
|
510
|
+
e.activeKey !== u.value && (u.value = e.activeKey);
|
|
511
511
|
}, () => e.activeKey);
|
|
512
|
-
const
|
|
513
|
-
var
|
|
514
|
-
return
|
|
515
|
-
var
|
|
516
|
-
const
|
|
512
|
+
const n = N(() => {
|
|
513
|
+
var r;
|
|
514
|
+
return Kt(e.options, (a) => {
|
|
515
|
+
var h, P;
|
|
516
|
+
const m = ((h = e.fieldNames) == null ? void 0 : h.value) || "value", l = ((P = e.fieldNames) == null ? void 0 : P.label) || "label";
|
|
517
517
|
return {
|
|
518
|
-
...
|
|
519
|
-
value:
|
|
520
|
-
label:
|
|
518
|
+
...y(a, m, l),
|
|
519
|
+
value: B(a, m),
|
|
520
|
+
label: B(a, l)
|
|
521
521
|
};
|
|
522
522
|
}, {
|
|
523
|
-
children: ((
|
|
523
|
+
children: ((r = e.fieldNames) == null ? void 0 : r.children) || "children",
|
|
524
524
|
childrenName: "children"
|
|
525
525
|
});
|
|
526
|
-
}),
|
|
527
|
-
return () => c(
|
|
528
|
-
defaultActive:
|
|
529
|
-
},
|
|
530
|
-
default: () => c(
|
|
531
|
-
menu:
|
|
532
|
-
},
|
|
526
|
+
}), o = w(Te());
|
|
527
|
+
return () => c(j, g({
|
|
528
|
+
defaultActive: u.value
|
|
529
|
+
}, y(e, o)), {
|
|
530
|
+
default: () => c(Ae, null, [R(n.value, (r) => c($e, g({
|
|
531
|
+
menu: r
|
|
532
|
+
}, _(e, qe)), t))])
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
}),
|
|
535
|
+
}), Re = () => ({
|
|
536
536
|
modelValue: {
|
|
537
537
|
type: Array,
|
|
538
538
|
default: void 0
|
|
@@ -554,80 +554,116 @@ const fe = () => ({
|
|
|
554
554
|
onStart: Function,
|
|
555
555
|
beforeUpload: {
|
|
556
556
|
type: Function
|
|
557
|
+
},
|
|
558
|
+
globalLoading: {
|
|
559
|
+
type: [Boolean, Object],
|
|
560
|
+
default: void 0
|
|
561
|
+
},
|
|
562
|
+
renderDom: {
|
|
563
|
+
type: Function,
|
|
564
|
+
default: void 0
|
|
557
565
|
}
|
|
558
|
-
}),
|
|
566
|
+
}), At = ["abort", "submit", "clearFiles", "handleStart", "handleRemove"], Ge = p({
|
|
559
567
|
props: {
|
|
560
|
-
...
|
|
561
|
-
...
|
|
568
|
+
...y(ve.props, "fileList"),
|
|
569
|
+
...Re()
|
|
562
570
|
},
|
|
563
571
|
setup: (e, {
|
|
564
572
|
slots: t,
|
|
565
|
-
expose:
|
|
566
|
-
emit:
|
|
573
|
+
expose: u,
|
|
574
|
+
emit: n
|
|
567
575
|
}) => {
|
|
568
|
-
const u = p();
|
|
569
|
-
o(U(u, pt));
|
|
570
576
|
const {
|
|
571
|
-
|
|
572
|
-
} =
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
577
|
+
showMsg: o
|
|
578
|
+
} = Je(), r = T();
|
|
579
|
+
u(q(r, At));
|
|
580
|
+
const {
|
|
581
|
+
formItem: a
|
|
582
|
+
} = ot(), m = () => St(e.modelValue) ? R(e.modelValue, (i) => {
|
|
583
|
+
var s;
|
|
584
|
+
return ((s = e.convertItemData) == null ? void 0 : s.call(e, i)) || i;
|
|
585
|
+
}) : [], l = T(m());
|
|
586
|
+
let h = !1;
|
|
587
|
+
const P = () => {
|
|
588
|
+
var s;
|
|
589
|
+
h = !0;
|
|
590
|
+
const i = Se(l.value, (C) => C.status === "success");
|
|
591
|
+
n("update:modelValue", R(i, (C) => {
|
|
592
|
+
var E;
|
|
593
|
+
return ((E = e.convertResponseData) == null ? void 0 : E.call(e, C)) || C;
|
|
594
|
+
})), (s = a == null ? void 0 : a.validate) == null || s.call(a, "change");
|
|
585
595
|
};
|
|
586
|
-
|
|
587
|
-
|
|
596
|
+
z(() => {
|
|
597
|
+
h || (l.value = m(), h = !1);
|
|
588
598
|
}, () => e.modelValue);
|
|
589
|
-
|
|
590
|
-
|
|
599
|
+
let v;
|
|
600
|
+
const K = () => {
|
|
601
|
+
e.globalLoading && (v = Ve.service({
|
|
602
|
+
lock: !0,
|
|
603
|
+
text: "\u6B63\u5728\u4E0A\u4F20\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E...",
|
|
604
|
+
...$(e.globalLoading) ? {} : e.globalLoading
|
|
605
|
+
}));
|
|
606
|
+
}, d = () => {
|
|
607
|
+
e.globalLoading && (v == null || v.close());
|
|
608
|
+
};
|
|
609
|
+
G(() => () => {
|
|
610
|
+
d();
|
|
611
|
+
}, []);
|
|
612
|
+
const f = (i, s) => {
|
|
613
|
+
if (e.onErrorMsg) {
|
|
614
|
+
e.onErrorMsg(i, s);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
o({
|
|
618
|
+
type: "error",
|
|
619
|
+
message: s
|
|
620
|
+
});
|
|
621
|
+
}, k = (i) => {
|
|
622
|
+
var s;
|
|
591
623
|
if (e.beforeUpload)
|
|
592
|
-
return e.beforeUpload(
|
|
593
|
-
if (e.accept && !
|
|
594
|
-
return (
|
|
595
|
-
if (
|
|
596
|
-
if (
|
|
597
|
-
return (
|
|
598
|
-
if (
|
|
599
|
-
return (
|
|
624
|
+
return e.beforeUpload(i);
|
|
625
|
+
if (e.accept && !xt(e.accept, i.name))
|
|
626
|
+
return f("FileTypeError", `\u8BF7\u4E0A\u4F20\u6B63\u786E\u683C\u5F0F\uFF08${e.accept.replace(/,/g, "\uFF0C")}\uFF09\u7684\u6587\u4EF6`), !1;
|
|
627
|
+
if (A(i.size)) {
|
|
628
|
+
if (i.size <= 0)
|
|
629
|
+
return f("FileSizeError-Zero", "\u4E0A\u4F20\u6587\u4EF6\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"), !1;
|
|
630
|
+
if (A(e.maxSize) && i.size > e.maxSize)
|
|
631
|
+
return f("FileSizeError-MaxSize", `\u8BF7\u4E0A\u4F20\u5C0F\u4E8E${Et(e.maxSize)}\u7684\u6587\u4EF6`), !1;
|
|
600
632
|
}
|
|
601
|
-
return (
|
|
602
|
-
},
|
|
633
|
+
return (s = e.onStart) == null || s.call(e, i), K(), !0;
|
|
634
|
+
}, S = (i, s, C) => {
|
|
635
|
+
var E;
|
|
636
|
+
(E = e.onSuccess) == null || E.call(e, i, s, C), P(), d();
|
|
637
|
+
}, x = (i, s, C) => {
|
|
638
|
+
var E;
|
|
639
|
+
(E = e.onError) == null || E.call(e, i, s, C), d(), f("UploadError", "\u4E0A\u4F20\u5931\u8D25");
|
|
640
|
+
}, F = (i, s) => {
|
|
641
|
+
var C;
|
|
642
|
+
l.value = Se(l.value, (E) => !(i.uid === E.uid && i.name === E.name)), (C = e.onRemove) == null || C.call(e, i, s), P();
|
|
643
|
+
}, I = N(() => A(e.limit) ? e.limit > L(l.value) : !0), V = w(Re());
|
|
603
644
|
return () => {
|
|
604
|
-
var
|
|
645
|
+
var i, s;
|
|
605
646
|
return c("div", {
|
|
606
|
-
class: `pro-uploader ${
|
|
607
|
-
}, [(
|
|
608
|
-
ref:
|
|
609
|
-
fileList:
|
|
610
|
-
"onUpdate:fileList": (
|
|
611
|
-
},
|
|
612
|
-
beforeUpload:
|
|
613
|
-
onSuccess:
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
},
|
|
617
|
-
onRemove: (h, x) => {
|
|
618
|
-
var E;
|
|
619
|
-
d.value = me(d.value, (I) => !(h.uid === I.uid && h.name === I.name)), (E = e.onRemove) == null || E.call(e, h, x), f();
|
|
620
|
-
}
|
|
647
|
+
class: `pro-uploader ${I.value ? "" : "pro-uploader-limit"}`
|
|
648
|
+
}, [(i = t.start) == null ? void 0 : i.call(t), c(ve, g({
|
|
649
|
+
ref: r,
|
|
650
|
+
fileList: l.value,
|
|
651
|
+
"onUpdate:fileList": (C) => l.value = C
|
|
652
|
+
}, y(e, "fileList", "onSuccess", "onError", "onRemove", "beforeUpload", ...V), {
|
|
653
|
+
beforeUpload: k,
|
|
654
|
+
onSuccess: S,
|
|
655
|
+
onError: x,
|
|
656
|
+
onRemove: F
|
|
621
657
|
}), {
|
|
622
658
|
default: () => {
|
|
623
|
-
var
|
|
624
|
-
return [
|
|
659
|
+
var C, E;
|
|
660
|
+
return [I.value && c(Ae, null, [((C = t.default) == null ? void 0 : C.call(t)) || ((E = e.renderDom) == null ? void 0 : E.call(e))])];
|
|
625
661
|
},
|
|
626
|
-
...
|
|
627
|
-
}), (
|
|
662
|
+
...y(t, "default")
|
|
663
|
+
}), (s = t.end) == null ? void 0 : s.call(t)]);
|
|
628
664
|
};
|
|
629
665
|
}
|
|
630
|
-
}),
|
|
666
|
+
}), Me = () => ({
|
|
631
667
|
modelValue: {
|
|
632
668
|
type: Array
|
|
633
669
|
},
|
|
@@ -644,54 +680,54 @@ const fe = () => ({
|
|
|
644
680
|
divider: {
|
|
645
681
|
type: Function
|
|
646
682
|
}
|
|
647
|
-
}),
|
|
683
|
+
}), zt = p({
|
|
648
684
|
props: {
|
|
649
|
-
...
|
|
685
|
+
...y(D.props, "modelValue"),
|
|
650
686
|
controlsPosition: {
|
|
651
687
|
type: String,
|
|
652
688
|
default: "right"
|
|
653
689
|
},
|
|
654
|
-
...
|
|
690
|
+
...Me()
|
|
655
691
|
},
|
|
656
692
|
setup: (e, {
|
|
657
693
|
slots: t,
|
|
658
|
-
emit:
|
|
694
|
+
emit: u
|
|
659
695
|
}) => {
|
|
660
|
-
const
|
|
661
|
-
let
|
|
662
|
-
|
|
663
|
-
|
|
696
|
+
const n = T(B(e.modelValue, 0)), o = T(B(e.modelValue, 1));
|
|
697
|
+
let r = !1;
|
|
698
|
+
z(() => {
|
|
699
|
+
r || (n.value = B(e.modelValue, 0), o.value = B(e.modelValue, 1)), r = !1;
|
|
664
700
|
}, [e.modelValue, () => e.modelValue]);
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
for (let
|
|
669
|
-
if (
|
|
670
|
-
return
|
|
671
|
-
}, l =
|
|
672
|
-
var
|
|
673
|
-
return
|
|
674
|
-
}),
|
|
675
|
-
var
|
|
676
|
-
return
|
|
677
|
-
}),
|
|
701
|
+
const a = () => {
|
|
702
|
+
r = !0, e.singleEmit ? u("update:modelValue", [n.value, o.value]) : A(n.value) && A(o.value) ? u("update:modelValue", [n.value, o.value]) : u("update:modelValue", null);
|
|
703
|
+
}, m = (v) => {
|
|
704
|
+
for (let K = 0; K < v.length; K++)
|
|
705
|
+
if (A(v[K]))
|
|
706
|
+
return v[K];
|
|
707
|
+
}, l = N(() => {
|
|
708
|
+
var v;
|
|
709
|
+
return m([o.value, (v = e.start) == null ? void 0 : v.max, e.max]);
|
|
710
|
+
}), h = N(() => {
|
|
711
|
+
var v;
|
|
712
|
+
return m([n.value, (v = e.end) == null ? void 0 : v.min, e.min]);
|
|
713
|
+
}), P = w(Me());
|
|
678
714
|
return () => {
|
|
679
|
-
var
|
|
680
|
-
const
|
|
715
|
+
var K, d;
|
|
716
|
+
const v = y(e, ...P, "min", "max");
|
|
681
717
|
return c("span", {
|
|
682
718
|
class: "pro-number-range"
|
|
683
|
-
}, [c(
|
|
719
|
+
}, [c(D, g(v, y(e.start, "max"), {
|
|
684
720
|
max: l.value,
|
|
685
|
-
modelValue:
|
|
686
|
-
"onUpdate:modelValue": [(
|
|
687
|
-
}), null), c("span", null, [((
|
|
688
|
-
min:
|
|
689
|
-
modelValue:
|
|
690
|
-
"onUpdate:modelValue": [(
|
|
721
|
+
modelValue: n.value,
|
|
722
|
+
"onUpdate:modelValue": [(f) => n.value = f, a]
|
|
723
|
+
}), null), c("span", null, [((K = t.divider) == null ? void 0 : K.call(t)) || ((d = e.divider) == null ? void 0 : d.call(e)) || " - "]), c(D, g(v, y(e.start, "min"), {
|
|
724
|
+
min: h.value,
|
|
725
|
+
modelValue: o.value,
|
|
726
|
+
"onUpdate:modelValue": [(f) => o.value = f, a]
|
|
691
727
|
}), null)]);
|
|
692
728
|
};
|
|
693
729
|
}
|
|
694
|
-
}),
|
|
730
|
+
}), we = () => ({
|
|
695
731
|
treeData: {
|
|
696
732
|
type: Array
|
|
697
733
|
},
|
|
@@ -708,84 +744,84 @@ const fe = () => ({
|
|
|
708
744
|
checkedKeys: {
|
|
709
745
|
type: Array
|
|
710
746
|
}
|
|
711
|
-
}),
|
|
747
|
+
}), rn = p({
|
|
712
748
|
props: {
|
|
713
|
-
...
|
|
714
|
-
...
|
|
749
|
+
...be.props,
|
|
750
|
+
...we()
|
|
715
751
|
},
|
|
716
752
|
setup: (e, {
|
|
717
753
|
slots: t
|
|
718
754
|
}) => {
|
|
719
|
-
const
|
|
720
|
-
const
|
|
721
|
-
if (!!
|
|
755
|
+
const u = w(we()), o = (() => {
|
|
756
|
+
const r = e.fieldNames;
|
|
757
|
+
if (!!r)
|
|
722
758
|
return {
|
|
723
|
-
label:
|
|
724
|
-
children:
|
|
725
|
-
disabled:
|
|
726
|
-
isLeaf:
|
|
727
|
-
class:
|
|
759
|
+
label: r.title,
|
|
760
|
+
children: r.children,
|
|
761
|
+
disabled: r.disabled,
|
|
762
|
+
isLeaf: r.isLeaf,
|
|
763
|
+
class: r.class
|
|
728
764
|
};
|
|
729
765
|
})();
|
|
730
766
|
return () => {
|
|
731
|
-
var
|
|
732
|
-
return c(
|
|
767
|
+
var r;
|
|
768
|
+
return c(be, g(y(e, u), {
|
|
733
769
|
data: e.treeData || e.data,
|
|
734
|
-
props:
|
|
735
|
-
nodeKey: ((
|
|
770
|
+
props: o || e.props,
|
|
771
|
+
nodeKey: ((r = e.fieldNames) == null ? void 0 : r.key) || e.nodeKey,
|
|
736
772
|
showCheckbox: $(e.selectable) ? e.selectable : e.showCheckbox,
|
|
737
773
|
defaultExpandedKeys: e.expandedKeys || e.defaultExpandedKeys,
|
|
738
774
|
defaultCheckedKeys: e.checkedKeys || e.checkedKeys
|
|
739
775
|
}), t);
|
|
740
776
|
};
|
|
741
777
|
}
|
|
742
|
-
}),
|
|
743
|
-
InputComp:
|
|
778
|
+
}), Ot = M({
|
|
779
|
+
InputComp: ut,
|
|
744
780
|
valueType: "text",
|
|
745
781
|
name: "PFromText"
|
|
746
|
-
}),
|
|
747
|
-
InputComp:
|
|
782
|
+
}), Ut = M({
|
|
783
|
+
InputComp: D,
|
|
748
784
|
valueType: "digit",
|
|
749
785
|
name: "PFormNumber"
|
|
750
|
-
}),
|
|
751
|
-
InputComp:
|
|
786
|
+
}), Dt = M({
|
|
787
|
+
InputComp: zt,
|
|
752
788
|
valueType: "digitRange",
|
|
753
789
|
name: "PFormNumberRange"
|
|
754
|
-
}),
|
|
755
|
-
InputComp:
|
|
790
|
+
}), jt = M({
|
|
791
|
+
InputComp: ct,
|
|
756
792
|
valueType: "date",
|
|
757
793
|
name: "PFormDate"
|
|
758
|
-
}),
|
|
759
|
-
InputComp:
|
|
794
|
+
}), qt = M({
|
|
795
|
+
InputComp: dt,
|
|
760
796
|
valueType: "time",
|
|
761
797
|
name: "PFormTime"
|
|
762
|
-
}),
|
|
763
|
-
InputComp:
|
|
798
|
+
}), $t = M({
|
|
799
|
+
InputComp: Nt,
|
|
764
800
|
valueType: "select",
|
|
765
801
|
name: "PFormSelect"
|
|
766
|
-
}),
|
|
767
|
-
InputComp:
|
|
802
|
+
}), Gt = M({
|
|
803
|
+
InputComp: it,
|
|
768
804
|
valueType: "treeSelect",
|
|
769
805
|
name: "PFormTreeSelect"
|
|
770
|
-
}),
|
|
771
|
-
InputComp:
|
|
806
|
+
}), Wt = M({
|
|
807
|
+
InputComp: Vt,
|
|
772
808
|
valueType: "checkbox",
|
|
773
809
|
name: "PFromCheckbox"
|
|
774
|
-
}),
|
|
775
|
-
InputComp:
|
|
810
|
+
}), Zt = M({
|
|
811
|
+
InputComp: Bt,
|
|
776
812
|
valueType: "radio",
|
|
777
813
|
name: "PFromRadio"
|
|
778
|
-
}),
|
|
779
|
-
InputComp:
|
|
814
|
+
}), Ht = M({
|
|
815
|
+
InputComp: ft,
|
|
780
816
|
valueType: "switch",
|
|
781
817
|
name: "PFromSwitch"
|
|
782
|
-
}),
|
|
783
|
-
InputComp:
|
|
818
|
+
}), Jt = M({
|
|
819
|
+
InputComp: mt,
|
|
784
820
|
valueType: "cascader",
|
|
785
821
|
name: "PFormCascader"
|
|
786
|
-
}),
|
|
822
|
+
}), We = p({
|
|
787
823
|
props: {
|
|
788
|
-
...
|
|
824
|
+
...y(Y.props, "label", "prop"),
|
|
789
825
|
title: {
|
|
790
826
|
type: String
|
|
791
827
|
},
|
|
@@ -802,118 +838,195 @@ const fe = () => ({
|
|
|
802
838
|
setup: (e, {
|
|
803
839
|
slots: t
|
|
804
840
|
}) => {
|
|
805
|
-
const
|
|
806
|
-
row:
|
|
807
|
-
column:
|
|
808
|
-
$index:
|
|
841
|
+
const u = ({
|
|
842
|
+
row: r,
|
|
843
|
+
column: a,
|
|
844
|
+
$index: m
|
|
809
845
|
}) => {
|
|
810
|
-
var
|
|
811
|
-
const l =
|
|
812
|
-
...
|
|
813
|
-
title:
|
|
814
|
-
dataIndex:
|
|
815
|
-
},
|
|
816
|
-
value:
|
|
817
|
-
text:
|
|
846
|
+
var f;
|
|
847
|
+
const l = r, h = m, P = {
|
|
848
|
+
...a,
|
|
849
|
+
title: a.label,
|
|
850
|
+
dataIndex: a.property
|
|
851
|
+
}, v = B(r, P.dataIndex), K = {
|
|
852
|
+
value: v,
|
|
853
|
+
text: v,
|
|
818
854
|
record: l,
|
|
819
|
-
column:
|
|
820
|
-
index:
|
|
821
|
-
},
|
|
822
|
-
return
|
|
823
|
-
},
|
|
855
|
+
column: P,
|
|
856
|
+
index: h
|
|
857
|
+
}, d = (f = t.bodyCell) == null ? void 0 : f.call(t, K);
|
|
858
|
+
return d || (e.customRender ? e.customRender(K) : v);
|
|
859
|
+
}, o = {
|
|
824
860
|
header: ({
|
|
825
|
-
column:
|
|
826
|
-
$index:
|
|
861
|
+
column: r,
|
|
862
|
+
$index: a
|
|
827
863
|
}) => {
|
|
828
|
-
var
|
|
829
|
-
const
|
|
830
|
-
...
|
|
864
|
+
var v;
|
|
865
|
+
const m = a, l = r.label, h = {
|
|
866
|
+
...r,
|
|
831
867
|
title: l,
|
|
832
|
-
dataIndex:
|
|
868
|
+
dataIndex: r.property
|
|
833
869
|
};
|
|
834
|
-
return ((
|
|
870
|
+
return ((v = t.headerCell) == null ? void 0 : v.call(t, {
|
|
835
871
|
title: l,
|
|
836
|
-
column:
|
|
837
|
-
index:
|
|
872
|
+
column: h,
|
|
873
|
+
index: m
|
|
838
874
|
})) || l;
|
|
839
875
|
}
|
|
840
876
|
};
|
|
841
|
-
return (!e.children ||
|
|
877
|
+
return (!e.children || L(e.children) <= 0) && (o.default = u), () => c(Y, g(y(e, "title", "dataIndex", "prop", "customRender", "children"), {
|
|
842
878
|
prop: e.dataIndex,
|
|
843
879
|
label: e.title
|
|
844
880
|
}), {
|
|
845
|
-
default: () => [
|
|
846
|
-
key:
|
|
847
|
-
},
|
|
848
|
-
...
|
|
881
|
+
default: () => [L(e.children) > 0 && R(e.children, (r) => c(We, g({
|
|
882
|
+
key: r.dataIndex
|
|
883
|
+
}, r), t))],
|
|
884
|
+
...o
|
|
849
885
|
});
|
|
850
886
|
}
|
|
851
|
-
}),
|
|
887
|
+
}), Qt = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Xt = () => ({
|
|
888
|
+
columns: {
|
|
889
|
+
type: Array
|
|
890
|
+
},
|
|
891
|
+
dataSource: {
|
|
892
|
+
type: Array
|
|
893
|
+
},
|
|
894
|
+
loading: {
|
|
895
|
+
type: Boolean
|
|
896
|
+
},
|
|
897
|
+
mergeOpts: {
|
|
898
|
+
type: Object
|
|
899
|
+
},
|
|
900
|
+
selectedRowKeys: {
|
|
901
|
+
type: Array
|
|
902
|
+
},
|
|
903
|
+
rowSelection: {
|
|
904
|
+
type: Object,
|
|
905
|
+
default: void 0
|
|
906
|
+
}
|
|
907
|
+
}), Ze = p({
|
|
852
908
|
props: {
|
|
853
|
-
...
|
|
854
|
-
|
|
855
|
-
type: Array
|
|
856
|
-
},
|
|
857
|
-
dataSource: {
|
|
858
|
-
type: Array
|
|
859
|
-
},
|
|
860
|
-
loading: {
|
|
861
|
-
type: Boolean
|
|
862
|
-
},
|
|
863
|
-
mergeOpts: {
|
|
864
|
-
type: Object
|
|
865
|
-
}
|
|
909
|
+
...he.props,
|
|
910
|
+
...Xt()
|
|
866
911
|
},
|
|
867
912
|
setup: (e, {
|
|
868
913
|
slots: t,
|
|
869
|
-
expose:
|
|
914
|
+
expose: u,
|
|
915
|
+
emit: n
|
|
870
916
|
}) => {
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
|
|
917
|
+
const o = T(), r = Ue("table");
|
|
918
|
+
u(Ie(Qt, o));
|
|
919
|
+
const a = (d) => {
|
|
920
|
+
const f = e.rowKey;
|
|
921
|
+
return kt(f) ? f(d) : f ? d[f] : d.id;
|
|
922
|
+
}, m = N(() => {
|
|
923
|
+
const d = e.rowSelection;
|
|
924
|
+
return d ? !d.type || d.type === "multi" : !1;
|
|
925
|
+
}), l = (d) => {
|
|
926
|
+
var k, S;
|
|
927
|
+
const f = d ? [a(d)] : [];
|
|
928
|
+
pe(e.selectedRowKeys, f, {
|
|
929
|
+
sort: !0
|
|
930
|
+
}) || ((S = (k = e.rowSelection).onChange) == null || S.call(k, f, d ? [d] : []), n("update:selectedRowKeys", f));
|
|
931
|
+
}, h = (d) => {
|
|
932
|
+
var k, S;
|
|
933
|
+
const f = R(d, (x) => a(x));
|
|
934
|
+
pe(e.selectedRowKeys, f, {
|
|
935
|
+
sort: !0
|
|
936
|
+
}) || ((S = (k = e.rowSelection).onChange) == null || S.call(k, f, d), n("update:selectedRowKeys", f));
|
|
937
|
+
}, P = N(() => {
|
|
938
|
+
if (!!e.rowSelection)
|
|
939
|
+
return m.value ? {
|
|
940
|
+
onSelectionChange: h
|
|
941
|
+
} : {
|
|
942
|
+
highlightCurrentRow: !0,
|
|
943
|
+
onCurrentChange: l
|
|
944
|
+
};
|
|
945
|
+
});
|
|
946
|
+
G(() => {
|
|
947
|
+
var f, k;
|
|
948
|
+
const d = e.dataSource || e.data;
|
|
949
|
+
if (m.value) {
|
|
950
|
+
const S = e.selectedRowKeys, x = Ce(S, (i, s) => ({
|
|
951
|
+
...i,
|
|
952
|
+
[s]: !0
|
|
953
|
+
}), {}), F = (f = o.value) == null ? void 0 : f.getSelectionRows(), I = Ce(F, (i, s) => ({
|
|
954
|
+
...i,
|
|
955
|
+
[a(s)]: !0
|
|
956
|
+
}), {});
|
|
957
|
+
let V = !1;
|
|
958
|
+
if (L(S) !== L(F))
|
|
959
|
+
V = !0;
|
|
960
|
+
else if (L(S) !== 0)
|
|
961
|
+
for (let i = 0; i < S.length; i++) {
|
|
962
|
+
const s = S[i];
|
|
963
|
+
if (!I[s]) {
|
|
964
|
+
V = !0;
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
V && Pe(() => {
|
|
969
|
+
Ct(d, (i) => {
|
|
970
|
+
var C;
|
|
971
|
+
const s = a(i);
|
|
972
|
+
x[s] !== I[s] && ((C = o.value) == null || C.toggleRowSelection(i, !!x[s]));
|
|
973
|
+
});
|
|
974
|
+
});
|
|
975
|
+
} else {
|
|
976
|
+
const S = (k = e.selectedRowKeys) == null ? void 0 : k[0];
|
|
977
|
+
let x = null;
|
|
978
|
+
S && (x = pt(d, (F) => a(F) === S)), Pe(() => {
|
|
979
|
+
var F;
|
|
980
|
+
(F = o.value) == null || F.setCurrentRow(x);
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
}, [() => e.selectedRowKeys, () => e.dataSource, () => e.data]);
|
|
984
|
+
const v = () => {
|
|
985
|
+
var d, f;
|
|
875
986
|
if (e.spanMethod)
|
|
876
987
|
return e.spanMethod;
|
|
877
|
-
if (((d = e.mergeOpts) == null ? void 0 : d.rowNames) || ((
|
|
878
|
-
const
|
|
988
|
+
if (((d = e.mergeOpts) == null ? void 0 : d.rowNames) || ((f = e.mergeOpts) == null ? void 0 : f.colNames)) {
|
|
989
|
+
const k = Tt(e.mergeOpts);
|
|
879
990
|
return ({
|
|
880
|
-
row:
|
|
881
|
-
column:
|
|
991
|
+
row: S,
|
|
992
|
+
column: x
|
|
882
993
|
}) => {
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
885
|
-
const
|
|
994
|
+
const F = x.property;
|
|
995
|
+
if (k[F]) {
|
|
996
|
+
const I = S[k[F]], V = S[F + "-colspan"];
|
|
886
997
|
return {
|
|
887
|
-
rowspan:
|
|
888
|
-
colspan:
|
|
998
|
+
rowspan: I !== void 0 ? I : 1,
|
|
999
|
+
colspan: V !== void 0 ? V : 1
|
|
889
1000
|
};
|
|
890
1001
|
}
|
|
891
1002
|
};
|
|
892
1003
|
}
|
|
893
1004
|
return e.spanMethod;
|
|
894
|
-
},
|
|
895
|
-
return () => c(
|
|
896
|
-
ref:
|
|
897
|
-
id:
|
|
898
|
-
},
|
|
1005
|
+
}, K = N(() => v());
|
|
1006
|
+
return () => c(he, g({
|
|
1007
|
+
ref: o,
|
|
1008
|
+
id: r
|
|
1009
|
+
}, y(e, "columns", "dataSource", "data", "loading", "spanMethod"), {
|
|
899
1010
|
data: e.dataSource || e.data,
|
|
900
|
-
spanMethod:
|
|
901
|
-
}), {
|
|
1011
|
+
spanMethod: K.value
|
|
1012
|
+
}, P.value), {
|
|
902
1013
|
default: () => {
|
|
903
|
-
var d,
|
|
904
|
-
return [(d = t.start) == null ? void 0 : d.call(t),
|
|
905
|
-
|
|
906
|
-
}, f),
|
|
907
|
-
|
|
1014
|
+
var d, f, k, S, x;
|
|
1015
|
+
return [(d = t.start) == null ? void 0 : d.call(t), m.value && c(Y, g({
|
|
1016
|
+
type: "selection"
|
|
1017
|
+
}, y((f = e.rowSelection) == null ? void 0 : f.column, "slots")), (S = (k = e.rowSelection) == null ? void 0 : k.column) == null ? void 0 : S.slots), R(e.columns, (F) => c(We, g({
|
|
1018
|
+
key: F.dataIndex
|
|
1019
|
+
}, F), t)), (x = t.default) == null ? void 0 : x.call(t), e.loading && c(De, {
|
|
1020
|
+
target: r,
|
|
908
1021
|
loading: !0
|
|
909
1022
|
}, null)];
|
|
910
1023
|
},
|
|
911
|
-
...
|
|
1024
|
+
..._(t, "append", "empty")
|
|
912
1025
|
});
|
|
913
1026
|
}
|
|
914
|
-
}),
|
|
1027
|
+
}), Yt = p({
|
|
915
1028
|
props: {
|
|
916
|
-
...
|
|
1029
|
+
...U.props,
|
|
917
1030
|
type: {
|
|
918
1031
|
type: String,
|
|
919
1032
|
default: "primary"
|
|
@@ -925,125 +1038,132 @@ const fe = () => ({
|
|
|
925
1038
|
},
|
|
926
1039
|
setup: (e, {
|
|
927
1040
|
slots: t
|
|
928
|
-
}) => () => c(
|
|
1041
|
+
}) => () => c(U, e, t)
|
|
929
1042
|
});
|
|
930
|
-
|
|
931
|
-
...
|
|
932
|
-
...
|
|
933
|
-
formMethods: { type: Array, default:
|
|
934
|
-
};
|
|
935
|
-
L.props = {
|
|
936
|
-
...R.props,
|
|
937
|
-
...L.props,
|
|
938
|
-
inline: { type: Boolean, default: !0 }
|
|
1043
|
+
O.props = {
|
|
1044
|
+
...X.props,
|
|
1045
|
+
...O.props,
|
|
1046
|
+
formMethods: { type: Array, default: Oe }
|
|
939
1047
|
};
|
|
940
1048
|
Z.props = {
|
|
941
|
-
...
|
|
942
|
-
...Z.props
|
|
943
|
-
}
|
|
944
|
-
O.props = {
|
|
945
|
-
...Ne.props,
|
|
946
|
-
...O.props
|
|
1049
|
+
...O.props,
|
|
1050
|
+
...Z.props,
|
|
1051
|
+
inline: { type: Boolean, default: !0 }
|
|
947
1052
|
};
|
|
948
|
-
|
|
949
|
-
...
|
|
950
|
-
...
|
|
1053
|
+
te.props = {
|
|
1054
|
+
...Q.props,
|
|
1055
|
+
...te.props
|
|
951
1056
|
};
|
|
952
1057
|
H.props = {
|
|
953
|
-
...
|
|
1058
|
+
...Ze.props,
|
|
954
1059
|
...H.props
|
|
955
1060
|
};
|
|
956
1061
|
J.props = {
|
|
957
|
-
...
|
|
1062
|
+
...Ne.props,
|
|
958
1063
|
...J.props
|
|
959
1064
|
};
|
|
960
|
-
|
|
961
|
-
...
|
|
962
|
-
...
|
|
1065
|
+
ne.props = {
|
|
1066
|
+
...J.props,
|
|
1067
|
+
...ne.props
|
|
963
1068
|
};
|
|
964
|
-
|
|
965
|
-
...
|
|
966
|
-
...
|
|
1069
|
+
ae.props = {
|
|
1070
|
+
...O.props,
|
|
1071
|
+
...ae.props
|
|
1072
|
+
};
|
|
1073
|
+
le.props = {
|
|
1074
|
+
...je.props,
|
|
1075
|
+
...le.props
|
|
1076
|
+
};
|
|
1077
|
+
re.props = {
|
|
1078
|
+
...Ge.props,
|
|
1079
|
+
...re.props,
|
|
967
1080
|
modelValue: String
|
|
968
1081
|
};
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
[
|
|
976
|
-
[
|
|
977
|
-
[
|
|
978
|
-
[
|
|
979
|
-
[
|
|
980
|
-
[
|
|
981
|
-
[
|
|
982
|
-
[
|
|
983
|
-
[
|
|
984
|
-
[
|
|
985
|
-
[
|
|
986
|
-
[
|
|
987
|
-
[
|
|
988
|
-
[
|
|
989
|
-
[
|
|
990
|
-
[
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1082
|
+
oe.props = {
|
|
1083
|
+
...Le.props,
|
|
1084
|
+
...oe.props,
|
|
1085
|
+
placement: { type: String, default: "top-start" }
|
|
1086
|
+
};
|
|
1087
|
+
const on = {
|
|
1088
|
+
[b.LoadingKey]: De,
|
|
1089
|
+
[b.RowKey]: yt,
|
|
1090
|
+
[b.ColKey]: st,
|
|
1091
|
+
[b.ButtonKey]: U,
|
|
1092
|
+
[b.DescriptionsKey]: Ne,
|
|
1093
|
+
[b.DescriptionsItemKey]: gt,
|
|
1094
|
+
[b.MenusKey]: Lt,
|
|
1095
|
+
[b.ModalKey]: je,
|
|
1096
|
+
[b.PaginationKey]: wt,
|
|
1097
|
+
[b.PopoverKey]: It,
|
|
1098
|
+
[b.TooltipKey]: Le,
|
|
1099
|
+
[b.CheckboxKey]: Be,
|
|
1100
|
+
[b.FormKey]: Rt,
|
|
1101
|
+
[b.FormItemKey]: ze,
|
|
1102
|
+
[b.TableKey]: Ze,
|
|
1103
|
+
[b.TableOperateKey]: Yt,
|
|
1104
|
+
[b.UploaderKey]: Ge,
|
|
1105
|
+
[b.ProFormKey]: O,
|
|
1106
|
+
[b.ProSearchFormKey]: Z,
|
|
1107
|
+
[b.ProTableKey]: H,
|
|
1108
|
+
[b.ProCurdKey]: Qe,
|
|
1109
|
+
[b.ProListKey]: Xe,
|
|
1110
|
+
[b.ProPageKey]: Ye,
|
|
1111
|
+
text: ue,
|
|
1112
|
+
digit: _e,
|
|
1113
|
+
date: et,
|
|
1114
|
+
time: ue,
|
|
1115
|
+
select: W,
|
|
1116
|
+
radio: W,
|
|
1117
|
+
checkbox: W,
|
|
1118
|
+
treeSelect: ce,
|
|
1119
|
+
cascader: ce
|
|
1120
|
+
}, un = {
|
|
1121
|
+
text: Ot,
|
|
1122
|
+
digit: Ut,
|
|
1123
|
+
digitRange: Dt,
|
|
1124
|
+
date: jt,
|
|
1125
|
+
time: qt,
|
|
1126
|
+
select: $t,
|
|
1127
|
+
treeSelect: Gt,
|
|
1128
|
+
checkbox: Wt,
|
|
1129
|
+
radio: Zt,
|
|
1130
|
+
switch: Ht,
|
|
1131
|
+
cascader: Jt
|
|
1012
1132
|
};
|
|
1013
1133
|
export {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1134
|
+
Oe as FormMethods,
|
|
1135
|
+
zt as InputNumberRange,
|
|
1136
|
+
Vt as ProCheckbox,
|
|
1137
|
+
Rt as ProForm,
|
|
1138
|
+
Jt as ProFormCascader,
|
|
1139
|
+
Wt as ProFormCheckbox,
|
|
1140
|
+
jt as ProFormDatePicker,
|
|
1141
|
+
Dt as ProFormInputNumberRange,
|
|
1142
|
+
ze as ProFormItem,
|
|
1143
|
+
Zt as ProFormRadio,
|
|
1144
|
+
$t as ProFormSelect,
|
|
1145
|
+
Ht as ProFormSwitch,
|
|
1146
|
+
Ot as ProFormText,
|
|
1147
|
+
Ut as ProFormTextNumber,
|
|
1148
|
+
qt as ProFormTimePicker,
|
|
1149
|
+
Gt as ProFormTreeSelect,
|
|
1150
|
+
De as ProLoading,
|
|
1151
|
+
Lt as ProMenus,
|
|
1152
|
+
je as ProModal,
|
|
1153
|
+
wt as ProPagination,
|
|
1154
|
+
It as ProPopover,
|
|
1155
|
+
Bt as ProRadio,
|
|
1156
|
+
Nt as ProSelect,
|
|
1157
|
+
Ze as ProTable,
|
|
1158
|
+
We as ProTableColumn,
|
|
1159
|
+
Yt as ProTableOperateItem,
|
|
1160
|
+
ln as ProTabs,
|
|
1161
|
+
rn as ProTree,
|
|
1162
|
+
Ge as ProUploader,
|
|
1163
|
+
Qt as TableMethods,
|
|
1164
|
+
At as UploadMethods,
|
|
1165
|
+
M as createFormItemComponent,
|
|
1166
|
+
Ue as createLoadingId,
|
|
1167
|
+
on as elementMap,
|
|
1168
|
+
un as formElementMap
|
|
1049
1169
|
};
|