@vue-start/element-pro 0.2.5 → 0.2.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/dist/index.d.ts +1076 -1068
- package/dist/index.es.js +435 -613
- package/dist/index.js +1 -725
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,470 +1,326 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps, reactive, ref, toRaw, isVNode } from
|
|
2
|
-
import { ElRow, ElCol, ElLoading, ElFormItem, ElForm, ElSelect, ElOption, ElRadioGroup, ElRadioButton, ElRadio, ElInput, ElInputNumber, ElDatePicker, ElTimePicker, ElTreeSelect
|
|
3
|
-
import { isString, keys, omit, map, size, get } from
|
|
4
|
-
import { createGrid, createExpose, createForm, createSearchForm, createFormItemCompFn, useProForm, createFormList, createTable, createCurdForm, CurdCurrentMode, useProCurd, createCurdList, createCurdDesc, CurdAction } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
function _defineProperty(obj, key, value) {
|
|
34
|
-
if (key in obj) {
|
|
35
|
-
Object.defineProperty(obj, key, {
|
|
36
|
-
value: value,
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true,
|
|
39
|
-
writable: true
|
|
40
|
-
});
|
|
41
|
-
} else {
|
|
42
|
-
obj[key] = value;
|
|
1
|
+
import { defineComponent as s, createVNode as a, mergeProps as i, reactive as J, ref as g, toRaw as Q, isVNode as v } from "vue";
|
|
2
|
+
import { ElRow as W, ElCol as X, ElLoading as Y, ElFormItem as E, ElForm as I, ElSelect as x, ElOption as Z, ElRadioGroup as k, ElRadioButton as _, ElRadio as $, ElCheckboxGroup as R, ElCheckbox as ee, ElInput as te, ElInputNumber as re, ElDatePicker as ne, ElTimePicker as oe, ElTreeSelect as ae, ElSwitch as ue, ElCascader as le, ElButton as y, ElTableColumn as h, ElTable as B, ElPagination as ce, ElDescriptions as de, ElDescriptionsItem as ie, ElDialog as D } from "element-plus";
|
|
3
|
+
import { isString as se, keys as C, omit as c, map as P, size as me, get as F } from "lodash";
|
|
4
|
+
import { createGrid as pe, createExpose as z, createForm as fe, createSearchForm as ye, createFormItemCompFn as ge, createExposeObj as T, useProForm as Ce, createFormList as Pe, createTable as be, createCurdForm as Fe, CurdCurrentMode as Se, useProCurd as b, createCurdList as Te, createCurdDesc as ve, CurdAction as f } from "@vue-start/pro";
|
|
5
|
+
import { useEffect as K, generateId as Ee, setReactiveValue as Ie } from "@vue-start/hooks";
|
|
6
|
+
const xe = pe(W, X), N = (e = "comp") => e + "-" + Ee(), ke = () => ({
|
|
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
|
|
43
33
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function _iterableToArray(iter) {
|
|
57
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
61
|
-
if (!o) return;
|
|
62
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
63
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
64
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
65
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
66
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function _arrayLikeToArray(arr, len) {
|
|
70
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
71
|
-
|
|
72
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
73
|
-
|
|
74
|
-
return arr2;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function _nonIterableSpread() {
|
|
78
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
var ProGrid = createGrid(ElRow, ElCol);
|
|
82
|
-
|
|
83
|
-
var createLoadingId = function createLoadingId() {
|
|
84
|
-
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "comp";
|
|
85
|
-
return prefix + "-" + generateId();
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var proLoadingProps = function proLoadingProps() {
|
|
89
|
-
return {
|
|
90
|
-
loading: {
|
|
91
|
-
type: Boolean
|
|
92
|
-
},
|
|
93
|
-
target: {
|
|
94
|
-
type: [String, Object]
|
|
95
|
-
},
|
|
96
|
-
body: {
|
|
97
|
-
type: Boolean
|
|
98
|
-
},
|
|
99
|
-
fullscreen: {
|
|
100
|
-
type: Boolean
|
|
101
|
-
},
|
|
102
|
-
lock: {
|
|
103
|
-
type: Boolean
|
|
104
|
-
},
|
|
105
|
-
text: {
|
|
106
|
-
type: String
|
|
107
|
-
},
|
|
108
|
-
spinner: {
|
|
109
|
-
type: String
|
|
110
|
-
},
|
|
111
|
-
background: {
|
|
112
|
-
type: String
|
|
113
|
-
},
|
|
114
|
-
customClass: {
|
|
115
|
-
type: String
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
var ProLoading = defineComponent({
|
|
121
|
-
props: _objectSpread2({}, proLoadingProps()),
|
|
122
|
-
setup: function setup(props, _ref) {
|
|
123
|
-
var slots = _ref.slots;
|
|
124
|
-
var id = createLoadingId();
|
|
125
|
-
useEffect(function () {
|
|
126
|
-
if (!props.loading) {
|
|
34
|
+
}), Re = s({
|
|
35
|
+
props: {
|
|
36
|
+
...ke()
|
|
37
|
+
},
|
|
38
|
+
setup: (e, {
|
|
39
|
+
slots: t
|
|
40
|
+
}) => {
|
|
41
|
+
const n = N();
|
|
42
|
+
return K(() => {
|
|
43
|
+
if (!e.loading)
|
|
127
44
|
return;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var element = props.target;
|
|
131
|
-
|
|
132
|
-
if (!slots["default"]) {
|
|
133
|
-
//监听
|
|
134
|
-
if (props.target && isString(props.target)) {
|
|
135
|
-
element = document.querySelector("#" + props.target);
|
|
136
|
-
}
|
|
137
|
-
} else {
|
|
138
|
-
//包裹
|
|
139
|
-
element = document.getElementById(id);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (!element) {
|
|
45
|
+
let o = e.target;
|
|
46
|
+
if (t.default ? o = document.getElementById(n) : e.target && se(e.target) && (o = document.querySelector("#" + e.target)), !o)
|
|
143
47
|
return;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
background: props.background,
|
|
154
|
-
customClass: props.customClass
|
|
48
|
+
const u = Y.service({
|
|
49
|
+
target: o,
|
|
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
|
|
155
57
|
});
|
|
156
|
-
return
|
|
157
|
-
|
|
58
|
+
return () => {
|
|
59
|
+
u && u.close();
|
|
158
60
|
};
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
});
|
|
162
|
-
return function () {
|
|
163
|
-
if (!slots["default"]) {
|
|
164
|
-
return null;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return createVNode("div", {
|
|
168
|
-
"id": id
|
|
169
|
-
}, [slots["default"]()]);
|
|
170
|
-
};
|
|
61
|
+
}, () => e.loading), () => t.default ? a("div", {
|
|
62
|
+
id: n
|
|
63
|
+
}, [t.default()]) : null;
|
|
171
64
|
}
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return {
|
|
176
|
-
name: {
|
|
177
|
-
type: [String, Array]
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
var ProFormItem = defineComponent({
|
|
183
|
-
props: _objectSpread2(_objectSpread2({}, ElFormItem.props), proFormItemProps()),
|
|
184
|
-
setup: function setup(props, _ref) {
|
|
185
|
-
var slots = _ref.slots;
|
|
186
|
-
var invalidKeys = keys(proFormItemProps());
|
|
187
|
-
return function () {
|
|
188
|
-
return createVNode(ElFormItem, mergeProps(omit.apply(void 0, [props].concat(_toConsumableArray(invalidKeys), ["name", "prop"])), {
|
|
189
|
-
"prop": props.prop || props.name
|
|
190
|
-
}), slots);
|
|
191
|
-
};
|
|
65
|
+
}), L = () => ({
|
|
66
|
+
name: {
|
|
67
|
+
type: [String, Array]
|
|
192
68
|
}
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
69
|
+
}), G = s({
|
|
70
|
+
props: {
|
|
71
|
+
...E.props,
|
|
72
|
+
...L()
|
|
73
|
+
},
|
|
74
|
+
setup: (e, {
|
|
75
|
+
slots: t
|
|
76
|
+
}) => {
|
|
77
|
+
const n = C(L());
|
|
78
|
+
return () => a(E, i(c(e, ...n, "name", "prop"), {
|
|
79
|
+
prop: e.prop || e.name
|
|
80
|
+
}), t);
|
|
81
|
+
}
|
|
82
|
+
}), S = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], he = s({
|
|
83
|
+
props: {
|
|
84
|
+
...I.props
|
|
85
|
+
},
|
|
86
|
+
setup: (e, {
|
|
87
|
+
slots: t,
|
|
88
|
+
emit: n,
|
|
89
|
+
expose: o
|
|
90
|
+
}) => {
|
|
91
|
+
const u = e.model || J({}), l = g();
|
|
92
|
+
return K(() => {
|
|
93
|
+
!l.value || (l.value.submit = () => {
|
|
94
|
+
var r;
|
|
95
|
+
(r = l.value) == null || r.validate((d, m) => {
|
|
96
|
+
d ? n("finish", Q(u)) : n("finishFailed", m);
|
|
217
97
|
});
|
|
218
|
-
};
|
|
219
|
-
}, [])
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, omit(props, "model"), {
|
|
225
|
-
"model": formState
|
|
226
|
-
}), slots);
|
|
227
|
-
};
|
|
98
|
+
});
|
|
99
|
+
}, []), o(z(S, l)), () => a(I, i({
|
|
100
|
+
ref: l
|
|
101
|
+
}, c(e, "model"), {
|
|
102
|
+
model: u
|
|
103
|
+
}), t);
|
|
228
104
|
}
|
|
229
|
-
})
|
|
230
|
-
//emit;
|
|
231
|
-
var ProForm = createForm(Form, ProGrid, FormMethods);
|
|
232
|
-
var ProSearchForm = createSearchForm(ProForm, {
|
|
105
|
+
}), U = fe(he, xe, S), Be = ye(U, {
|
|
233
106
|
needRules: {
|
|
234
107
|
type: Boolean,
|
|
235
|
-
|
|
108
|
+
default: !1
|
|
236
109
|
},
|
|
237
110
|
inline: {
|
|
238
111
|
type: Boolean,
|
|
239
|
-
|
|
112
|
+
default: !0
|
|
240
113
|
}
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
};
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
var proSelectProps = function proSelectProps() {
|
|
253
|
-
return {
|
|
254
|
-
options: Array
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
var ProSelect = defineComponent({
|
|
114
|
+
}, S), p = ge(G, (e, t, n) => ({
|
|
115
|
+
modelValue: e,
|
|
116
|
+
"onUpdate:modelValue": t,
|
|
117
|
+
clearable: !0,
|
|
118
|
+
disabled: n
|
|
119
|
+
})), A = () => ({
|
|
120
|
+
options: Array
|
|
121
|
+
}), De = s({
|
|
259
122
|
name: "PSelect",
|
|
260
|
-
props:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
123
|
+
props: {
|
|
124
|
+
...x.props,
|
|
125
|
+
...A()
|
|
126
|
+
},
|
|
127
|
+
setup: (e, {
|
|
128
|
+
slots: t,
|
|
129
|
+
emit: n,
|
|
130
|
+
expose: o
|
|
131
|
+
}) => {
|
|
132
|
+
const u = g();
|
|
133
|
+
o(T(u));
|
|
134
|
+
const l = C(A());
|
|
135
|
+
return () => a(x, i({
|
|
136
|
+
ref: u
|
|
137
|
+
}, c(e, l), {
|
|
138
|
+
"onUpdate:modelValue": (r) => {
|
|
139
|
+
n("update:modelValue", r || void 0);
|
|
140
|
+
}
|
|
141
|
+
}), {
|
|
142
|
+
default: () => {
|
|
143
|
+
var r, d;
|
|
144
|
+
return [(r = t.start) == null ? void 0 : r.call(t), P(e.options, (m) => a(Z, i({
|
|
145
|
+
key: m.value
|
|
146
|
+
}, m), null)), (d = t.default) == null ? void 0 : d.call(t)];
|
|
147
|
+
},
|
|
148
|
+
...c(t, "default")
|
|
149
|
+
});
|
|
282
150
|
}
|
|
283
|
-
})
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
151
|
+
}), V = () => ({
|
|
152
|
+
options: {
|
|
153
|
+
type: Array
|
|
154
|
+
},
|
|
155
|
+
buttonStyle: {
|
|
156
|
+
type: String,
|
|
157
|
+
default: "default"
|
|
158
|
+
}
|
|
159
|
+
}), Le = s({
|
|
160
|
+
props: {
|
|
161
|
+
...k.props,
|
|
162
|
+
...V()
|
|
163
|
+
},
|
|
164
|
+
setup: (e, {
|
|
165
|
+
slots: t,
|
|
166
|
+
emit: n,
|
|
167
|
+
expose: o
|
|
168
|
+
}) => {
|
|
169
|
+
const u = g();
|
|
170
|
+
o(T(u));
|
|
171
|
+
const l = C(V());
|
|
172
|
+
return () => a(k, i({
|
|
173
|
+
ref: u
|
|
174
|
+
}, c(e, l), {
|
|
175
|
+
"onUpdate:modelValue": (r) => {
|
|
176
|
+
n("update:modelValue", r);
|
|
177
|
+
}
|
|
178
|
+
}), {
|
|
179
|
+
default: () => [P(e.options, (r) => e.buttonStyle === "button" ? a(_, i({
|
|
180
|
+
key: r.value
|
|
181
|
+
}, r, {
|
|
182
|
+
label: r.value
|
|
183
|
+
}), {
|
|
184
|
+
default: () => [r.label]
|
|
185
|
+
}) : a($, i({
|
|
186
|
+
key: r.value
|
|
187
|
+
}, r, {
|
|
188
|
+
label: r.value
|
|
189
|
+
}), {
|
|
190
|
+
default: () => [r.label]
|
|
191
|
+
}))],
|
|
192
|
+
...t
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}), w = () => ({
|
|
196
|
+
options: Array
|
|
197
|
+
}), Ae = s({
|
|
198
|
+
props: {
|
|
199
|
+
...R.props,
|
|
200
|
+
...w()
|
|
201
|
+
},
|
|
202
|
+
setup: (e, {
|
|
203
|
+
slots: t,
|
|
204
|
+
emit: n,
|
|
205
|
+
expose: o
|
|
206
|
+
}) => {
|
|
207
|
+
const u = g();
|
|
208
|
+
o(T(u));
|
|
209
|
+
const l = C(w());
|
|
210
|
+
return () => a(R, i({
|
|
211
|
+
ref: u
|
|
212
|
+
}, c(e, l), {
|
|
213
|
+
"onUpdate:modelValue": (r) => {
|
|
214
|
+
n("update:modelValue", r || void 0);
|
|
215
|
+
}
|
|
216
|
+
}), {
|
|
217
|
+
default: () => {
|
|
218
|
+
var r, d;
|
|
219
|
+
return [(r = t.start) == null ? void 0 : r.call(t), P(e.options, (m) => a(ee, i(m, {
|
|
220
|
+
label: m.value
|
|
330
221
|
}), {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
"default": function _default() {
|
|
337
|
-
return [_slot];
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
};
|
|
222
|
+
default: () => [m.label]
|
|
223
|
+
})), (d = t.default) == null ? void 0 : d.call(t)];
|
|
224
|
+
},
|
|
225
|
+
...c(t, "default")
|
|
226
|
+
});
|
|
341
227
|
}
|
|
342
|
-
})
|
|
343
|
-
|
|
344
|
-
var ProFormText = createFormItemComponent({
|
|
345
|
-
InputComp: ElInput,
|
|
228
|
+
}), Je = p({
|
|
229
|
+
InputComp: te,
|
|
346
230
|
valueType: "text",
|
|
347
231
|
name: "PFromText"
|
|
348
|
-
})
|
|
349
|
-
|
|
350
|
-
InputComp: ElInputNumber,
|
|
232
|
+
}), Qe = p({
|
|
233
|
+
InputComp: re,
|
|
351
234
|
valueType: "digit",
|
|
352
235
|
name: "PFormNumber"
|
|
353
|
-
})
|
|
354
|
-
|
|
355
|
-
InputComp: ElDatePicker,
|
|
236
|
+
}), We = p({
|
|
237
|
+
InputComp: ne,
|
|
356
238
|
valueType: "date",
|
|
357
239
|
name: "PFormDate"
|
|
358
|
-
})
|
|
359
|
-
|
|
360
|
-
InputComp: ElTimePicker,
|
|
240
|
+
}), Xe = p({
|
|
241
|
+
InputComp: oe,
|
|
361
242
|
valueType: "time",
|
|
362
243
|
name: "PFormTime"
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
InputComp: ProSelect,
|
|
244
|
+
}), Ye = p({
|
|
245
|
+
InputComp: De,
|
|
366
246
|
valueType: "select",
|
|
367
247
|
name: "PFormSelect"
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
InputComp: ElTreeSelect,
|
|
248
|
+
}), Ze = p({
|
|
249
|
+
InputComp: ae,
|
|
371
250
|
valueType: "treeSelect",
|
|
372
251
|
name: "PFormTreeSelect"
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
InputComp: ElCheckboxGroup,
|
|
252
|
+
}), _e = p({
|
|
253
|
+
InputComp: Ae,
|
|
376
254
|
valueType: "checkbox",
|
|
377
255
|
name: "PFromCheckbox"
|
|
378
|
-
})
|
|
379
|
-
|
|
380
|
-
InputComp: ProRadio,
|
|
256
|
+
}), $e = p({
|
|
257
|
+
InputComp: Le,
|
|
381
258
|
valueType: "radio",
|
|
382
259
|
name: "PFromRadio"
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
InputComp: ElSwitch,
|
|
260
|
+
}), et = p({
|
|
261
|
+
InputComp: ue,
|
|
386
262
|
valueType: "switch",
|
|
387
263
|
name: "PFromSwitch"
|
|
388
|
-
})
|
|
389
|
-
|
|
390
|
-
InputComp: ElCascader,
|
|
264
|
+
}), tt = p({
|
|
265
|
+
InputComp: le,
|
|
391
266
|
valueType: "cascader",
|
|
392
267
|
name: "PFormCascader"
|
|
393
|
-
})
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
emit("click", e);
|
|
407
|
-
(_formRef$value = formRef.value) === null || _formRef$value === void 0 ? void 0 : (_formRef$value$submit = _formRef$value.submit) === null || _formRef$value$submit === void 0 ? void 0 : _formRef$value$submit.call(_formRef$value);
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
return function () {
|
|
411
|
-
return createVNode(ElButton, mergeProps({
|
|
412
|
-
"onClick": handleClick
|
|
413
|
-
}, props), slots);
|
|
268
|
+
}), rt = s({
|
|
269
|
+
props: {
|
|
270
|
+
...y.props
|
|
271
|
+
},
|
|
272
|
+
setup: (e, {
|
|
273
|
+
slots: t,
|
|
274
|
+
emit: n
|
|
275
|
+
}) => {
|
|
276
|
+
const {
|
|
277
|
+
formRef: o
|
|
278
|
+
} = Ce(), u = (l) => {
|
|
279
|
+
var r, d;
|
|
280
|
+
n("click", l), (d = (r = o.value) == null ? void 0 : r.submit) == null || d.call(r);
|
|
414
281
|
};
|
|
282
|
+
return () => a(y, i({
|
|
283
|
+
onClick: u
|
|
284
|
+
}, e), t);
|
|
415
285
|
}
|
|
416
|
-
})
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
minusButtonProps: {
|
|
434
|
-
type: Object
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
var ProFormList = defineComponent({
|
|
286
|
+
}), O = Pe(G), M = () => ({
|
|
287
|
+
addButtonText: {
|
|
288
|
+
type: String,
|
|
289
|
+
default: "\u6DFB\u52A0\u4E00\u9879"
|
|
290
|
+
},
|
|
291
|
+
addButtonProps: {
|
|
292
|
+
type: Object
|
|
293
|
+
},
|
|
294
|
+
minusButtonText: {
|
|
295
|
+
type: String,
|
|
296
|
+
default: "\u5220\u9664"
|
|
297
|
+
},
|
|
298
|
+
minusButtonProps: {
|
|
299
|
+
type: Object
|
|
300
|
+
}
|
|
301
|
+
}), nt = s({
|
|
440
302
|
name: "PFormList",
|
|
441
|
-
props:
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
}, slots));
|
|
462
|
-
};
|
|
303
|
+
props: {
|
|
304
|
+
...O.props,
|
|
305
|
+
...M()
|
|
306
|
+
},
|
|
307
|
+
setup: (e, {
|
|
308
|
+
slots: t
|
|
309
|
+
}) => {
|
|
310
|
+
const n = C(M());
|
|
311
|
+
return () => a(O, c(e, n), {
|
|
312
|
+
itemMinus: () => a(y, e.minusButtonProps, {
|
|
313
|
+
default: () => [e.minusButtonText]
|
|
314
|
+
}),
|
|
315
|
+
add: () => a(y, e.addButtonProps, {
|
|
316
|
+
default: () => [e.addButtonText]
|
|
317
|
+
}),
|
|
318
|
+
...t
|
|
319
|
+
});
|
|
463
320
|
}
|
|
464
|
-
})
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
props: _objectSpread2(_objectSpread2({}, omit(ElTableColumn.props, "label", "prop")), {}, {
|
|
321
|
+
}), q = s({
|
|
322
|
+
props: {
|
|
323
|
+
...c(h.props, "label", "prop"),
|
|
468
324
|
title: {
|
|
469
325
|
type: String
|
|
470
326
|
},
|
|
@@ -477,43 +333,26 @@ var ProTableColumn = defineComponent({
|
|
|
477
333
|
customRender: {
|
|
478
334
|
type: Function
|
|
479
335
|
}
|
|
480
|
-
}
|
|
481
|
-
setup:
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
return value;
|
|
501
|
-
}
|
|
502
|
-
}), {
|
|
503
|
-
"default": function _default() {
|
|
504
|
-
return [size(props.children) > 0 && map(props.children, function (item) {
|
|
505
|
-
return createVNode(ProTableColumn, mergeProps({
|
|
506
|
-
"key": item.dataIndex
|
|
507
|
-
}, item), null);
|
|
508
|
-
})];
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
var TableMethods = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"];
|
|
515
|
-
var Table = defineComponent({
|
|
516
|
-
props: _objectSpread2(_objectSpread2({}, ElTable.props), {}, {
|
|
336
|
+
},
|
|
337
|
+
setup: (e) => () => a(h, i(c(e, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender", "children"), {
|
|
338
|
+
label: v(e.title) ? void 0 : e.title,
|
|
339
|
+
renderHeader: v(e.title) ? () => e.title : void 0,
|
|
340
|
+
prop: e.dataIndex,
|
|
341
|
+
formatter: (t, n, o, u) => e.customRender ? e.customRender({
|
|
342
|
+
value: o,
|
|
343
|
+
text: o,
|
|
344
|
+
record: t,
|
|
345
|
+
column: n,
|
|
346
|
+
index: u
|
|
347
|
+
}) : o
|
|
348
|
+
}), {
|
|
349
|
+
default: () => [me(e.children) > 0 && P(e.children, (t) => a(q, i({
|
|
350
|
+
key: t.dataIndex
|
|
351
|
+
}, t), null))]
|
|
352
|
+
})
|
|
353
|
+
}), H = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Ve = s({
|
|
354
|
+
props: {
|
|
355
|
+
...B.props,
|
|
517
356
|
columns: {
|
|
518
357
|
type: Array
|
|
519
358
|
},
|
|
@@ -523,167 +362,150 @@ var Table = defineComponent({
|
|
|
523
362
|
loading: {
|
|
524
363
|
type: Boolean
|
|
525
364
|
}
|
|
526
|
-
}
|
|
527
|
-
setup:
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
"loading": true
|
|
550
|
-
}, null)];
|
|
551
|
-
}
|
|
552
|
-
}, omit(slots, "default", "start")));
|
|
553
|
-
};
|
|
365
|
+
},
|
|
366
|
+
setup: (e, {
|
|
367
|
+
slots: t,
|
|
368
|
+
expose: n
|
|
369
|
+
}) => {
|
|
370
|
+
const o = g(), u = N("table");
|
|
371
|
+
return n(z(H, o)), () => a(B, i({
|
|
372
|
+
ref: o,
|
|
373
|
+
id: u
|
|
374
|
+
}, c(e, "columns", "dataSource", "loading"), {
|
|
375
|
+
data: e.dataSource || e.data
|
|
376
|
+
}), {
|
|
377
|
+
default: () => {
|
|
378
|
+
var l, r;
|
|
379
|
+
return [(l = t.start) == null ? void 0 : l.call(t), P(e.columns, (d) => a(q, i({
|
|
380
|
+
key: d.dataIndex
|
|
381
|
+
}, d), null)), (r = t.default) == null ? void 0 : r.call(t), e.loading && a(Re, {
|
|
382
|
+
target: u,
|
|
383
|
+
loading: !0
|
|
384
|
+
}, null)];
|
|
385
|
+
},
|
|
386
|
+
...c(t, "default", "start")
|
|
387
|
+
});
|
|
554
388
|
}
|
|
555
|
-
})
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
var ProCurdFormConnect = defineComponent({
|
|
564
|
-
setup: function setup() {
|
|
565
|
-
var _useProCurd = useProCurd(),
|
|
566
|
-
formProps = _useProCurd.formProps;
|
|
567
|
-
|
|
568
|
-
return function () {
|
|
569
|
-
return createVNode(ProCurdForm, omit(formProps === null || formProps === void 0 ? void 0 : formProps.value, "slots"), get(formProps === null || formProps === void 0 ? void 0 : formProps.value, "slots"));
|
|
570
|
-
};
|
|
389
|
+
}), we = be(Ve, void 0, H), Oe = Fe(U, y, (e) => ({
|
|
390
|
+
hideRequiredAsterisk: e.mode === Se.DETAIL
|
|
391
|
+
}), S), Me = s({
|
|
392
|
+
setup: () => {
|
|
393
|
+
const {
|
|
394
|
+
formProps: e
|
|
395
|
+
} = b();
|
|
396
|
+
return () => a(Oe, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
571
397
|
}
|
|
572
|
-
})
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* 组合列表
|
|
578
|
-
* SearchForm + Table + Pagination
|
|
579
|
-
*/
|
|
580
|
-
var ProCurdList = defineComponent({
|
|
581
|
-
props: _objectSpread2(_objectSpread2({}, CurdList.props), {}, {
|
|
398
|
+
}), j = Te(Be, we), je = s({
|
|
399
|
+
props: {
|
|
400
|
+
...j.props,
|
|
582
401
|
paginationProps: {
|
|
583
402
|
type: Object
|
|
584
403
|
}
|
|
585
|
-
}
|
|
586
|
-
setup:
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
});
|
|
609
|
-
var ProCurdListConnect = defineComponent({
|
|
610
|
-
setup: function setup() {
|
|
611
|
-
var _useProCurd = useProCurd(),
|
|
612
|
-
listProps = _useProCurd.listProps;
|
|
613
|
-
|
|
614
|
-
return function () {
|
|
615
|
-
return createVNode(ProCurdList, omit(listProps === null || listProps === void 0 ? void 0 : listProps.value, "slots"), get(listProps === null || listProps === void 0 ? void 0 : listProps.value, "slots"));
|
|
616
|
-
};
|
|
404
|
+
},
|
|
405
|
+
setup: (e, {
|
|
406
|
+
slots: t
|
|
407
|
+
}) => () => a(j, c(e, "paginationProps"), {
|
|
408
|
+
pagination: (n, o, u) => a(ce, i(e.paginationProps, {
|
|
409
|
+
total: o,
|
|
410
|
+
currentPage: n.page,
|
|
411
|
+
pageSize: n.pageSize,
|
|
412
|
+
onSizeChange: (l) => {
|
|
413
|
+
n.pageSize = l, u();
|
|
414
|
+
},
|
|
415
|
+
onCurrentChange: (l) => {
|
|
416
|
+
n.page = l, u();
|
|
417
|
+
}
|
|
418
|
+
}), null),
|
|
419
|
+
...t
|
|
420
|
+
})
|
|
421
|
+
}), ot = s({
|
|
422
|
+
setup: () => {
|
|
423
|
+
const {
|
|
424
|
+
listProps: e
|
|
425
|
+
} = b();
|
|
426
|
+
return () => a(je, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
617
427
|
}
|
|
618
|
-
})
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
descProps = _useProCurd.descProps;
|
|
625
|
-
|
|
626
|
-
return function () {
|
|
627
|
-
return createVNode(ProCurdDesc, omit(descProps === null || descProps === void 0 ? void 0 : descProps.value, "slots"), get(descProps === null || descProps === void 0 ? void 0 : descProps.value, "slots"));
|
|
628
|
-
};
|
|
428
|
+
}), ze = ve(de, ie), at = s({
|
|
429
|
+
setup: () => {
|
|
430
|
+
const {
|
|
431
|
+
descProps: e
|
|
432
|
+
} = b();
|
|
433
|
+
return () => a(ze, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
|
|
629
434
|
}
|
|
630
|
-
})
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
setup:
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
case CurdAction.EDIT:
|
|
650
|
-
return (_getOperate2 = getOperate(CurdAction.EDIT)) === null || _getOperate2 === void 0 ? void 0 : _getOperate2.label;
|
|
651
|
-
|
|
652
|
-
case CurdAction.DETAIL:
|
|
653
|
-
return (_getOperate3 = getOperate(CurdAction.DETAIL)) === null || _getOperate3 === void 0 ? void 0 : _getOperate3.label;
|
|
435
|
+
}), Ke = s({
|
|
436
|
+
props: {
|
|
437
|
+
...D.props
|
|
438
|
+
},
|
|
439
|
+
setup: (e, {
|
|
440
|
+
slots: t
|
|
441
|
+
}) => {
|
|
442
|
+
const {
|
|
443
|
+
curdState: n,
|
|
444
|
+
getOperate: o
|
|
445
|
+
} = b(), u = () => {
|
|
446
|
+
var r, d, m;
|
|
447
|
+
switch (n.mode) {
|
|
448
|
+
case f.ADD:
|
|
449
|
+
return (r = o(f.ADD)) == null ? void 0 : r.label;
|
|
450
|
+
case f.EDIT:
|
|
451
|
+
return (d = o(f.EDIT)) == null ? void 0 : d.label;
|
|
452
|
+
case f.DETAIL:
|
|
453
|
+
return (m = o(f.DETAIL)) == null ? void 0 : m.label;
|
|
654
454
|
}
|
|
455
|
+
}, l = () => {
|
|
456
|
+
n.mode = void 0, Ie(n.detailData, {}), n.detailLoading = !1, n.addAction = void 0;
|
|
655
457
|
};
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
return function () {
|
|
665
|
-
return createVNode(ElDialog, mergeProps({
|
|
666
|
-
"destroyOnClose": true,
|
|
667
|
-
"title": getTitle(),
|
|
668
|
-
"modelValue": !!curdState.mode,
|
|
669
|
-
"onClose": handleCancel
|
|
670
|
-
}, props), slots);
|
|
671
|
-
};
|
|
458
|
+
return () => a(D, i({
|
|
459
|
+
destroyOnClose: !0,
|
|
460
|
+
title: u(),
|
|
461
|
+
modelValue: !!n.mode,
|
|
462
|
+
onClose: l
|
|
463
|
+
}, e), t);
|
|
672
464
|
}
|
|
673
|
-
})
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
return [createVNode(ProCurdFormConnect, null, null)];
|
|
683
|
-
}
|
|
684
|
-
}, get(modalProps === null || modalProps === void 0 ? void 0 : modalProps.value, "slots")));
|
|
685
|
-
};
|
|
465
|
+
}), ut = s({
|
|
466
|
+
setup: () => {
|
|
467
|
+
const {
|
|
468
|
+
modalProps: e
|
|
469
|
+
} = b();
|
|
470
|
+
return () => a(Ke, c(e == null ? void 0 : e.value, "slots"), {
|
|
471
|
+
default: () => [a(Me, null, null)],
|
|
472
|
+
...F(e == null ? void 0 : e.value, "slots")
|
|
473
|
+
});
|
|
686
474
|
}
|
|
687
475
|
});
|
|
688
|
-
|
|
689
|
-
|
|
476
|
+
export {
|
|
477
|
+
S as FormMethods,
|
|
478
|
+
Ae as ProCheckbox,
|
|
479
|
+
ze as ProCurdDesc,
|
|
480
|
+
at as ProCurdDescConnect,
|
|
481
|
+
Oe as ProCurdForm,
|
|
482
|
+
Me as ProCurdFormConnect,
|
|
483
|
+
je as ProCurdList,
|
|
484
|
+
ot as ProCurdListConnect,
|
|
485
|
+
Ke as ProCurdModal,
|
|
486
|
+
ut as ProCurdModalConnect,
|
|
487
|
+
U as ProForm,
|
|
488
|
+
tt as ProFormCascader,
|
|
489
|
+
_e as ProFormCheckbox,
|
|
490
|
+
We as ProFormDatePicker,
|
|
491
|
+
G as ProFormItem,
|
|
492
|
+
nt as ProFormList,
|
|
493
|
+
$e as ProFormRadio,
|
|
494
|
+
Ye as ProFormSelect,
|
|
495
|
+
et as ProFormSwitch,
|
|
496
|
+
Je as ProFormText,
|
|
497
|
+
Qe as ProFormTextNumber,
|
|
498
|
+
Xe as ProFormTimePicker,
|
|
499
|
+
Ze as ProFormTreeSelect,
|
|
500
|
+
xe as ProGrid,
|
|
501
|
+
Re as ProLoading,
|
|
502
|
+
Le as ProRadio,
|
|
503
|
+
Be as ProSearchForm,
|
|
504
|
+
De as ProSelect,
|
|
505
|
+
rt as ProSubmitButton,
|
|
506
|
+
we as ProTable,
|
|
507
|
+
q as ProTableColumn,
|
|
508
|
+
H as TableMethods,
|
|
509
|
+
p as createFormItemComponent,
|
|
510
|
+
N as createLoadingId
|
|
511
|
+
};
|