@web-utils/form-ui 1.0.0-beta32 → 1.0.0-beta34
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/chunks/{Cby3mvvZ.mjs → 6whKG2aW.mjs} +4 -2
- package/chunks/B0QAMGEk.mjs +149 -0
- package/chunks/{C4bM8miy.mjs → BINk6iM9.mjs} +4 -3
- package/chunks/{Cc3EJjbV.mjs → BMybeJeX.mjs} +2 -2
- package/chunks/{BgDYHgyH.mjs → BOnjsuaF.mjs} +4 -1
- package/chunks/BQvDsDYm.mjs +199 -0
- package/chunks/BRCCvDXx.mjs +339 -0
- package/chunks/BX-cVxlK.mjs +102 -0
- package/chunks/{B99alfW4.mjs → BnDWAjBA.mjs} +2 -2
- package/chunks/BrhuWxfn.mjs +168 -0
- package/chunks/{bnRb5PUB.mjs → Bsff-xFB.mjs} +7 -5
- package/chunks/{Cy-4nmyC.mjs → Bx4hMd0g.mjs} +6 -4
- package/chunks/{BmZieBZW.mjs → ByS9PiXt.mjs} +4 -2
- package/chunks/{C9J3j0PX.mjs → C5jtjhYS.mjs} +2 -0
- package/chunks/CK4RBjb4.mjs +660 -0
- package/chunks/{CsfgUCe9.mjs → CMMPk7_3.mjs} +1 -1
- package/chunks/{C44-CFi-.mjs → CO4Fyzj-.mjs} +13 -4
- package/chunks/{Cgl-hCE5.mjs → COdSAAp_.mjs} +2 -2
- package/chunks/CRf0wnBc.mjs +181 -0
- package/chunks/{Ci1XxmdE.mjs → CYgTbmSw.mjs} +5 -3
- package/chunks/{4ZuVpQf6.mjs → CnAEuI_c.mjs} +1 -1
- package/chunks/DPO-hveW.mjs +233 -0
- package/chunks/{C3a15Ful.mjs → DSJFPBdn.mjs} +4 -2
- package/chunks/{D1EOkWJ7.mjs → DfMmYJVy.mjs} +2 -2
- package/chunks/{Dt6gY213.mjs → Dlemc_K8.mjs} +8 -5
- package/chunks/{DazglPJZ.mjs → DukJJ_BZ.mjs} +3 -1
- package/chunks/KZeDzvm6.mjs +115 -0
- package/chunks/{CugRu2Ka.mjs → PRSE4n97.mjs} +5 -3
- package/chunks/{D1G2MMMx.mjs → b5HOxD60.mjs} +13 -4
- package/chunks/{BV_P9a8o.mjs → bTej_00x.mjs} +4 -2
- package/chunks/{JhyiXnbd.mjs → ierlNKc4.mjs} +10 -4
- package/editable-tree/index.d.ts +254 -0
- package/editable-tree/index.mjs +2 -0
- package/editable-tree/style.css +1 -0
- package/element-dialog/index.d.ts +6 -6
- package/element-dialog/index.mjs +1 -1
- package/form-cascader/index.d.ts +5 -5
- package/form-cascader/index.mjs +1 -1
- package/form-check-box-group/index.d.ts +78 -7
- package/form-check-box-group/index.mjs +1 -1
- package/form-check-box-group/style.css +1 -0
- package/form-checkbox/index.d.ts +4 -2
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +63 -11
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +3 -3
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.d.ts +3 -3
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +3 -3
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +5 -3
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +3 -3
- package/form-input-phone-number/index.mjs +1 -1
- package/form-item-group/index.d.ts +0 -2
- package/form-item-group/index.mjs +1 -1
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- package/form-radio-group/index.d.ts +91 -4
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +82 -10
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +2 -2
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +4 -4
- package/form-switch/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/helper/dictionary.mjs +7 -7
- package/iframe-window/index.mjs +1 -1
- package/index.d.ts +2 -1
- package/index.mjs +47 -46
- package/month-calendar/index.d.ts +1 -1
- package/package.json +1 -1
- package/pageable-table/index.d.ts +4 -4
- package/pageable-table/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/table-column/index.d.ts +4 -4
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.d.ts +340 -1
- package/table-view/index.mjs +458 -6
- package/table-view/style.css +1 -0
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.d.ts +136 -24
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +6 -1
- package/year-calendar/index.mjs +1 -1
- package/chunks/BQ77eAb3.mjs +0 -71
- package/chunks/Br4i8stg.mjs +0 -222
- package/chunks/DO8dVGef.mjs +0 -98
- package/chunks/DtAYXPvz.mjs +0 -108
- package/chunks/S64sNmuR.mjs +0 -226
- package/chunks/dM-icPM8.mjs +0 -107
- package/chunks/pxFLMMUm.mjs +0 -110
- package/chunks/q1SlJP1y.mjs +0 -171
- /package/chunks/{CkFapoKt.mjs → B1MSrc6f.mjs} +0 -0
- /package/chunks/{BV_N8p9t.mjs → DiE4GJtU.mjs} +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { i as e, n as t } from "./DPO-hveW.mjs";
|
|
2
|
+
import { n } from "./CMMPk7_3.mjs";
|
|
3
|
+
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { isNumber as i, isPlainObject as a, isString as o } from "@web-utils/core";
|
|
5
|
+
import { computed as s, createVNode as c, mergeProps as l, ref as u, watchEffect as d } from "vue";
|
|
6
|
+
import { ElOption as f, ElSelect as p } from "element-plus/es";
|
|
7
|
+
import "element-plus/es/components/base/style/css";
|
|
8
|
+
import "element-plus/es/components/select/style/css";
|
|
9
|
+
import "element-plus/es/components/option/style/css";
|
|
10
|
+
//#region src/components/form/props/select.ts
|
|
11
|
+
var m = {
|
|
12
|
+
...n,
|
|
13
|
+
modelValue: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Boolean,
|
|
17
|
+
Object,
|
|
18
|
+
Array
|
|
19
|
+
],
|
|
20
|
+
multiple: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
options: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => ({
|
|
31
|
+
label: "label",
|
|
32
|
+
value: "value"
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
valueKey: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "value"
|
|
38
|
+
},
|
|
39
|
+
size: String,
|
|
40
|
+
clearable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
collapseTags: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
collapseTagsTooltip: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
tagTooltip: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => ({})
|
|
55
|
+
},
|
|
56
|
+
multipleLimit: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
},
|
|
60
|
+
id: String,
|
|
61
|
+
name: String,
|
|
62
|
+
effect: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: "light"
|
|
65
|
+
},
|
|
66
|
+
autocomplete: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "off"
|
|
69
|
+
},
|
|
70
|
+
placeholder: String,
|
|
71
|
+
filterable: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
},
|
|
75
|
+
allowCreate: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1
|
|
78
|
+
},
|
|
79
|
+
filterMethod: Function,
|
|
80
|
+
remote: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !1
|
|
83
|
+
},
|
|
84
|
+
debounce: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 300
|
|
87
|
+
},
|
|
88
|
+
remoteMethod: Function,
|
|
89
|
+
remoteShowSuffix: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: !1
|
|
92
|
+
},
|
|
93
|
+
loading: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !1
|
|
96
|
+
},
|
|
97
|
+
loadingText: String,
|
|
98
|
+
noMatchText: String,
|
|
99
|
+
noDataText: String,
|
|
100
|
+
popperClass: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: ""
|
|
103
|
+
},
|
|
104
|
+
popperStyle: [String, Object],
|
|
105
|
+
reserveKeyword: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: !0
|
|
108
|
+
},
|
|
109
|
+
defaultFirstOption: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: !1
|
|
112
|
+
},
|
|
113
|
+
teleported: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !0
|
|
116
|
+
},
|
|
117
|
+
appendTo: [String, Object],
|
|
118
|
+
persistent: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: !0
|
|
121
|
+
},
|
|
122
|
+
automaticDropdown: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: !1
|
|
125
|
+
},
|
|
126
|
+
clearIcon: [String, Object],
|
|
127
|
+
fitInputWidth: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: !1
|
|
130
|
+
},
|
|
131
|
+
suffixIcon: [String, Object],
|
|
132
|
+
tagType: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: "info"
|
|
135
|
+
},
|
|
136
|
+
tagEffect: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: "light"
|
|
139
|
+
},
|
|
140
|
+
validateEvent: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: !0
|
|
143
|
+
},
|
|
144
|
+
dropDownOffset: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: 12
|
|
147
|
+
},
|
|
148
|
+
showArrow: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: !0
|
|
151
|
+
},
|
|
152
|
+
placement: {
|
|
153
|
+
type: String,
|
|
154
|
+
default: "bottom-start"
|
|
155
|
+
},
|
|
156
|
+
fallbackPlacements: {
|
|
157
|
+
type: Array,
|
|
158
|
+
default: () => [
|
|
159
|
+
"bottom-start",
|
|
160
|
+
"top-start",
|
|
161
|
+
"right",
|
|
162
|
+
"left"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
maxCollapseTags: {
|
|
166
|
+
type: Number,
|
|
167
|
+
default: 1
|
|
168
|
+
},
|
|
169
|
+
popperOptions: {
|
|
170
|
+
type: Object,
|
|
171
|
+
default: () => ({})
|
|
172
|
+
},
|
|
173
|
+
ariaLabel: String,
|
|
174
|
+
emptyValues: Array,
|
|
175
|
+
valueOnClear: [
|
|
176
|
+
String,
|
|
177
|
+
Number,
|
|
178
|
+
Boolean,
|
|
179
|
+
Function
|
|
180
|
+
],
|
|
181
|
+
suffixTransition: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: !0
|
|
184
|
+
},
|
|
185
|
+
tabindex: [String, Number],
|
|
186
|
+
dictType: String,
|
|
187
|
+
gender: Boolean,
|
|
188
|
+
year: [Boolean, Number],
|
|
189
|
+
all: Boolean,
|
|
190
|
+
confirm: Boolean,
|
|
191
|
+
start: Number,
|
|
192
|
+
end: Number,
|
|
193
|
+
optionLabel: [String, Number],
|
|
194
|
+
emitLabel: Boolean,
|
|
195
|
+
english: Boolean,
|
|
196
|
+
chinese: Boolean,
|
|
197
|
+
typing: Boolean,
|
|
198
|
+
multipleStringMode: Boolean,
|
|
199
|
+
multipleStringSeparator: {
|
|
200
|
+
type: String,
|
|
201
|
+
default: ","
|
|
202
|
+
}
|
|
203
|
+
}, h = {
|
|
204
|
+
modelValue: !0,
|
|
205
|
+
emptyValues: !0,
|
|
206
|
+
dropDownOffset: !0,
|
|
207
|
+
valueOnClear: !0,
|
|
208
|
+
options: !0,
|
|
209
|
+
dictType: !0,
|
|
210
|
+
gender: !0,
|
|
211
|
+
year: !0,
|
|
212
|
+
all: !0,
|
|
213
|
+
confirm: !0,
|
|
214
|
+
start: !0,
|
|
215
|
+
end: !0,
|
|
216
|
+
optionLabel: !0,
|
|
217
|
+
emitLabel: !0,
|
|
218
|
+
english: !0,
|
|
219
|
+
chinese: !0,
|
|
220
|
+
typing: !0,
|
|
221
|
+
multipleStringMode: !0,
|
|
222
|
+
multipleStringSeparator: !0
|
|
223
|
+
}, g = [
|
|
224
|
+
"change",
|
|
225
|
+
"visible-change",
|
|
226
|
+
"remove-tag",
|
|
227
|
+
"clear",
|
|
228
|
+
"blur",
|
|
229
|
+
"focus",
|
|
230
|
+
"popup-scroll"
|
|
231
|
+
], _ = (e) => n[e] === void 0 && h[e] !== !0, v = {
|
|
232
|
+
name: "FormSelect",
|
|
233
|
+
inheritAttrs: !1,
|
|
234
|
+
props: { ...m },
|
|
235
|
+
emits: {
|
|
236
|
+
...t,
|
|
237
|
+
change: null,
|
|
238
|
+
"visible-change": null,
|
|
239
|
+
"remove-tag": null,
|
|
240
|
+
clear: null,
|
|
241
|
+
blur: null,
|
|
242
|
+
focus: null,
|
|
243
|
+
"popup-scroll": null
|
|
244
|
+
},
|
|
245
|
+
setup(t, { emit: n, slots: m, attrs: h }) {
|
|
246
|
+
let { emitInput: v, render: y, placeholder: b, disabled: x, autoBind: S } = e(t, {
|
|
247
|
+
emit: n,
|
|
248
|
+
slots: m,
|
|
249
|
+
attrs: h,
|
|
250
|
+
events: g,
|
|
251
|
+
predicate: _,
|
|
252
|
+
messagePrefix: "请选择"
|
|
253
|
+
}), C = u(null), w = u(!1);
|
|
254
|
+
d(() => {
|
|
255
|
+
if (t.multiple && t.multipleStringMode) {
|
|
256
|
+
var e;
|
|
257
|
+
C.value = (e = t.modelValue) == null ? void 0 : e.split(",").filter((e) => e);
|
|
258
|
+
} else C.value = t.modelValue;
|
|
259
|
+
});
|
|
260
|
+
let T = (e) => {
|
|
261
|
+
if (t.multiple && t.multipleStringMode ? v(e.join(t.multipleStringSeparator)) : v(e), t.emitLabel) {
|
|
262
|
+
let r = O.value.find((n) => n[t.props.value] === e), i = r == null ? void 0 : r[t.props.label];
|
|
263
|
+
i !== t.optionLabel && n("update:optionLabel", i);
|
|
264
|
+
}
|
|
265
|
+
}, { dictItems: E } = r(t), D = u([]), O = s(() => {
|
|
266
|
+
if (t.dictType) return E.value;
|
|
267
|
+
if (t.remote) return D.value;
|
|
268
|
+
if (t.gender) return [{
|
|
269
|
+
[t.props.label]: "男",
|
|
270
|
+
[t.props.value]: t.chinese ? "男" : t.typing ? 1 : "1"
|
|
271
|
+
}, {
|
|
272
|
+
[t.props.label]: "女",
|
|
273
|
+
[t.props.value]: t.chinese ? "女" : t.typing ? 2 : "2"
|
|
274
|
+
}];
|
|
275
|
+
if (t.confirm) return [{
|
|
276
|
+
[t.props.label]: "是",
|
|
277
|
+
[t.props.value]: t.chinese ? "是" : t.english ? "Y" : t.typing ? 1 : "1"
|
|
278
|
+
}, {
|
|
279
|
+
[t.props.label]: "否",
|
|
280
|
+
[t.props.value]: t.chinese ? "否" : t.english ? "N" : t.typing ? 0 : "0"
|
|
281
|
+
}];
|
|
282
|
+
if (t.all) return [{
|
|
283
|
+
[t.props.value]: "",
|
|
284
|
+
[t.props.label]: "全部"
|
|
285
|
+
}, ...t.options];
|
|
286
|
+
if (t.start && t.end) return Array(t.end - t.start + 1).fill(1).map((e, n) => ({
|
|
287
|
+
[t.props.label]: t.start + n,
|
|
288
|
+
[t.props.value]: t.start + n
|
|
289
|
+
}));
|
|
290
|
+
if (t.year) {
|
|
291
|
+
let e = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
|
|
292
|
+
i(t.year) && (r = t.year);
|
|
293
|
+
for (let i = -r; i <= r; i++) {
|
|
294
|
+
let r = e + i;
|
|
295
|
+
n.push({
|
|
296
|
+
[t.props.label]: r,
|
|
297
|
+
[t.props.value]: r
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
return n;
|
|
301
|
+
}
|
|
302
|
+
return t.options ? t.options.map((e) => (e[t.props.value] = e[t.props.value] ?? e[t.props.label], e)) : [];
|
|
303
|
+
});
|
|
304
|
+
d(() => {
|
|
305
|
+
t.remote && k();
|
|
306
|
+
});
|
|
307
|
+
let k = async (e) => {
|
|
308
|
+
try {
|
|
309
|
+
var n;
|
|
310
|
+
w.value = !0;
|
|
311
|
+
let r = await t.remoteMethod(e, t.prop);
|
|
312
|
+
((n = r.data.data) == null ? void 0 : n.length) >= 0 ? o(r.data.data[0]) ? D.value = r.data.data.map((e) => ({
|
|
313
|
+
[t.props.value]: e,
|
|
314
|
+
[t.props.label]: e
|
|
315
|
+
})) : a(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
|
|
316
|
+
} catch {}
|
|
317
|
+
w.value = !1;
|
|
318
|
+
};
|
|
319
|
+
return () => y({ vNodes: c(p, l(S.value, {
|
|
320
|
+
offset: t.dropDownOffset,
|
|
321
|
+
"model-value": C.value,
|
|
322
|
+
"onUpdate:modelValue": T,
|
|
323
|
+
disabled: x.value,
|
|
324
|
+
placeholder: b.value
|
|
325
|
+
}), {
|
|
326
|
+
...m,
|
|
327
|
+
default: m.default || (() => {
|
|
328
|
+
var e;
|
|
329
|
+
return (e = O.value) == null ? void 0 : e.map(({ value: e, label: t }) => c(f, {
|
|
330
|
+
key: e,
|
|
331
|
+
label: t,
|
|
332
|
+
value: e
|
|
333
|
+
}, null));
|
|
334
|
+
})
|
|
335
|
+
}) });
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
//#endregion
|
|
339
|
+
export { v as t };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { camelize as e, capitalize as t, copy as n, hyphenate as r, isArray as i, isFunction as a, isString as o, uncapitalize as s } from "@web-utils/core";
|
|
2
|
+
import { computed as c, useAttrs as l } from "vue";
|
|
3
|
+
import { ElMessage as u } from "element-plus";
|
|
4
|
+
//#region src/utils/index.ts
|
|
5
|
+
var d = (e, n, r, i, a = !0) => {
|
|
6
|
+
let o = {};
|
|
7
|
+
if (n) for (let t in e) n(t) && (o[t] = e[t]);
|
|
8
|
+
return a && r && r.forEach((e) => {
|
|
9
|
+
o[`on${t(e)}`] = (...t) => i(e, ...t);
|
|
10
|
+
}), o;
|
|
11
|
+
}, f = ({ removeOn: t = !0, include: n, exclude: r } = {}) => {
|
|
12
|
+
let i = l();
|
|
13
|
+
return c(() => {
|
|
14
|
+
let a = {}, o = {}, c = {}, l = !1;
|
|
15
|
+
(n || r) && (l = !0), n == null || n.forEach((t) => {
|
|
16
|
+
o[e(t)] = !0;
|
|
17
|
+
}), r == null || r.forEach((t) => {
|
|
18
|
+
c[e(t)] = !0;
|
|
19
|
+
});
|
|
20
|
+
for (let e in i) if (e.startsWith("on")) {
|
|
21
|
+
let u = s(e.replace(/^on/, ""));
|
|
22
|
+
if (l && (n && o[u] !== !0 || r && c[u] === !0)) continue;
|
|
23
|
+
t ? a[u] = i[e] : a[e] = i[e];
|
|
24
|
+
}
|
|
25
|
+
return a;
|
|
26
|
+
});
|
|
27
|
+
}, p = (e, { emit: t, events: n, predicate: r }) => c(() => d(e, r, n, t)), m = (e, { withOn: t = !1 } = {}) => {
|
|
28
|
+
let n = {};
|
|
29
|
+
for (let r in e) r.startsWith("on") && (t ? n[r] = e[r] : n[s(r.replace(/^on/, ""))] = e[r]);
|
|
30
|
+
return n;
|
|
31
|
+
}, h = (e, t = "id", n = "label") => {
|
|
32
|
+
let r = [];
|
|
33
|
+
function i(e, a) {
|
|
34
|
+
if (!e) return;
|
|
35
|
+
let o = [...a, {
|
|
36
|
+
[t]: e[t],
|
|
37
|
+
[n]: e[n]
|
|
38
|
+
}];
|
|
39
|
+
if (!e.children || e.children.length === 0) {
|
|
40
|
+
r.push(o);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
e.children.forEach((e) => {
|
|
44
|
+
i(e, o);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return e.forEach((e) => i(e, [])), r;
|
|
48
|
+
}, g = (e, t = "id", n = "label") => {
|
|
49
|
+
let r = [];
|
|
50
|
+
return h(e).forEach((e) => {
|
|
51
|
+
let i = [], a = [];
|
|
52
|
+
for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
|
|
53
|
+
r.push({
|
|
54
|
+
value: i.join("/"),
|
|
55
|
+
label: a.join("/")
|
|
56
|
+
});
|
|
57
|
+
}), r;
|
|
58
|
+
}, _ = (e, t = "id", n = "label") => {
|
|
59
|
+
let r = {};
|
|
60
|
+
return h(e).forEach((e) => {
|
|
61
|
+
let i = [], a = [];
|
|
62
|
+
for (let r = 0; r < e.length; r++) i.push(e[r][t]), a.push(e[r][n]);
|
|
63
|
+
r[i.join("/")] = {
|
|
64
|
+
value: i.join("/"),
|
|
65
|
+
label: a.join("/")
|
|
66
|
+
};
|
|
67
|
+
}), r;
|
|
68
|
+
};
|
|
69
|
+
function v(e) {
|
|
70
|
+
n(e, () => u.success({
|
|
71
|
+
duration: 1e3,
|
|
72
|
+
message: "复制成功!",
|
|
73
|
+
type: "success"
|
|
74
|
+
}), () => u.error({
|
|
75
|
+
duration: 1e3,
|
|
76
|
+
message: "复制失败!",
|
|
77
|
+
type: "error"
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
var y = (e) => {
|
|
81
|
+
let t = [];
|
|
82
|
+
return e && (i(e) ? e.forEach((e) => {
|
|
83
|
+
i(e) ? t.push(...y(e)) : e && t.push(e);
|
|
84
|
+
}) : e && t.push(e)), t;
|
|
85
|
+
}, b = (e = "", t = {}) => {
|
|
86
|
+
let n = t || {};
|
|
87
|
+
return (e || "").replace(/{(.*?)}/g, (e, t) => {
|
|
88
|
+
if (t.indexOf(":")) {
|
|
89
|
+
let [e, r] = t.split(":");
|
|
90
|
+
return n[e] ? n[e] : r;
|
|
91
|
+
} else return n[t] || "";
|
|
92
|
+
});
|
|
93
|
+
}, x = (e, t) => a(e) ? b(e(t), t) : o(e) ? b(e, t) : null, S = (e) => {
|
|
94
|
+
let t = {};
|
|
95
|
+
for (let n in e) t[r(n)] = e[n];
|
|
96
|
+
return t;
|
|
97
|
+
}, C = (e, t) => {
|
|
98
|
+
for (let n in t) e[n] = t[n];
|
|
99
|
+
return e;
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
export { d as a, S as c, f as d, y as i, g as l, v as n, m as o, x as r, _ as s, C as t, p as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as e } from "./BX-cVxlK.mjs";
|
|
2
2
|
import { goBack as t, hasAuthority as n } from "../api/index.mjs";
|
|
3
3
|
import { toolbarContextKey as r } from "../constants/index.mjs";
|
|
4
|
-
import { t as i } from "./
|
|
4
|
+
import { t as i } from "./BrhuWxfn.mjs";
|
|
5
5
|
import { NOOP as a, capitalize as o } from "@web-utils/core";
|
|
6
6
|
import { Comment as s, createVNode as c } from "vue";
|
|
7
7
|
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { u as e } from "./BX-cVxlK.mjs";
|
|
2
|
+
import { hasAuthority as t } from "../api/index.mjs";
|
|
3
|
+
import { toolbarContextKey as n } from "../constants/index.mjs";
|
|
4
|
+
import { isArray as r, isFunction as i } from "@web-utils/core";
|
|
5
|
+
import { computed as a, createVNode as o, defineComponent as s, getCurrentInstance as c, inject as l, mergeProps as u, ref as d } from "vue";
|
|
6
|
+
import { ElMessage as f, ElMessageBox as p } from "element-plus";
|
|
7
|
+
import { ElButton as m } from "element-plus/es";
|
|
8
|
+
import "element-plus/es/components/base/style/css";
|
|
9
|
+
import "element-plus/es/components/button/style/css";
|
|
10
|
+
//#region src/components/toolbar/button.ts
|
|
11
|
+
var h = {
|
|
12
|
+
size: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "default"
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "default"
|
|
19
|
+
},
|
|
20
|
+
plain: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
text: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
bg: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
link: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
round: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
circle: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
dashed: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
loading: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
loadingIcon: [String, Object],
|
|
53
|
+
disabled: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
icon: [String, Object],
|
|
58
|
+
autofocus: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
nativeType: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: "button"
|
|
65
|
+
},
|
|
66
|
+
autoInsertSpace: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
color: String,
|
|
71
|
+
dark: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
},
|
|
75
|
+
tag: [String, Object],
|
|
76
|
+
label: String,
|
|
77
|
+
loadable: Boolean,
|
|
78
|
+
footer: Boolean,
|
|
79
|
+
primary: Boolean,
|
|
80
|
+
warning: Boolean,
|
|
81
|
+
privilege: String,
|
|
82
|
+
condition: { type: [
|
|
83
|
+
Array,
|
|
84
|
+
Function,
|
|
85
|
+
Boolean
|
|
86
|
+
] },
|
|
87
|
+
conditionTips: String,
|
|
88
|
+
confirm: Boolean,
|
|
89
|
+
confirmTips: String,
|
|
90
|
+
beforeExecute: Function,
|
|
91
|
+
afterExecute: Function,
|
|
92
|
+
route: [String, Object],
|
|
93
|
+
title: String,
|
|
94
|
+
cancelButtonText: String,
|
|
95
|
+
confirmButtonText: String
|
|
96
|
+
}, g = {
|
|
97
|
+
icon: !0,
|
|
98
|
+
type: !0,
|
|
99
|
+
text: !0,
|
|
100
|
+
title: !0,
|
|
101
|
+
disabled: !0,
|
|
102
|
+
loading: !0
|
|
103
|
+
}, _ = (e) => g[e] !== !0, v = /* @__PURE__ */ s({
|
|
104
|
+
name: "ToolbarButton",
|
|
105
|
+
inheritAttrs: !1,
|
|
106
|
+
props: { ...h },
|
|
107
|
+
setup(s, { attrs: h, slots: g }) {
|
|
108
|
+
let v = c(), y = l(n, null), b = d(!1), x = a(() => s.privilege ? t(s.privilege) : !0), S = async (e) => {
|
|
109
|
+
try {
|
|
110
|
+
if (i(s.beforeExecute) && await s.beforeExecute() === !1) return;
|
|
111
|
+
if (s.conditionTips) {
|
|
112
|
+
let e;
|
|
113
|
+
if (e = r(s.condition) ? s.condition.length <= 0 : i(s.condition) ? !s.condition() : !s.condition, e) {
|
|
114
|
+
f.warning(s.conditionTips);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (s.confirm || s.confirmTips) try {
|
|
119
|
+
await p.confirm(s.confirmTips || "你确定要删除该记录吗?", "系统提示", {
|
|
120
|
+
type: "warning",
|
|
121
|
+
distinguishCancelAndClose: !0,
|
|
122
|
+
cancelButtonText: s.cancelButtonText,
|
|
123
|
+
confirmButtonText: s.confirmButtonText
|
|
124
|
+
});
|
|
125
|
+
} catch (e) {
|
|
126
|
+
if (e === "cancel") {
|
|
127
|
+
let { onCancel: t } = h;
|
|
128
|
+
i(t) && await t(e);
|
|
129
|
+
} else if (e === "close") {
|
|
130
|
+
let { onClose: t } = h;
|
|
131
|
+
i(t) && await t(e);
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
b.value = !0;
|
|
136
|
+
let n;
|
|
137
|
+
if (s.route) {
|
|
138
|
+
var t;
|
|
139
|
+
await ((t = v.proxy.$router) == null ? void 0 : t.push(s.route));
|
|
140
|
+
} else {
|
|
141
|
+
let { onClick: t } = h;
|
|
142
|
+
if (i(t)) try {
|
|
143
|
+
n = await t(e);
|
|
144
|
+
} catch {}
|
|
145
|
+
}
|
|
146
|
+
b.value = !1, i(s.afterExecute) && await s.afterExecute(n);
|
|
147
|
+
} catch {}
|
|
148
|
+
}, C = a(() => s.text ? !0 : s.type === "text"), w = a(() => {
|
|
149
|
+
if (!C.value) return s.primary ? "primary" : s.warning ? "warning" : s.type;
|
|
150
|
+
}), T = e(s, { predicate: _ });
|
|
151
|
+
return () => x.value ? o(m, u(T.value, {
|
|
152
|
+
title: s.footer || y != null && y.footer ? null : s.title,
|
|
153
|
+
disabled: s.disabled || b.value,
|
|
154
|
+
loading: s.loadable ? b.value : !1,
|
|
155
|
+
type: w.value,
|
|
156
|
+
text: C.value,
|
|
157
|
+
class: h.class,
|
|
158
|
+
style: h.style,
|
|
159
|
+
onClick: S
|
|
160
|
+
}), {
|
|
161
|
+
default: !s.circle && (s.label || g.default) ? () => g.default ? g.default() : s.label : null,
|
|
162
|
+
loading: g.loading,
|
|
163
|
+
icon: g.icon ? g.icon : s.icon ? () => o("i", { class: s.icon }, null) : null
|
|
164
|
+
}) : null;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
//#endregion
|
|
168
|
+
export { v as t };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n, t as r } from "./
|
|
1
|
+
import { i as e, n as t } from "./DPO-hveW.mjs";
|
|
2
|
+
import { n, t as r } from "./CMMPk7_3.mjs";
|
|
3
3
|
import { isString as i } from "@web-utils/core";
|
|
4
4
|
import { computed as a, createVNode as o, mergeProps as s } from "vue";
|
|
5
5
|
import { ElInputNumber as c } from "element-plus/es";
|
|
6
|
+
import "element-plus/es/components/base/style/css";
|
|
7
|
+
import "element-plus/es/components/input-number/style/css";
|
|
6
8
|
//#region src/components/form/props/input-number.ts
|
|
7
9
|
var l = {
|
|
8
10
|
...n,
|
|
@@ -51,7 +53,6 @@ var l = {
|
|
|
51
53
|
type: Boolean,
|
|
52
54
|
default: !0
|
|
53
55
|
},
|
|
54
|
-
label: String,
|
|
55
56
|
inputmode: String,
|
|
56
57
|
align: {
|
|
57
58
|
type: String,
|
|
@@ -62,7 +63,8 @@ var l = {
|
|
|
62
63
|
default: !1
|
|
63
64
|
},
|
|
64
65
|
prefix: String,
|
|
65
|
-
suffix: String
|
|
66
|
+
suffix: String,
|
|
67
|
+
append: String
|
|
66
68
|
}, u = {
|
|
67
69
|
readonly: !0,
|
|
68
70
|
placeholder: !0,
|
|
@@ -98,7 +100,7 @@ var l = {
|
|
|
98
100
|
placeholder: m.value
|
|
99
101
|
}), {
|
|
100
102
|
prefix: r.prefix || t.prefix ? () => t.prefix : null,
|
|
101
|
-
suffix: r.suffix || t.suffix ? () => t.suffix :
|
|
103
|
+
suffix: r.suffix || t.suffix ? () => t.suffix : t.append,
|
|
102
104
|
"decrease-icon": r["decrease-icon"],
|
|
103
105
|
"increase-icon": r["increase-icon"]
|
|
104
106
|
}) });
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./DPO-hveW.mjs";
|
|
2
|
+
import { n } from "./CMMPk7_3.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElSwitch as o } from "element-plus/es";
|
|
5
|
+
import "element-plus/es/components/base/style/css";
|
|
6
|
+
import "element-plus/es/components/switch/style/css";
|
|
5
7
|
//#region src/components/form/props/switch.ts
|
|
6
8
|
var s = {
|
|
7
9
|
...n,
|
|
@@ -41,7 +43,7 @@ var s = {
|
|
|
41
43
|
String,
|
|
42
44
|
Number
|
|
43
45
|
],
|
|
44
|
-
default:
|
|
46
|
+
default: "Y"
|
|
45
47
|
},
|
|
46
48
|
inactiveValue: {
|
|
47
49
|
type: [
|
|
@@ -49,7 +51,7 @@ var s = {
|
|
|
49
51
|
String,
|
|
50
52
|
Number
|
|
51
53
|
],
|
|
52
|
-
default:
|
|
54
|
+
default: "N"
|
|
53
55
|
},
|
|
54
56
|
name: {
|
|
55
57
|
type: String,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { i as e, n as t } from "./
|
|
2
|
-
import { n } from "./
|
|
1
|
+
import { i as e, n as t } from "./DPO-hveW.mjs";
|
|
2
|
+
import { n } from "./CMMPk7_3.mjs";
|
|
3
3
|
import { createVNode as r, mergeProps as i, useModel as a } from "vue";
|
|
4
4
|
import { ElRate as o } from "element-plus/es";
|
|
5
|
+
import "element-plus/es/components/base/style/css";
|
|
6
|
+
import "element-plus/es/components/rate/style/css";
|
|
5
7
|
//#region src/components/form/props/rate.ts
|
|
6
8
|
var s = {
|
|
7
9
|
...n,
|
|
@@ -3,6 +3,8 @@ import n from "../form-cell/index.mjs";
|
|
|
3
3
|
import { camelize as r, isDef as i, isString as a } from "@web-utils/core";
|
|
4
4
|
import { Comment as o, Fragment as s, Text as c, createVNode as l, inject as u, isVNode as d } from "vue";
|
|
5
5
|
import { ElTooltip as f } from "element-plus/es";
|
|
6
|
+
import "element-plus/es/components/base/style/css";
|
|
7
|
+
import "element-plus/es/components/tooltip/style/css";
|
|
6
8
|
//#region src/components/red-form/FormRow.vue?vue&type=script&lang.jsx
|
|
7
9
|
function p(e) {
|
|
8
10
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
|