@web-utils/form-ui 1.0.0-beta55 → 1.0.0-beta57
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/api/index.d.ts +6 -0
- package/chunks/-qKZw-3p2.mjs +23 -0
- package/chunks/{B3A-CnYr.mjs → 33G2_TH8.mjs} +4 -4
- package/chunks/{gLPy4Sus.mjs → 8P-OAGbj.mjs} +1 -1
- package/chunks/B2PuSZ_F.mjs +35 -0
- package/chunks/B6B-rhhB.mjs +37 -0
- package/chunks/{C7Mak2La.mjs → BHT38Us-.mjs} +7 -6
- package/chunks/BWoKh6f6.mjs +66 -0
- package/chunks/{Dt_s96gL2.mjs → BXrA0SYn2.mjs} +2 -2
- package/chunks/BZ0v5mka.mjs +30 -0
- package/chunks/CE1uX9hJ.mjs +95 -0
- package/chunks/CGnOR2gn.mjs +59 -0
- package/chunks/CJ1-f8sg.mjs +30 -0
- package/chunks/{5KomemiE2.mjs → CUq3MOiQ2.mjs} +29 -29
- package/chunks/CdzoVG6J.mjs +47 -0
- package/chunks/{Dg4R65aG2.mjs → CqoMZ9Wo2.mjs} +2 -2
- package/chunks/CrQmTHMA.mjs +105 -0
- package/chunks/Crh2RUrS.mjs +106 -0
- package/chunks/DBUJ7Bva.mjs +56 -0
- package/chunks/DB_UKPay.mjs +27 -0
- package/chunks/{BvKUeniN.mjs → DEC2O0q-.mjs} +46 -44
- package/chunks/{BoJgSMkL.mjs → DUhF8YOY.mjs} +2 -2
- package/chunks/Du1PslcN.mjs +28 -0
- package/chunks/{Dluor05A.mjs → DyEYDv4B.mjs} +7 -6
- package/chunks/EAJCsX8W.mjs +32 -0
- package/chunks/{Bq62m7IR2.mjs → T4GdQtY8.mjs} +11 -11
- package/chunks/ZFJ73RWd2.mjs +29 -0
- package/chunks/{D2B9Y3oT.mjs → fmIV_kHp.mjs} +2 -2
- package/chunks/h5488Kii.mjs +27 -0
- package/chunks/k3cC9SGC.mjs +27 -0
- package/chunks/{CauzhVSa2.mjs → rJWvEBq9.mjs} +12 -12
- package/chunks/{7GmKqdbC.mjs → usyXQe35.mjs} +1 -1
- package/chunks/{BpCiVuKL.mjs → v3wbYL_-.mjs} +7 -6
- package/chunks/vd9nXj8B.mjs +59 -0
- package/chunks/{g8MIBMw92.mjs → ztBRZQwM.mjs} +13 -13
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/constants/index.d.ts +18 -0
- package/editable-tree/index.d.ts +27 -0
- package/editable-tree/index.mjs +591 -2
- package/element-dialog/index.mjs +1 -1
- package/element-resize-observer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +3 -0
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +6 -0
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item-config-provider/index.d.ts +18 -0
- package/form-item-group/index.mjs +1 -1
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -1
- 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.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/helper/dictionary.d.ts +14 -0
- package/helper/dictionary.mjs +1 -1
- package/helper/form-item.d.ts +8 -1
- package/helper/form-item.mjs +27 -2
- package/helper/input.d.ts +3 -0
- package/helper/input.mjs +1 -1
- package/helper/sub-table-plus.d.ts +60 -0
- package/iframe-window/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +37 -37
- package/package.json +1 -1
- package/pageable-table/index.mjs +1 -1
- package/props/cascader.d.ts +326 -0
- package/{chunks/Czz_49pC.mjs → props/cascader.mjs} +8 -58
- package/props/checkbox-group.d.ts +213 -0
- package/props/checkbox-group.mjs +83 -0
- package/props/checkbox.d.ts +202 -0
- package/props/checkbox.mjs +71 -0
- package/props/col.d.ts +74 -0
- package/props/col.mjs +32 -0
- package/props/common.d.ts +114 -0
- package/props/common.mjs +18 -0
- package/props/date.d.ts +339 -0
- package/props/date.mjs +145 -0
- package/props/form-item.d.ts +144 -0
- package/props/form-item.mjs +73 -0
- package/props/form.d.ts +157 -0
- package/props/form.mjs +89 -0
- package/props/image.d.ts +102 -0
- package/props/image.mjs +10 -0
- package/props/input-cron.d.ts +102 -0
- package/props/input-cron.mjs +16 -0
- package/props/input-number.d.ts +216 -0
- package/props/input-number.mjs +72 -0
- package/props/input-tag.d.ts +123 -0
- package/props/input-tag.mjs +33 -0
- package/props/input.d.ts +299 -0
- package/props/input.mjs +97 -0
- package/props/radio-group.d.ts +205 -0
- package/props/radio-group.mjs +84 -0
- package/props/rate.d.ts +211 -0
- package/{chunks/D0kIhzQo.mjs → props/rate.mjs} +7 -28
- package/props/select.d.ts +450 -0
- package/props/select.mjs +218 -0
- package/props/slide.d.ts +235 -0
- package/{chunks/DZrQmH9Y.mjs → props/slide.mjs} +7 -28
- package/props/switch.d.ts +229 -0
- package/{chunks/ecpQ-ODX.mjs → props/switch.mjs} +7 -33
- package/props/text.d.ts +127 -0
- package/props/text.mjs +22 -0
- package/props/textarea.d.ts +266 -0
- package/{chunks/CNK4mfga.mjs → props/textarea.mjs} +19 -31
- package/props/time-select.d.ts +216 -0
- package/props/time-select.mjs +67 -0
- package/props/time.d.ts +304 -0
- package/{chunks/C3MF_-bN.mjs → props/time.mjs} +8 -39
- package/props/tree.d.ts +76 -0
- package/props/tree.mjs +75 -0
- package/sub-table/index.d.ts +3 -0
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +13 -13
- package/toolbar/index.mjs +1 -1
- 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 +2 -2
- package/year-calendar/index.mjs +1 -1
- package/year-calendar/style.css +1 -1
- package/chunks/6GcIyEQV.mjs +0 -95
- package/chunks/8c9TEVNY.mjs +0 -36
- package/chunks/AAZfNtly.mjs +0 -119
- package/chunks/BKlMENhV.mjs +0 -57
- package/chunks/BNVYEWWW.mjs +0 -57
- package/chunks/BTuzBfTA.mjs +0 -141
- package/chunks/C6Dq9Dgb.mjs +0 -17
- package/chunks/C6u76g6o.mjs +0 -158
- package/chunks/CLO5X9Lb.mjs +0 -176
- package/chunks/CdoiMj7L2.mjs +0 -39
- package/chunks/DTVTvvq-.mjs +0 -189
- package/chunks/DWE67l1f.mjs +0 -317
- package/chunks/DWMePN6q.mjs +0 -660
- package/chunks/D_L1p3vm2.mjs +0 -90
- package/chunks/Dy_5vPdP.mjs +0 -101
- package/chunks/Goee5Y-H.mjs +0 -198
- /package/chunks/{BlxLaWcU.mjs → 6av50rJm.mjs} +0 -0
- /package/chunks/{CkOD-_VV.mjs → B1MSrc6f.mjs} +0 -0
- /package/chunks/{BNqVEHk_.mjs → C-0zqLII.mjs} +0 -0
- /package/chunks/{xq_LR6R2.mjs → CI1ehQi5.mjs} +0 -0
- /package/chunks/{DcTVYqeJ.mjs → DuOxL6xh.mjs} +0 -0
- /package/chunks/{CXsoKP22.mjs → mekxD3ef.mjs} +0 -0
package/chunks/DWE67l1f.mjs
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
import { n as e, o as t } from "./BvKUeniN.mjs";
|
|
2
|
-
import { n } from "./C6Dq9Dgb.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
|
-
//#region src/components/form/props/select.ts
|
|
8
|
-
var m = {
|
|
9
|
-
...n,
|
|
10
|
-
modelValue: [
|
|
11
|
-
String,
|
|
12
|
-
Number,
|
|
13
|
-
Boolean,
|
|
14
|
-
Object,
|
|
15
|
-
Array
|
|
16
|
-
],
|
|
17
|
-
multiple: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
},
|
|
21
|
-
options: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default: () => []
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
type: Object,
|
|
27
|
-
default: () => ({
|
|
28
|
-
label: "label",
|
|
29
|
-
value: "value"
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
valueKey: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "value"
|
|
35
|
-
},
|
|
36
|
-
size: String,
|
|
37
|
-
clearable: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: !0
|
|
40
|
-
},
|
|
41
|
-
collapseTags: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: !1
|
|
44
|
-
},
|
|
45
|
-
collapseTagsTooltip: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: !1
|
|
48
|
-
},
|
|
49
|
-
tagTooltip: {
|
|
50
|
-
type: Object,
|
|
51
|
-
default: () => ({})
|
|
52
|
-
},
|
|
53
|
-
multipleLimit: {
|
|
54
|
-
type: Number,
|
|
55
|
-
default: 0
|
|
56
|
-
},
|
|
57
|
-
id: String,
|
|
58
|
-
name: String,
|
|
59
|
-
effect: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: "light"
|
|
62
|
-
},
|
|
63
|
-
autocomplete: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: "off"
|
|
66
|
-
},
|
|
67
|
-
placeholder: String,
|
|
68
|
-
filterable: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: !1
|
|
71
|
-
},
|
|
72
|
-
allowCreate: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: !1
|
|
75
|
-
},
|
|
76
|
-
filterMethod: Function,
|
|
77
|
-
remote: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: !1
|
|
80
|
-
},
|
|
81
|
-
debounce: {
|
|
82
|
-
type: Number,
|
|
83
|
-
default: 300
|
|
84
|
-
},
|
|
85
|
-
remoteMethod: Function,
|
|
86
|
-
remoteShowSuffix: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: !1
|
|
89
|
-
},
|
|
90
|
-
loading: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !1
|
|
93
|
-
},
|
|
94
|
-
loadingText: String,
|
|
95
|
-
noMatchText: String,
|
|
96
|
-
noDataText: String,
|
|
97
|
-
popperClass: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: ""
|
|
100
|
-
},
|
|
101
|
-
popperStyle: [String, Object],
|
|
102
|
-
reserveKeyword: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: !0
|
|
105
|
-
},
|
|
106
|
-
defaultFirstOption: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: !1
|
|
109
|
-
},
|
|
110
|
-
teleported: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: !0
|
|
113
|
-
},
|
|
114
|
-
appendTo: [String, Object],
|
|
115
|
-
persistent: {
|
|
116
|
-
type: Boolean,
|
|
117
|
-
default: !0
|
|
118
|
-
},
|
|
119
|
-
automaticDropdown: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: !1
|
|
122
|
-
},
|
|
123
|
-
clearIcon: [String, Object],
|
|
124
|
-
fitInputWidth: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: !1
|
|
127
|
-
},
|
|
128
|
-
suffixIcon: [String, Object],
|
|
129
|
-
tagType: {
|
|
130
|
-
type: String,
|
|
131
|
-
default: "info"
|
|
132
|
-
},
|
|
133
|
-
tagEffect: {
|
|
134
|
-
type: String,
|
|
135
|
-
default: "light"
|
|
136
|
-
},
|
|
137
|
-
validateEvent: {
|
|
138
|
-
type: Boolean,
|
|
139
|
-
default: !0
|
|
140
|
-
},
|
|
141
|
-
dropDownOffset: {
|
|
142
|
-
type: Number,
|
|
143
|
-
default: 12
|
|
144
|
-
},
|
|
145
|
-
showArrow: {
|
|
146
|
-
type: Boolean,
|
|
147
|
-
default: !0
|
|
148
|
-
},
|
|
149
|
-
placement: {
|
|
150
|
-
type: String,
|
|
151
|
-
default: "bottom-start"
|
|
152
|
-
},
|
|
153
|
-
fallbackPlacements: {
|
|
154
|
-
type: Array,
|
|
155
|
-
default: () => [
|
|
156
|
-
"bottom-start",
|
|
157
|
-
"top-start",
|
|
158
|
-
"right",
|
|
159
|
-
"left"
|
|
160
|
-
]
|
|
161
|
-
},
|
|
162
|
-
maxCollapseTags: {
|
|
163
|
-
type: Number,
|
|
164
|
-
default: 1
|
|
165
|
-
},
|
|
166
|
-
popperOptions: {
|
|
167
|
-
type: Object,
|
|
168
|
-
default: () => ({})
|
|
169
|
-
},
|
|
170
|
-
ariaLabel: String,
|
|
171
|
-
emptyValues: Array,
|
|
172
|
-
valueOnClear: [
|
|
173
|
-
String,
|
|
174
|
-
Number,
|
|
175
|
-
Boolean,
|
|
176
|
-
Function
|
|
177
|
-
],
|
|
178
|
-
suffixTransition: {
|
|
179
|
-
type: Boolean,
|
|
180
|
-
default: !0
|
|
181
|
-
},
|
|
182
|
-
tabindex: [String, Number],
|
|
183
|
-
dictType: String,
|
|
184
|
-
gender: Boolean,
|
|
185
|
-
year: [Boolean, Number],
|
|
186
|
-
all: Boolean,
|
|
187
|
-
confirm: Boolean,
|
|
188
|
-
start: Number,
|
|
189
|
-
end: Number,
|
|
190
|
-
optionLabel: [String, Number],
|
|
191
|
-
emitLabel: Boolean,
|
|
192
|
-
english: Boolean,
|
|
193
|
-
chinese: Boolean,
|
|
194
|
-
typing: Boolean,
|
|
195
|
-
multipleStringMode: Boolean,
|
|
196
|
-
multipleStringSeparator: {
|
|
197
|
-
type: String,
|
|
198
|
-
default: ","
|
|
199
|
-
}
|
|
200
|
-
}, h = {
|
|
201
|
-
modelValue: !0,
|
|
202
|
-
emptyValues: !0,
|
|
203
|
-
disabled: !0,
|
|
204
|
-
dropDownOffset: !0,
|
|
205
|
-
valueOnClear: !0,
|
|
206
|
-
options: !0,
|
|
207
|
-
dictType: !0,
|
|
208
|
-
gender: !0,
|
|
209
|
-
year: !0,
|
|
210
|
-
all: !0,
|
|
211
|
-
confirm: !0,
|
|
212
|
-
start: !0,
|
|
213
|
-
end: !0,
|
|
214
|
-
optionLabel: !0,
|
|
215
|
-
emitLabel: !0,
|
|
216
|
-
english: !0,
|
|
217
|
-
chinese: !0,
|
|
218
|
-
typing: !0,
|
|
219
|
-
multipleStringMode: !0,
|
|
220
|
-
multipleStringSeparator: !0
|
|
221
|
-
}, g = (e) => n[e] === void 0 && h[e] !== !0, _ = {
|
|
222
|
-
name: "FormSelect",
|
|
223
|
-
inheritAttrs: !1,
|
|
224
|
-
props: { ...m },
|
|
225
|
-
emits: { ...e },
|
|
226
|
-
setup(e, { emit: n, slots: m, attrs: h }) {
|
|
227
|
-
let { emitInput: _, render: v, placeholder: y, disabled: b, listeners: x, inputProps: S } = t(e, {
|
|
228
|
-
emit: n,
|
|
229
|
-
slots: m,
|
|
230
|
-
attrs: h,
|
|
231
|
-
predicate: g,
|
|
232
|
-
messagePrefix: "请选择"
|
|
233
|
-
}), C = u(null), w = u(!1);
|
|
234
|
-
d(() => {
|
|
235
|
-
if (e.multiple && e.multipleStringMode) {
|
|
236
|
-
var t;
|
|
237
|
-
C.value = (t = e.modelValue) == null ? void 0 : t.split(",").filter((e) => e);
|
|
238
|
-
} else C.value = e.modelValue;
|
|
239
|
-
});
|
|
240
|
-
let T = (t) => {
|
|
241
|
-
if (e.multiple && e.multipleStringMode ? _(t.join(e.multipleStringSeparator)) : _(t), e.emitLabel) {
|
|
242
|
-
let r = O.value.find((n) => n[e.props.value] === t), i = r == null ? void 0 : r[e.props.label];
|
|
243
|
-
i !== e.optionLabel && n("update:optionLabel", i);
|
|
244
|
-
}
|
|
245
|
-
}, { dictItems: E } = r(e), D = u([]), O = s(() => {
|
|
246
|
-
if (e.dictType) return E.value;
|
|
247
|
-
if (e.remote) return D.value;
|
|
248
|
-
if (e.gender) return [{
|
|
249
|
-
[e.props.label]: "男",
|
|
250
|
-
[e.props.value]: e.chinese ? "男" : e.typing ? 1 : "1"
|
|
251
|
-
}, {
|
|
252
|
-
[e.props.label]: "女",
|
|
253
|
-
[e.props.value]: e.chinese ? "女" : e.typing ? 2 : "2"
|
|
254
|
-
}];
|
|
255
|
-
if (e.confirm) return [{
|
|
256
|
-
[e.props.label]: "是",
|
|
257
|
-
[e.props.value]: e.chinese ? "是" : e.english ? "Y" : e.typing ? 1 : "1"
|
|
258
|
-
}, {
|
|
259
|
-
[e.props.label]: "否",
|
|
260
|
-
[e.props.value]: e.chinese ? "否" : e.english ? "N" : e.typing ? 0 : "0"
|
|
261
|
-
}];
|
|
262
|
-
if (e.all) return [{
|
|
263
|
-
[e.props.value]: "",
|
|
264
|
-
[e.props.label]: "全部"
|
|
265
|
-
}, ...e.options];
|
|
266
|
-
if (e.start && e.end) return Array(e.end - e.start + 1).fill(1).map((t, n) => ({
|
|
267
|
-
[e.props.label]: e.start + n,
|
|
268
|
-
[e.props.value]: e.start + n
|
|
269
|
-
}));
|
|
270
|
-
if (e.year) {
|
|
271
|
-
let t = (/* @__PURE__ */ new Date()).getFullYear(), n = [], r = 10;
|
|
272
|
-
i(e.year) && (r = e.year);
|
|
273
|
-
for (let i = -r; i <= r; i++) {
|
|
274
|
-
let r = t + i;
|
|
275
|
-
n.push({
|
|
276
|
-
[e.props.label]: r,
|
|
277
|
-
[e.props.value]: r
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
return n;
|
|
281
|
-
}
|
|
282
|
-
return e.options ? e.options.map((t) => (t[e.props.value] = t[e.props.value] ?? t[e.props.label], t)) : [];
|
|
283
|
-
}), k = async (t) => {
|
|
284
|
-
try {
|
|
285
|
-
var n;
|
|
286
|
-
w.value = !0;
|
|
287
|
-
let r = await e.remoteMethod(t, e.prop);
|
|
288
|
-
((n = r.data.data) == null ? void 0 : n.length) >= 0 ? o(r.data.data[0]) ? D.value = r.data.data.map((t) => ({
|
|
289
|
-
[e.props.value]: t,
|
|
290
|
-
[e.props.label]: t
|
|
291
|
-
})) : a(r.data.data[0]) && (D.value = r.data.data) : D.value = [];
|
|
292
|
-
} catch {}
|
|
293
|
-
w.value = !1;
|
|
294
|
-
};
|
|
295
|
-
return d(() => {
|
|
296
|
-
e.remote && k();
|
|
297
|
-
}), () => v({ vNodes: c(p, l(x.value, S.value, {
|
|
298
|
-
offset: e.dropDownOffset,
|
|
299
|
-
"model-value": C.value,
|
|
300
|
-
"onUpdate:modelValue": T,
|
|
301
|
-
disabled: b.value,
|
|
302
|
-
placeholder: y.value
|
|
303
|
-
}), {
|
|
304
|
-
...m,
|
|
305
|
-
default: m.default || (() => {
|
|
306
|
-
var e;
|
|
307
|
-
return (e = O.value) == null ? void 0 : e.map(({ value: e, label: t }) => c(f, {
|
|
308
|
-
key: e,
|
|
309
|
-
label: t,
|
|
310
|
-
value: e
|
|
311
|
-
}, null));
|
|
312
|
-
})
|
|
313
|
-
}) });
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
//#endregion
|
|
317
|
-
export { _ as t };
|