@vue-start/element-pro 0.2.4 → 0.2.6
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 +89 -89
- package/dist/index.es.js +392 -609
- package/dist/index.js +1 -725
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,470 +1,288 @@
|
|
|
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
|
|
3
|
-
import { isString, keys, omit, map, size, get } from
|
|
4
|
-
import { createGrid
|
|
5
|
-
import { useEffect, setReactiveValue } from
|
|
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 c, createVNode as a, mergeProps as d, reactive as U, ref as V, toRaw as q, isVNode as S } from "vue";
|
|
2
|
+
import { ElRow as H, ElCol as _, ElLoading as J, ElFormItem as T, ElForm as v, ElSelect as E, ElOption as Q, ElRadioGroup as I, ElRadioButton as W, ElRadio as X, ElInput as Y, ElInputNumber as Z, ElDatePicker as $, ElTimePicker as ee, ElTreeSelect as te, ElCheckboxGroup as re, ElSwitch as oe, ElCascader as ne, ElButton as f, ElTableColumn as k, ElTable as x, ElPagination as ae, ElDescriptions as le, ElDescriptionsItem as ue, ElDialog as R } from "element-plus";
|
|
3
|
+
import { isString as ce, keys as C, omit as u, map as P, size as de, get as F } from "lodash";
|
|
4
|
+
import { createGrid as ie, createExpose as O, createForm as se, createSearchForm as me, createFormItemCompFn as pe, useProForm as fe, createFormList as ye, createTable as ge, createCurdForm as Ce, CurdCurrentMode as Pe, useProCurd as y, createCurdList as Fe, createCurdDesc as be, CurdAction as p } from "@vue-start/pro";
|
|
5
|
+
import { useEffect as j, generateId as Se, setReactiveValue as Te } from "@vue-start/hooks";
|
|
6
|
+
const ve = ie(H, _), M = (e = "comp") => e + "-" + Se(), Ee = () => ({
|
|
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
|
+
}), 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)
|
|
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 n = e.target;
|
|
46
|
+
if (t.default ? n = document.getElementById(o) : e.target && ce(e.target) && (n = document.querySelector("#" + e.target)), !n)
|
|
143
47
|
return;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
background: props.background,
|
|
154
|
-
customClass: props.customClass
|
|
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
|
|
155
57
|
});
|
|
156
|
-
return
|
|
157
|
-
|
|
58
|
+
return () => {
|
|
59
|
+
r && r.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: o
|
|
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
|
+
}), h = () => ({
|
|
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
|
+
}), z = c({
|
|
70
|
+
props: {
|
|
71
|
+
...T.props,
|
|
72
|
+
...h()
|
|
73
|
+
},
|
|
74
|
+
setup: (e, {
|
|
75
|
+
slots: t
|
|
76
|
+
}) => {
|
|
77
|
+
const o = C(h());
|
|
78
|
+
return () => a(T, d(u(e, ...o, "name", "prop"), {
|
|
79
|
+
prop: e.prop || e.name
|
|
80
|
+
}), t);
|
|
81
|
+
}
|
|
82
|
+
}), b = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], ke = c({
|
|
83
|
+
props: {
|
|
84
|
+
...v.props
|
|
85
|
+
},
|
|
86
|
+
setup: (e, {
|
|
87
|
+
slots: t,
|
|
88
|
+
emit: o,
|
|
89
|
+
expose: n
|
|
90
|
+
}) => {
|
|
91
|
+
const r = e.model || U({}), l = V();
|
|
92
|
+
return j(() => {
|
|
93
|
+
!l.value || (l.value.submit = () => {
|
|
94
|
+
var i;
|
|
95
|
+
(i = l.value) == null || i.validate((s, g) => {
|
|
96
|
+
s ? o("finish", q(r)) : o("finishFailed", g);
|
|
217
97
|
});
|
|
218
|
-
};
|
|
219
|
-
}, [])
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, omit(props, "model"), {
|
|
225
|
-
"model": formState
|
|
226
|
-
}), slots);
|
|
227
|
-
};
|
|
98
|
+
});
|
|
99
|
+
}, []), n(O(b, l)), () => a(v, d({
|
|
100
|
+
ref: l
|
|
101
|
+
}, u(e, "model"), {
|
|
102
|
+
model: r
|
|
103
|
+
}), t);
|
|
228
104
|
}
|
|
229
|
-
})
|
|
230
|
-
//emit;
|
|
231
|
-
var ProForm = createForm(Form, ProGrid, FormMethods);
|
|
232
|
-
var ProSearchForm = createSearchForm(ProForm, {
|
|
105
|
+
}), N = se(ke, ve, b), xe = me(N, {
|
|
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
|
+
}, b), m = pe(z, (e, t, o) => ({
|
|
115
|
+
modelValue: e,
|
|
116
|
+
"onUpdate:modelValue": t,
|
|
117
|
+
clearable: !0,
|
|
118
|
+
disabled: o
|
|
119
|
+
})), B = () => ({
|
|
120
|
+
options: Array
|
|
121
|
+
}), Re = c({
|
|
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
|
+
...E.props,
|
|
125
|
+
...B()
|
|
126
|
+
},
|
|
127
|
+
setup: (e, {
|
|
128
|
+
slots: t,
|
|
129
|
+
emit: o
|
|
130
|
+
}) => {
|
|
131
|
+
const n = C(B());
|
|
132
|
+
return () => a(E, d(u(e, n), {
|
|
133
|
+
"onUpdate:modelValue": (r) => {
|
|
134
|
+
o("update:modelValue", r || void 0);
|
|
135
|
+
}
|
|
136
|
+
}), {
|
|
137
|
+
default: () => {
|
|
138
|
+
var r;
|
|
139
|
+
return [P(e.options, (l) => a(Q, d({
|
|
140
|
+
key: l.value
|
|
141
|
+
}, l), null)), (r = t.default) == null ? void 0 : r.call(t)];
|
|
142
|
+
},
|
|
143
|
+
...u(t, "default")
|
|
144
|
+
});
|
|
282
145
|
}
|
|
283
146
|
});
|
|
284
|
-
|
|
285
|
-
function
|
|
286
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
147
|
+
function he(e) {
|
|
148
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !S(e);
|
|
287
149
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
"onUpdate:modelValue": function onUpdateModelValue(v) {
|
|
311
|
-
emit("update:modelValue", v);
|
|
312
|
-
}
|
|
313
|
-
}), _isSlot(_slot = map(props.options, function (item) {
|
|
314
|
-
if (props.buttonStyle === "button") {
|
|
315
|
-
return createVNode(ElRadioButton, mergeProps({
|
|
316
|
-
"key": item.value
|
|
317
|
-
}, item, {
|
|
318
|
-
"label": item.value
|
|
319
|
-
}), {
|
|
320
|
-
"default": function _default() {
|
|
321
|
-
return [item.label];
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
return createVNode(ElRadio, mergeProps({
|
|
327
|
-
"key": item.value
|
|
328
|
-
}, item, {
|
|
329
|
-
"label": item.value
|
|
330
|
-
}), {
|
|
331
|
-
"default": function _default() {
|
|
332
|
-
return [item.label];
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
})) ? _slot : {
|
|
336
|
-
"default": function _default() {
|
|
337
|
-
return [_slot];
|
|
150
|
+
const D = () => ({
|
|
151
|
+
options: {
|
|
152
|
+
type: Array
|
|
153
|
+
},
|
|
154
|
+
buttonStyle: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: "default"
|
|
157
|
+
}
|
|
158
|
+
}), Be = c({
|
|
159
|
+
props: {
|
|
160
|
+
...I.props,
|
|
161
|
+
...D()
|
|
162
|
+
},
|
|
163
|
+
setup: (e, {
|
|
164
|
+
emit: t
|
|
165
|
+
}) => {
|
|
166
|
+
const o = C(D());
|
|
167
|
+
return () => {
|
|
168
|
+
let n;
|
|
169
|
+
return a(I, d(u(e, o), {
|
|
170
|
+
"onUpdate:modelValue": (r) => {
|
|
171
|
+
t("update:modelValue", r);
|
|
338
172
|
}
|
|
173
|
+
}), he(n = P(e.options, (r) => e.buttonStyle === "button" ? a(W, d({
|
|
174
|
+
key: r.value
|
|
175
|
+
}, r, {
|
|
176
|
+
label: r.value
|
|
177
|
+
}), {
|
|
178
|
+
default: () => [r.label]
|
|
179
|
+
}) : a(X, d({
|
|
180
|
+
key: r.value
|
|
181
|
+
}, r, {
|
|
182
|
+
label: r.value
|
|
183
|
+
}), {
|
|
184
|
+
default: () => [r.label]
|
|
185
|
+
}))) ? n : {
|
|
186
|
+
default: () => [n]
|
|
339
187
|
});
|
|
340
188
|
};
|
|
341
189
|
}
|
|
342
|
-
})
|
|
343
|
-
|
|
344
|
-
var ProFormText = createFormItemComponent({
|
|
345
|
-
InputComp: ElInput,
|
|
190
|
+
}), Ue = m({
|
|
191
|
+
InputComp: Y,
|
|
346
192
|
valueType: "text",
|
|
347
193
|
name: "PFromText"
|
|
348
|
-
})
|
|
349
|
-
|
|
350
|
-
InputComp: ElInputNumber,
|
|
194
|
+
}), qe = m({
|
|
195
|
+
InputComp: Z,
|
|
351
196
|
valueType: "digit",
|
|
352
197
|
name: "PFormNumber"
|
|
353
|
-
})
|
|
354
|
-
|
|
355
|
-
InputComp: ElDatePicker,
|
|
198
|
+
}), He = m({
|
|
199
|
+
InputComp: $,
|
|
356
200
|
valueType: "date",
|
|
357
201
|
name: "PFormDate"
|
|
358
|
-
})
|
|
359
|
-
|
|
360
|
-
InputComp: ElTimePicker,
|
|
202
|
+
}), _e = m({
|
|
203
|
+
InputComp: ee,
|
|
361
204
|
valueType: "time",
|
|
362
205
|
name: "PFormTime"
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
InputComp: ProSelect,
|
|
206
|
+
}), Je = m({
|
|
207
|
+
InputComp: Re,
|
|
366
208
|
valueType: "select",
|
|
367
209
|
name: "PFormSelect"
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
InputComp: ElTreeSelect,
|
|
210
|
+
}), Qe = m({
|
|
211
|
+
InputComp: te,
|
|
371
212
|
valueType: "treeSelect",
|
|
372
213
|
name: "PFormTreeSelect"
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
InputComp: ElCheckboxGroup,
|
|
214
|
+
}), We = m({
|
|
215
|
+
InputComp: re,
|
|
376
216
|
valueType: "checkbox",
|
|
377
217
|
name: "PFromCheckbox"
|
|
378
|
-
})
|
|
379
|
-
|
|
380
|
-
InputComp: ProRadio,
|
|
218
|
+
}), Xe = m({
|
|
219
|
+
InputComp: Be,
|
|
381
220
|
valueType: "radio",
|
|
382
221
|
name: "PFromRadio"
|
|
383
|
-
})
|
|
384
|
-
|
|
385
|
-
InputComp: ElSwitch,
|
|
222
|
+
}), Ye = m({
|
|
223
|
+
InputComp: oe,
|
|
386
224
|
valueType: "switch",
|
|
387
225
|
name: "PFromSwitch"
|
|
388
|
-
})
|
|
389
|
-
|
|
390
|
-
InputComp: ElCascader,
|
|
226
|
+
}), Ze = m({
|
|
227
|
+
InputComp: ne,
|
|
391
228
|
valueType: "cascader",
|
|
392
229
|
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);
|
|
230
|
+
}), $e = c({
|
|
231
|
+
props: {
|
|
232
|
+
...f.props
|
|
233
|
+
},
|
|
234
|
+
setup: (e, {
|
|
235
|
+
slots: t,
|
|
236
|
+
emit: o
|
|
237
|
+
}) => {
|
|
238
|
+
const {
|
|
239
|
+
formRef: n
|
|
240
|
+
} = fe(), r = (l) => {
|
|
241
|
+
var i, s;
|
|
242
|
+
o("click", l), (s = (i = n.value) == null ? void 0 : i.submit) == null || s.call(i);
|
|
414
243
|
};
|
|
244
|
+
return () => a(f, d({
|
|
245
|
+
onClick: r
|
|
246
|
+
}, e), t);
|
|
415
247
|
}
|
|
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({
|
|
248
|
+
}), L = ye(z), A = () => ({
|
|
249
|
+
addButtonText: {
|
|
250
|
+
type: String,
|
|
251
|
+
default: "\u6DFB\u52A0\u4E00\u9879"
|
|
252
|
+
},
|
|
253
|
+
addButtonProps: {
|
|
254
|
+
type: Object
|
|
255
|
+
},
|
|
256
|
+
minusButtonText: {
|
|
257
|
+
type: String,
|
|
258
|
+
default: "\u5220\u9664"
|
|
259
|
+
},
|
|
260
|
+
minusButtonProps: {
|
|
261
|
+
type: Object
|
|
262
|
+
}
|
|
263
|
+
}), et = c({
|
|
440
264
|
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
|
-
};
|
|
265
|
+
props: {
|
|
266
|
+
...L.props,
|
|
267
|
+
...A()
|
|
268
|
+
},
|
|
269
|
+
setup: (e, {
|
|
270
|
+
slots: t
|
|
271
|
+
}) => {
|
|
272
|
+
const o = C(A());
|
|
273
|
+
return () => a(L, u(e, o), {
|
|
274
|
+
itemMinus: () => a(f, e.minusButtonProps, {
|
|
275
|
+
default: () => [e.minusButtonText]
|
|
276
|
+
}),
|
|
277
|
+
add: () => a(f, e.addButtonProps, {
|
|
278
|
+
default: () => [e.addButtonText]
|
|
279
|
+
}),
|
|
280
|
+
...t
|
|
281
|
+
});
|
|
463
282
|
}
|
|
464
|
-
})
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
props: _objectSpread2(_objectSpread2({}, omit(ElTableColumn.props, "label", "prop")), {}, {
|
|
283
|
+
}), G = c({
|
|
284
|
+
props: {
|
|
285
|
+
...u(k.props, "label", "prop"),
|
|
468
286
|
title: {
|
|
469
287
|
type: String
|
|
470
288
|
},
|
|
@@ -477,43 +295,26 @@ var ProTableColumn = defineComponent({
|
|
|
477
295
|
customRender: {
|
|
478
296
|
type: Function
|
|
479
297
|
}
|
|
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), {}, {
|
|
298
|
+
},
|
|
299
|
+
setup: (e) => () => a(k, d(u(e, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender", "children"), {
|
|
300
|
+
label: S(e.title) ? void 0 : e.title,
|
|
301
|
+
renderHeader: S(e.title) ? () => e.title : void 0,
|
|
302
|
+
prop: e.dataIndex,
|
|
303
|
+
formatter: (t, o, n, r) => e.customRender ? e.customRender({
|
|
304
|
+
value: n,
|
|
305
|
+
text: n,
|
|
306
|
+
record: t,
|
|
307
|
+
column: o,
|
|
308
|
+
index: r
|
|
309
|
+
}) : n
|
|
310
|
+
}), {
|
|
311
|
+
default: () => [de(e.children) > 0 && P(e.children, (t) => a(G, d({
|
|
312
|
+
key: t.dataIndex
|
|
313
|
+
}, t), null))]
|
|
314
|
+
})
|
|
315
|
+
}), K = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], De = c({
|
|
316
|
+
props: {
|
|
317
|
+
...x.props,
|
|
517
318
|
columns: {
|
|
518
319
|
type: Array
|
|
519
320
|
},
|
|
@@ -523,167 +324,149 @@ var Table = defineComponent({
|
|
|
523
324
|
loading: {
|
|
524
325
|
type: Boolean
|
|
525
326
|
}
|
|
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
|
-
};
|
|
327
|
+
},
|
|
328
|
+
setup: (e, {
|
|
329
|
+
slots: t,
|
|
330
|
+
expose: o
|
|
331
|
+
}) => {
|
|
332
|
+
const n = V(), r = M("table");
|
|
333
|
+
return o(O(K, n)), () => a(x, d({
|
|
334
|
+
ref: n,
|
|
335
|
+
id: r
|
|
336
|
+
}, u(e, "columns", "dataSource", "loading"), {
|
|
337
|
+
data: e.dataSource || e.data
|
|
338
|
+
}), {
|
|
339
|
+
default: () => {
|
|
340
|
+
var l, i;
|
|
341
|
+
return [(l = t.start) == null ? void 0 : l.call(t), P(e.columns, (s) => a(G, d({
|
|
342
|
+
key: s.dataIndex
|
|
343
|
+
}, s), null)), (i = t.default) == null ? void 0 : i.call(t), e.loading && a(Ie, {
|
|
344
|
+
target: r,
|
|
345
|
+
loading: !0
|
|
346
|
+
}, null)];
|
|
347
|
+
},
|
|
348
|
+
...u(t, "default", "start")
|
|
349
|
+
});
|
|
554
350
|
}
|
|
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
|
-
};
|
|
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"));
|
|
571
359
|
}
|
|
572
|
-
})
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* 组合列表
|
|
578
|
-
* SearchForm + Table + Pagination
|
|
579
|
-
*/
|
|
580
|
-
var ProCurdList = defineComponent({
|
|
581
|
-
props: _objectSpread2(_objectSpread2({}, CurdList.props), {}, {
|
|
360
|
+
}), w = Fe(xe, Le), Ve = c({
|
|
361
|
+
props: {
|
|
362
|
+
...w.props,
|
|
582
363
|
paginationProps: {
|
|
583
364
|
type: Object
|
|
584
365
|
}
|
|
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
|
-
};
|
|
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"));
|
|
617
389
|
}
|
|
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
|
-
};
|
|
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"));
|
|
629
396
|
}
|
|
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;
|
|
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;
|
|
654
416
|
}
|
|
417
|
+
}, l = () => {
|
|
418
|
+
o.mode = void 0, Te(o.detailData, {}), o.detailLoading = !1, o.addAction = void 0;
|
|
655
419
|
};
|
|
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
|
-
};
|
|
420
|
+
return () => a(R, d({
|
|
421
|
+
destroyOnClose: !0,
|
|
422
|
+
title: r(),
|
|
423
|
+
modelValue: !!o.mode,
|
|
424
|
+
onClose: l
|
|
425
|
+
}, e), t);
|
|
672
426
|
}
|
|
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
|
-
};
|
|
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")
|
|
435
|
+
});
|
|
686
436
|
}
|
|
687
437
|
});
|
|
688
|
-
|
|
689
|
-
|
|
438
|
+
export {
|
|
439
|
+
b as FormMethods,
|
|
440
|
+
Oe as ProCurdDesc,
|
|
441
|
+
rt as ProCurdDescConnect,
|
|
442
|
+
Ae as ProCurdForm,
|
|
443
|
+
we as ProCurdFormConnect,
|
|
444
|
+
Ve as ProCurdList,
|
|
445
|
+
tt as ProCurdListConnect,
|
|
446
|
+
je as ProCurdModal,
|
|
447
|
+
ot as ProCurdModalConnect,
|
|
448
|
+
N as ProForm,
|
|
449
|
+
Ze as ProFormCascader,
|
|
450
|
+
We as ProFormCheckbox,
|
|
451
|
+
He as ProFormDatePicker,
|
|
452
|
+
z as ProFormItem,
|
|
453
|
+
et as ProFormList,
|
|
454
|
+
Xe as ProFormRadio,
|
|
455
|
+
Je as ProFormSelect,
|
|
456
|
+
Ye as ProFormSwitch,
|
|
457
|
+
Ue as ProFormText,
|
|
458
|
+
qe as ProFormTextNumber,
|
|
459
|
+
_e as ProFormTimePicker,
|
|
460
|
+
Qe as ProFormTreeSelect,
|
|
461
|
+
ve as ProGrid,
|
|
462
|
+
Ie as ProLoading,
|
|
463
|
+
Be as ProRadio,
|
|
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
|
|
472
|
+
};
|