@vue-start/element-pro 0.2.6 → 0.2.8
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/dist/index.d.ts +802 -578
- package/dist/index.es.js +395 -337
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,153 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useEffect as
|
|
6
|
-
const
|
|
7
|
-
loading: {
|
|
8
|
-
type: Boolean
|
|
9
|
-
},
|
|
10
|
-
target: {
|
|
11
|
-
type: [String, Object]
|
|
12
|
-
},
|
|
13
|
-
body: {
|
|
14
|
-
type: Boolean
|
|
15
|
-
},
|
|
16
|
-
fullscreen: {
|
|
17
|
-
type: Boolean
|
|
18
|
-
},
|
|
19
|
-
lock: {
|
|
20
|
-
type: Boolean
|
|
21
|
-
},
|
|
22
|
-
text: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
spinner: {
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
background: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
customClass: {
|
|
32
|
-
type: String
|
|
33
|
-
}
|
|
34
|
-
}), Ie = c({
|
|
35
|
-
props: {
|
|
36
|
-
...Ee()
|
|
37
|
-
},
|
|
38
|
-
setup: (e, {
|
|
39
|
-
slots: t
|
|
40
|
-
}) => {
|
|
41
|
-
const o = M();
|
|
42
|
-
return j(() => {
|
|
43
|
-
if (!e.loading)
|
|
44
|
-
return;
|
|
45
|
-
let n = e.target;
|
|
46
|
-
if (t.default ? n = document.getElementById(o) : e.target && ce(e.target) && (n = document.querySelector("#" + e.target)), !n)
|
|
47
|
-
return;
|
|
48
|
-
const r = J.service({
|
|
49
|
-
target: n,
|
|
50
|
-
body: e.body,
|
|
51
|
-
fullscreen: e.fullscreen,
|
|
52
|
-
lock: e.lock,
|
|
53
|
-
text: e.text,
|
|
54
|
-
spinner: e.spinner,
|
|
55
|
-
background: e.background,
|
|
56
|
-
customClass: e.customClass
|
|
57
|
-
});
|
|
58
|
-
return () => {
|
|
59
|
-
r && r.close();
|
|
60
|
-
};
|
|
61
|
-
}, () => e.loading), () => t.default ? a("div", {
|
|
62
|
-
id: o
|
|
63
|
-
}, [t.default()]) : null;
|
|
64
|
-
}
|
|
65
|
-
}), h = () => ({
|
|
1
|
+
import { createExpose as $, createFormItemCompFn as Q, createExposeObj as k, ProForm as P, ProSearchForm as F, ProFormList as h, ProTable as T, ProDesc as b, ProCurdDesc as x, ProCurdForm as E, ProCurdModal as I } from "@vue-start/pro";
|
|
2
|
+
import { ElFormItem as v, ElForm as C, ElSelect as R, ElOption as X, ElRadioGroup as B, ElRadioButton as Y, ElRadio as Z, ElCheckboxGroup as V, ElCheckbox as ee, ElInput as te, ElInputNumber as oe, ElDatePicker as ae, ElTimePicker as re, ElTreeSelect as ne, ElSwitch as le, ElCascader as ue, ElLoading as de, ElDialog as z, ElButton as A, ElPagination as M, ElPopover as O, ElTableColumn as w, ElTable as L, ElDescriptions as ce } from "element-plus";
|
|
3
|
+
import { defineComponent as m, createVNode as d, mergeProps as c, reactive as ie, ref as f, toRaw as pe, isVNode as N } from "vue";
|
|
4
|
+
import { keys as g, omit as i, isBoolean as G, map as y, isString as me, debounce as se, size as fe, pick as ge } from "lodash";
|
|
5
|
+
import { useEffect as H, generateId as ye, useWatch as S } from "@vue-start/hooks";
|
|
6
|
+
const D = () => ({
|
|
66
7
|
name: {
|
|
67
8
|
type: [String, Array]
|
|
68
9
|
}
|
|
69
|
-
}),
|
|
10
|
+
}), Pe = m({
|
|
70
11
|
props: {
|
|
71
|
-
...
|
|
72
|
-
...
|
|
12
|
+
...v.props,
|
|
13
|
+
...D()
|
|
73
14
|
},
|
|
74
15
|
setup: (e, {
|
|
75
16
|
slots: t
|
|
76
17
|
}) => {
|
|
77
|
-
const
|
|
78
|
-
return () =>
|
|
18
|
+
const a = g(D());
|
|
19
|
+
return () => d(v, c(i(e, ...a, "name", "prop"), {
|
|
79
20
|
prop: e.prop || e.name
|
|
80
21
|
}), t);
|
|
81
22
|
}
|
|
82
|
-
}),
|
|
23
|
+
}), W = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], Ve = m({
|
|
83
24
|
props: {
|
|
84
|
-
...
|
|
25
|
+
...C.props,
|
|
26
|
+
hideRequiredMark: {
|
|
27
|
+
type: [Boolean, Object],
|
|
28
|
+
default: void 0
|
|
29
|
+
}
|
|
85
30
|
},
|
|
86
31
|
setup: (e, {
|
|
87
32
|
slots: t,
|
|
88
|
-
emit:
|
|
89
|
-
expose:
|
|
33
|
+
emit: a,
|
|
34
|
+
expose: r
|
|
90
35
|
}) => {
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
!
|
|
94
|
-
var
|
|
95
|
-
(
|
|
96
|
-
|
|
36
|
+
const n = e.model || ie({}), u = f();
|
|
37
|
+
return H(() => {
|
|
38
|
+
!u.value || (u.value.submit = () => {
|
|
39
|
+
var o;
|
|
40
|
+
(o = u.value) == null || o.validate((l, p) => {
|
|
41
|
+
l ? a("finish", pe(n)) : a("finishFailed", p);
|
|
97
42
|
});
|
|
98
43
|
});
|
|
99
|
-
}, []),
|
|
100
|
-
ref:
|
|
101
|
-
},
|
|
102
|
-
|
|
44
|
+
}, []), r($(W, u)), () => d(C, c({
|
|
45
|
+
ref: u
|
|
46
|
+
}, i(e, "model"), {
|
|
47
|
+
hideRequiredAsterisk: G(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
|
|
48
|
+
model: n
|
|
103
49
|
}), t);
|
|
104
50
|
}
|
|
105
|
-
}),
|
|
106
|
-
needRules: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: !1
|
|
109
|
-
},
|
|
110
|
-
inline: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: !0
|
|
113
|
-
}
|
|
114
|
-
}, b), m = pe(z, (e, t, o) => ({
|
|
51
|
+
}), s = Q(Pe, (e, t, a) => ({
|
|
115
52
|
modelValue: e,
|
|
116
53
|
"onUpdate:modelValue": t,
|
|
117
54
|
clearable: !0,
|
|
118
|
-
disabled:
|
|
119
|
-
})),
|
|
55
|
+
disabled: a
|
|
56
|
+
})), U = () => ({
|
|
120
57
|
options: Array
|
|
121
|
-
}),
|
|
58
|
+
}), be = m({
|
|
122
59
|
name: "PSelect",
|
|
123
60
|
props: {
|
|
124
|
-
...
|
|
125
|
-
...
|
|
61
|
+
...R.props,
|
|
62
|
+
...U()
|
|
126
63
|
},
|
|
127
64
|
setup: (e, {
|
|
128
65
|
slots: t,
|
|
129
|
-
emit:
|
|
66
|
+
emit: a,
|
|
67
|
+
expose: r
|
|
130
68
|
}) => {
|
|
131
|
-
const n =
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
69
|
+
const n = f();
|
|
70
|
+
r(k(n));
|
|
71
|
+
const u = g(U());
|
|
72
|
+
return () => d(R, c({
|
|
73
|
+
ref: n
|
|
74
|
+
}, i(e, u), {
|
|
75
|
+
"onUpdate:modelValue": (o) => {
|
|
76
|
+
a("update:modelValue", o || void 0);
|
|
135
77
|
}
|
|
136
78
|
}), {
|
|
137
79
|
default: () => {
|
|
138
|
-
var
|
|
139
|
-
return [
|
|
140
|
-
key:
|
|
141
|
-
},
|
|
80
|
+
var o, l;
|
|
81
|
+
return [(o = t.start) == null ? void 0 : o.call(t), y(e.options, (p) => d(X, c({
|
|
82
|
+
key: p.value
|
|
83
|
+
}, p), null)), (l = t.default) == null ? void 0 : l.call(t)];
|
|
142
84
|
},
|
|
143
|
-
...
|
|
85
|
+
...i(t, "default")
|
|
144
86
|
});
|
|
145
87
|
}
|
|
146
|
-
})
|
|
147
|
-
function he(e) {
|
|
148
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !S(e);
|
|
149
|
-
}
|
|
150
|
-
const D = () => ({
|
|
88
|
+
}), j = () => ({
|
|
151
89
|
options: {
|
|
152
90
|
type: Array
|
|
153
91
|
},
|
|
@@ -155,134 +93,310 @@ const D = () => ({
|
|
|
155
93
|
type: String,
|
|
156
94
|
default: "default"
|
|
157
95
|
}
|
|
158
|
-
}),
|
|
96
|
+
}), ve = m({
|
|
159
97
|
props: {
|
|
160
|
-
...
|
|
161
|
-
...
|
|
98
|
+
...B.props,
|
|
99
|
+
...j()
|
|
162
100
|
},
|
|
163
101
|
setup: (e, {
|
|
164
|
-
|
|
102
|
+
slots: t,
|
|
103
|
+
emit: a,
|
|
104
|
+
expose: r
|
|
165
105
|
}) => {
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
106
|
+
const n = f();
|
|
107
|
+
r(k(n));
|
|
108
|
+
const u = g(j());
|
|
109
|
+
return () => d(B, c({
|
|
110
|
+
ref: n
|
|
111
|
+
}, i(e, u), {
|
|
112
|
+
"onUpdate:modelValue": (o) => {
|
|
113
|
+
a("update:modelValue", o);
|
|
114
|
+
}
|
|
115
|
+
}), {
|
|
116
|
+
default: () => [y(e.options, (o) => e.buttonStyle === "button" ? d(Y, c({
|
|
117
|
+
key: o.value
|
|
118
|
+
}, o, {
|
|
119
|
+
label: o.value
|
|
177
120
|
}), {
|
|
178
|
-
default: () => [
|
|
179
|
-
}) :
|
|
180
|
-
key:
|
|
181
|
-
},
|
|
182
|
-
label:
|
|
121
|
+
default: () => [o.label]
|
|
122
|
+
}) : d(Z, c({
|
|
123
|
+
key: o.value
|
|
124
|
+
}, o, {
|
|
125
|
+
label: o.value
|
|
183
126
|
}), {
|
|
184
|
-
default: () => [
|
|
185
|
-
}))
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
127
|
+
default: () => [o.label]
|
|
128
|
+
}))],
|
|
129
|
+
...t
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}), q = () => ({
|
|
133
|
+
options: Array
|
|
134
|
+
}), Ce = m({
|
|
135
|
+
props: {
|
|
136
|
+
...V.props,
|
|
137
|
+
...q()
|
|
138
|
+
},
|
|
139
|
+
setup: (e, {
|
|
140
|
+
slots: t,
|
|
141
|
+
emit: a,
|
|
142
|
+
expose: r
|
|
143
|
+
}) => {
|
|
144
|
+
const n = f();
|
|
145
|
+
r(k(n));
|
|
146
|
+
const u = g(q());
|
|
147
|
+
return () => d(V, c({
|
|
148
|
+
ref: n
|
|
149
|
+
}, i(e, u), {
|
|
150
|
+
"onUpdate:modelValue": (o) => {
|
|
151
|
+
a("update:modelValue", o || void 0);
|
|
152
|
+
}
|
|
153
|
+
}), {
|
|
154
|
+
default: () => {
|
|
155
|
+
var o, l;
|
|
156
|
+
return [(o = t.start) == null ? void 0 : o.call(t), y(e.options, (p) => d(ee, c(p, {
|
|
157
|
+
label: p.value
|
|
158
|
+
}), {
|
|
159
|
+
default: () => [p.label]
|
|
160
|
+
})), (l = t.default) == null ? void 0 : l.call(t)];
|
|
161
|
+
},
|
|
162
|
+
...i(t, "default")
|
|
163
|
+
});
|
|
189
164
|
}
|
|
190
|
-
}),
|
|
191
|
-
InputComp:
|
|
165
|
+
}), ze = s({
|
|
166
|
+
InputComp: te,
|
|
192
167
|
valueType: "text",
|
|
193
168
|
name: "PFromText"
|
|
194
|
-
}),
|
|
195
|
-
InputComp:
|
|
169
|
+
}), Ae = s({
|
|
170
|
+
InputComp: oe,
|
|
196
171
|
valueType: "digit",
|
|
197
172
|
name: "PFormNumber"
|
|
198
|
-
}),
|
|
199
|
-
InputComp:
|
|
173
|
+
}), Me = s({
|
|
174
|
+
InputComp: ae,
|
|
200
175
|
valueType: "date",
|
|
201
176
|
name: "PFormDate"
|
|
202
|
-
}),
|
|
203
|
-
InputComp:
|
|
177
|
+
}), Oe = s({
|
|
178
|
+
InputComp: re,
|
|
204
179
|
valueType: "time",
|
|
205
180
|
name: "PFormTime"
|
|
206
|
-
}),
|
|
207
|
-
InputComp:
|
|
181
|
+
}), we = s({
|
|
182
|
+
InputComp: be,
|
|
208
183
|
valueType: "select",
|
|
209
184
|
name: "PFormSelect"
|
|
210
|
-
}),
|
|
211
|
-
InputComp:
|
|
185
|
+
}), Le = s({
|
|
186
|
+
InputComp: ne,
|
|
212
187
|
valueType: "treeSelect",
|
|
213
188
|
name: "PFormTreeSelect"
|
|
214
|
-
}),
|
|
215
|
-
InputComp:
|
|
189
|
+
}), Ne = s({
|
|
190
|
+
InputComp: Ce,
|
|
216
191
|
valueType: "checkbox",
|
|
217
192
|
name: "PFromCheckbox"
|
|
218
|
-
}),
|
|
219
|
-
InputComp:
|
|
193
|
+
}), De = s({
|
|
194
|
+
InputComp: ve,
|
|
220
195
|
valueType: "radio",
|
|
221
196
|
name: "PFromRadio"
|
|
222
|
-
}),
|
|
223
|
-
InputComp:
|
|
197
|
+
}), Ue = s({
|
|
198
|
+
InputComp: le,
|
|
224
199
|
valueType: "switch",
|
|
225
200
|
name: "PFromSwitch"
|
|
226
|
-
}),
|
|
227
|
-
InputComp:
|
|
201
|
+
}), je = s({
|
|
202
|
+
InputComp: ue,
|
|
228
203
|
valueType: "cascader",
|
|
229
204
|
name: "PFormCascader"
|
|
230
|
-
}),
|
|
205
|
+
}), _ = (e = "comp") => e + "-" + ye(), Se = () => ({
|
|
206
|
+
loading: {
|
|
207
|
+
type: Boolean
|
|
208
|
+
},
|
|
209
|
+
target: {
|
|
210
|
+
type: [String, Object]
|
|
211
|
+
},
|
|
212
|
+
body: {
|
|
213
|
+
type: Boolean
|
|
214
|
+
},
|
|
215
|
+
fullscreen: {
|
|
216
|
+
type: Boolean
|
|
217
|
+
},
|
|
218
|
+
lock: {
|
|
219
|
+
type: Boolean
|
|
220
|
+
},
|
|
221
|
+
text: {
|
|
222
|
+
type: String
|
|
223
|
+
},
|
|
224
|
+
spinner: {
|
|
225
|
+
type: String
|
|
226
|
+
},
|
|
227
|
+
background: {
|
|
228
|
+
type: String
|
|
229
|
+
},
|
|
230
|
+
customClass: {
|
|
231
|
+
type: String
|
|
232
|
+
}
|
|
233
|
+
}), ke = m({
|
|
231
234
|
props: {
|
|
232
|
-
...
|
|
235
|
+
...Se()
|
|
233
236
|
},
|
|
234
237
|
setup: (e, {
|
|
235
|
-
slots: t
|
|
236
|
-
emit: o
|
|
238
|
+
slots: t
|
|
237
239
|
}) => {
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
const a = _();
|
|
241
|
+
return H(() => {
|
|
242
|
+
if (!e.loading)
|
|
243
|
+
return;
|
|
244
|
+
let r = e.target;
|
|
245
|
+
if (t.default ? r = document.getElementById(a) : e.target && me(e.target) && (r = document.querySelector("#" + e.target)), !r)
|
|
246
|
+
return;
|
|
247
|
+
const n = de.service({
|
|
248
|
+
target: r,
|
|
249
|
+
body: e.body,
|
|
250
|
+
fullscreen: e.fullscreen,
|
|
251
|
+
lock: e.lock,
|
|
252
|
+
text: e.text,
|
|
253
|
+
spinner: e.spinner,
|
|
254
|
+
background: e.background,
|
|
255
|
+
customClass: e.customClass
|
|
256
|
+
});
|
|
257
|
+
return () => {
|
|
258
|
+
n && n.close();
|
|
259
|
+
};
|
|
260
|
+
}, () => e.loading), () => t.default ? d("div", {
|
|
261
|
+
id: a
|
|
262
|
+
}, [t.default()]) : null;
|
|
247
263
|
}
|
|
248
|
-
}),
|
|
249
|
-
|
|
264
|
+
}), K = () => ({
|
|
265
|
+
clsName: {
|
|
250
266
|
type: String,
|
|
251
|
-
default: "
|
|
267
|
+
default: "pro-modal"
|
|
252
268
|
},
|
|
253
|
-
|
|
269
|
+
visible: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: !1
|
|
272
|
+
},
|
|
273
|
+
cancelText: {
|
|
274
|
+
type: String,
|
|
275
|
+
default: "\u53D6\u6D88"
|
|
276
|
+
},
|
|
277
|
+
cancelButtonProps: {
|
|
254
278
|
type: Object
|
|
255
279
|
},
|
|
256
|
-
|
|
280
|
+
okText: {
|
|
257
281
|
type: String,
|
|
258
|
-
default: "\
|
|
282
|
+
default: "\u786E\u8BA4"
|
|
259
283
|
},
|
|
260
|
-
|
|
284
|
+
okButtonProps: {
|
|
261
285
|
type: Object
|
|
286
|
+
},
|
|
287
|
+
confirmLoading: Boolean,
|
|
288
|
+
footer: {
|
|
289
|
+
type: Boolean,
|
|
290
|
+
default: !0
|
|
291
|
+
},
|
|
292
|
+
maskClosable: {
|
|
293
|
+
type: [Object, Boolean],
|
|
294
|
+
default: void 0
|
|
262
295
|
}
|
|
263
|
-
}),
|
|
264
|
-
name: "PFormList",
|
|
296
|
+
}), Fe = m({
|
|
265
297
|
props: {
|
|
266
|
-
...
|
|
267
|
-
...
|
|
298
|
+
...z.props,
|
|
299
|
+
...K()
|
|
268
300
|
},
|
|
269
301
|
setup: (e, {
|
|
270
|
-
slots: t
|
|
302
|
+
slots: t,
|
|
303
|
+
emit: a
|
|
271
304
|
}) => {
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
305
|
+
const r = f(e.visible);
|
|
306
|
+
S(() => {
|
|
307
|
+
r.value !== e.visible && (r.value = e.visible);
|
|
308
|
+
}, () => e.visible);
|
|
309
|
+
const n = () => {
|
|
310
|
+
var l;
|
|
311
|
+
if ((l = e.cancelButtonProps) != null && l.onClick) {
|
|
312
|
+
e.cancelButtonProps.onClick();
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
r.value = !1, a("update:visible", !1);
|
|
316
|
+
}, u = () => {
|
|
317
|
+
var l;
|
|
318
|
+
if ((l = e.okButtonProps) != null && l.onClick) {
|
|
319
|
+
e.okButtonProps.onClick();
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
a("ok");
|
|
323
|
+
}, o = g(K());
|
|
324
|
+
return () => d(z, c({
|
|
325
|
+
class: e.clsName
|
|
326
|
+
}, i(e, ...o, "modelValue"), {
|
|
327
|
+
closeOnClickModal: G(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
|
|
328
|
+
modelValue: r.value,
|
|
329
|
+
"onUpdate:modelValue": [(l) => r.value = l, (l) => {
|
|
330
|
+
a("update:visible", l);
|
|
331
|
+
}],
|
|
332
|
+
onClose: () => {
|
|
333
|
+
a("cancel");
|
|
334
|
+
}
|
|
335
|
+
}), {
|
|
336
|
+
footer: e.footer === !1 ? void 0 : () => d("div", {
|
|
337
|
+
class: `${e.clsName}-operate`
|
|
338
|
+
}, [d(A, c(i(e.cancelButtonProps, "onClick"), {
|
|
339
|
+
onClick: n
|
|
340
|
+
}), {
|
|
341
|
+
default: () => [e.cancelText]
|
|
342
|
+
}), d(A, c({
|
|
343
|
+
type: "primary",
|
|
344
|
+
loading: e.confirmLoading
|
|
345
|
+
}, i(e.okButtonProps, "onClick"), {
|
|
346
|
+
onClick: u
|
|
347
|
+
}), {
|
|
348
|
+
default: () => [e.okText]
|
|
349
|
+
})]),
|
|
280
350
|
...t
|
|
281
351
|
});
|
|
282
352
|
}
|
|
283
|
-
}),
|
|
353
|
+
}), qe = m({
|
|
284
354
|
props: {
|
|
285
|
-
...
|
|
355
|
+
...M.props,
|
|
356
|
+
page: {
|
|
357
|
+
type: Number,
|
|
358
|
+
default: 1
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
setup: (e, {
|
|
362
|
+
slots: t,
|
|
363
|
+
emit: a
|
|
364
|
+
}) => {
|
|
365
|
+
const r = f(e.page), n = f(e.pageSize);
|
|
366
|
+
S(() => {
|
|
367
|
+
r.value !== e.page && (r.value = e.page);
|
|
368
|
+
}, () => e.page), S(() => {
|
|
369
|
+
n.value !== e.pageSize && (n.value = e.pageSize);
|
|
370
|
+
}, () => e.pageSize);
|
|
371
|
+
const u = se(() => {
|
|
372
|
+
a("composeChange", r.value, n.value);
|
|
373
|
+
}, 300), o = () => {
|
|
374
|
+
u(), a("update:page", r.value);
|
|
375
|
+
}, l = () => {
|
|
376
|
+
u(), a("update:pageSize", n.value);
|
|
377
|
+
};
|
|
378
|
+
return () => d(M, c({
|
|
379
|
+
currentPage: r.value,
|
|
380
|
+
"onUpdate:currentPage": (p) => r.value = p,
|
|
381
|
+
pageSize: n.value,
|
|
382
|
+
"onUpdate:pageSize": (p) => n.value = p,
|
|
383
|
+
onCurrentChange: o,
|
|
384
|
+
onSizeChange: l
|
|
385
|
+
}, i(e, "currentPage", "pageSize")), t);
|
|
386
|
+
}
|
|
387
|
+
}), Ke = m({
|
|
388
|
+
props: {
|
|
389
|
+
...O.props
|
|
390
|
+
},
|
|
391
|
+
setup: (e, {
|
|
392
|
+
slots: t
|
|
393
|
+
}) => () => d(O, e, {
|
|
394
|
+
reference: t.default,
|
|
395
|
+
default: t.content
|
|
396
|
+
})
|
|
397
|
+
}), J = m({
|
|
398
|
+
props: {
|
|
399
|
+
...i(w.props, "label", "prop"),
|
|
286
400
|
title: {
|
|
287
401
|
type: String
|
|
288
402
|
},
|
|
@@ -296,25 +410,29 @@ const D = () => ({
|
|
|
296
410
|
type: Function
|
|
297
411
|
}
|
|
298
412
|
},
|
|
299
|
-
setup: (e
|
|
300
|
-
|
|
301
|
-
|
|
413
|
+
setup: (e, {
|
|
414
|
+
slots: t
|
|
415
|
+
}) => () => d(w, c(i(e, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender", "children"), {
|
|
416
|
+
label: N(e.title) ? void 0 : e.title,
|
|
417
|
+
renderHeader: N(e.title) ? () => e.title : void 0,
|
|
302
418
|
prop: e.dataIndex,
|
|
303
|
-
formatter: (
|
|
419
|
+
formatter: (a, r, n, u) => e.customRender ? e.customRender({
|
|
304
420
|
value: n,
|
|
305
421
|
text: n,
|
|
306
|
-
record:
|
|
307
|
-
column:
|
|
308
|
-
index:
|
|
422
|
+
record: a,
|
|
423
|
+
column: r,
|
|
424
|
+
index: u
|
|
309
425
|
}) : n
|
|
310
426
|
}), {
|
|
311
|
-
default: () => [
|
|
312
|
-
key:
|
|
313
|
-
},
|
|
427
|
+
default: () => [fe(e.children) > 0 && y(e.children, (a) => d(J, c({
|
|
428
|
+
key: a.dataIndex
|
|
429
|
+
}, a), t))],
|
|
430
|
+
default: t[e.dataIndex],
|
|
431
|
+
header: t[`${e.dataIndex}_header`]
|
|
314
432
|
})
|
|
315
|
-
}),
|
|
433
|
+
}), he = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Te = m({
|
|
316
434
|
props: {
|
|
317
|
-
...
|
|
435
|
+
...L.props,
|
|
318
436
|
columns: {
|
|
319
437
|
type: Array
|
|
320
438
|
},
|
|
@@ -327,146 +445,86 @@ const D = () => ({
|
|
|
327
445
|
},
|
|
328
446
|
setup: (e, {
|
|
329
447
|
slots: t,
|
|
330
|
-
expose:
|
|
448
|
+
expose: a
|
|
331
449
|
}) => {
|
|
332
|
-
const
|
|
333
|
-
return
|
|
334
|
-
ref:
|
|
335
|
-
id:
|
|
336
|
-
},
|
|
450
|
+
const r = f(), n = _("table");
|
|
451
|
+
return a($(he, r)), () => d(L, c({
|
|
452
|
+
ref: r,
|
|
453
|
+
id: n
|
|
454
|
+
}, i(e, "columns", "dataSource", "loading"), {
|
|
337
455
|
data: e.dataSource || e.data
|
|
338
456
|
}), {
|
|
339
457
|
default: () => {
|
|
340
|
-
var
|
|
341
|
-
return [(
|
|
342
|
-
key:
|
|
343
|
-
},
|
|
344
|
-
target:
|
|
458
|
+
var u, o;
|
|
459
|
+
return [(u = t.start) == null ? void 0 : u.call(t), y(e.columns, (l) => d(J, c({
|
|
460
|
+
key: l.dataIndex
|
|
461
|
+
}, l), t)), (o = t.default) == null ? void 0 : o.call(t), e.loading && d(ke, {
|
|
462
|
+
target: n,
|
|
345
463
|
loading: !0
|
|
346
464
|
}, null)];
|
|
347
465
|
},
|
|
348
|
-
...
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
}), Le = ge(De, void 0, K), Ae = Ce(N, f, (e) => ({
|
|
352
|
-
hideRequiredAsterisk: e.mode === Pe.DETAIL
|
|
353
|
-
}), b), we = c({
|
|
354
|
-
setup: () => {
|
|
355
|
-
const {
|
|
356
|
-
formProps: e
|
|
357
|
-
} = y();
|
|
358
|
-
return () => a(Ae, u(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
359
|
-
}
|
|
360
|
-
}), w = Fe(xe, Le), Ve = c({
|
|
361
|
-
props: {
|
|
362
|
-
...w.props,
|
|
363
|
-
paginationProps: {
|
|
364
|
-
type: Object
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
setup: (e, {
|
|
368
|
-
slots: t
|
|
369
|
-
}) => () => a(w, u(e, "paginationProps"), {
|
|
370
|
-
pagination: (o, n, r) => a(ae, d(e.paginationProps, {
|
|
371
|
-
total: n,
|
|
372
|
-
currentPage: o.page,
|
|
373
|
-
pageSize: o.pageSize,
|
|
374
|
-
onSizeChange: (l) => {
|
|
375
|
-
o.pageSize = l, r();
|
|
376
|
-
},
|
|
377
|
-
onCurrentChange: (l) => {
|
|
378
|
-
o.page = l, r();
|
|
379
|
-
}
|
|
380
|
-
}), null),
|
|
381
|
-
...t
|
|
382
|
-
})
|
|
383
|
-
}), tt = c({
|
|
384
|
-
setup: () => {
|
|
385
|
-
const {
|
|
386
|
-
listProps: e
|
|
387
|
-
} = y();
|
|
388
|
-
return () => a(Ve, u(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
389
|
-
}
|
|
390
|
-
}), Oe = be(le, ue), rt = c({
|
|
391
|
-
setup: () => {
|
|
392
|
-
const {
|
|
393
|
-
descProps: e
|
|
394
|
-
} = y();
|
|
395
|
-
return () => a(Oe, u(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
396
|
-
}
|
|
397
|
-
}), je = c({
|
|
398
|
-
props: {
|
|
399
|
-
...R.props
|
|
400
|
-
},
|
|
401
|
-
setup: (e, {
|
|
402
|
-
slots: t
|
|
403
|
-
}) => {
|
|
404
|
-
const {
|
|
405
|
-
curdState: o,
|
|
406
|
-
getOperate: n
|
|
407
|
-
} = y(), r = () => {
|
|
408
|
-
var i, s, g;
|
|
409
|
-
switch (o.mode) {
|
|
410
|
-
case p.ADD:
|
|
411
|
-
return (i = n(p.ADD)) == null ? void 0 : i.label;
|
|
412
|
-
case p.EDIT:
|
|
413
|
-
return (s = n(p.EDIT)) == null ? void 0 : s.label;
|
|
414
|
-
case p.DETAIL:
|
|
415
|
-
return (g = n(p.DETAIL)) == null ? void 0 : g.label;
|
|
416
|
-
}
|
|
417
|
-
}, l = () => {
|
|
418
|
-
o.mode = void 0, Te(o.detailData, {}), o.detailLoading = !1, o.addAction = void 0;
|
|
419
|
-
};
|
|
420
|
-
return () => a(R, d({
|
|
421
|
-
destroyOnClose: !0,
|
|
422
|
-
title: r(),
|
|
423
|
-
modelValue: !!o.mode,
|
|
424
|
-
onClose: l
|
|
425
|
-
}, e), t);
|
|
426
|
-
}
|
|
427
|
-
}), ot = c({
|
|
428
|
-
setup: () => {
|
|
429
|
-
const {
|
|
430
|
-
modalProps: e
|
|
431
|
-
} = y();
|
|
432
|
-
return () => a(je, u(e == null ? void 0 : e.value, "slots"), {
|
|
433
|
-
default: () => [a(we, null, null)],
|
|
434
|
-
...F(e == null ? void 0 : e.value, "slots")
|
|
466
|
+
...ge(t, "append", "empty")
|
|
435
467
|
});
|
|
436
468
|
}
|
|
437
469
|
});
|
|
470
|
+
P.props = {
|
|
471
|
+
...C.props,
|
|
472
|
+
...P.props,
|
|
473
|
+
formMethods: { type: Array, default: W }
|
|
474
|
+
};
|
|
475
|
+
F.props = {
|
|
476
|
+
...P.props,
|
|
477
|
+
...F.props,
|
|
478
|
+
inline: { type: Boolean, default: !0 }
|
|
479
|
+
};
|
|
480
|
+
h.props = {
|
|
481
|
+
...v.props,
|
|
482
|
+
...h.props
|
|
483
|
+
};
|
|
484
|
+
T.props = {
|
|
485
|
+
...Te.props,
|
|
486
|
+
...T.props
|
|
487
|
+
};
|
|
488
|
+
b.props = {
|
|
489
|
+
...ce.props,
|
|
490
|
+
...b.props
|
|
491
|
+
};
|
|
492
|
+
x.props = {
|
|
493
|
+
...b.props,
|
|
494
|
+
...x.props
|
|
495
|
+
};
|
|
496
|
+
E.props = {
|
|
497
|
+
...P.props,
|
|
498
|
+
...E.props
|
|
499
|
+
};
|
|
500
|
+
I.props = {
|
|
501
|
+
...Fe.props,
|
|
502
|
+
...I.props
|
|
503
|
+
};
|
|
438
504
|
export {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
xe as ProSearchForm,
|
|
465
|
-
Re as ProSelect,
|
|
466
|
-
$e as ProSubmitButton,
|
|
467
|
-
Le as ProTable,
|
|
468
|
-
G as ProTableColumn,
|
|
469
|
-
K as TableMethods,
|
|
470
|
-
m as createFormItemComponent,
|
|
471
|
-
M as createLoadingId
|
|
505
|
+
W as FormMethods,
|
|
506
|
+
Ce as ProCheckbox,
|
|
507
|
+
Ve as ProForm,
|
|
508
|
+
je as ProFormCascader,
|
|
509
|
+
Ne as ProFormCheckbox,
|
|
510
|
+
Me as ProFormDatePicker,
|
|
511
|
+
Pe as ProFormItem,
|
|
512
|
+
De as ProFormRadio,
|
|
513
|
+
we as ProFormSelect,
|
|
514
|
+
Ue as ProFormSwitch,
|
|
515
|
+
ze as ProFormText,
|
|
516
|
+
Ae as ProFormTextNumber,
|
|
517
|
+
Oe as ProFormTimePicker,
|
|
518
|
+
Le as ProFormTreeSelect,
|
|
519
|
+
ke as ProLoading,
|
|
520
|
+
Fe as ProModal,
|
|
521
|
+
qe as ProPagination,
|
|
522
|
+
Ke as ProPopover,
|
|
523
|
+
ve as ProRadio,
|
|
524
|
+
be as ProSelect,
|
|
525
|
+
Te as ProTable,
|
|
526
|
+
J as ProTableColumn,
|
|
527
|
+
he as TableMethods,
|
|
528
|
+
s as createFormItemComponent,
|
|
529
|
+
_ as createLoadingId
|
|
472
530
|
};
|