@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta51
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 +60 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/base.css +1 -1
- package/chunks/6yfBZFOB.mjs +56 -0
- package/chunks/B1IPSTA6.mjs +198 -0
- package/chunks/B9gA65rt2.mjs +38 -0
- package/chunks/BBERmTup.mjs +83 -0
- package/chunks/BG8z3V9d2.mjs +643 -0
- package/chunks/BQk3-Ppb2.mjs +146 -0
- package/chunks/BQyL45PF2.mjs +207 -0
- package/chunks/BWh6u1O0.mjs +660 -0
- package/chunks/BbSPWDDZ.mjs +100 -0
- package/chunks/BfxDxIg0.mjs +106 -0
- package/chunks/BqWvBF14.mjs +35 -0
- package/chunks/BsZgAJX_2.mjs +81 -0
- package/chunks/BtcjAHE6.mjs +317 -0
- package/chunks/Bwbtu2cp.mjs +194 -0
- package/chunks/ByHz4mmh.mjs +87 -0
- package/chunks/C2zgFLYO.mjs +185 -0
- package/chunks/C7G-cAoI.mjs +1361 -0
- package/chunks/CAd1zK9Q.mjs +25 -0
- package/chunks/CJdkjadi.mjs +17 -0
- package/chunks/CXsoKP22.mjs +86 -0
- package/chunks/CabldOLo.mjs +157 -0
- package/chunks/CkOD-_VV.mjs +8 -0
- package/chunks/CqVd8D222.mjs +89 -0
- package/chunks/CuAoMR3n.mjs +105 -0
- package/chunks/DA7oGHSX.mjs +141 -0
- package/chunks/DKwp6AMl.mjs +168 -0
- package/chunks/DOP3aBxf.mjs +93 -0
- package/chunks/DOZRzqlo.mjs +37 -0
- package/chunks/D_Fs3bkZ.mjs +57 -0
- package/chunks/D_qiRmiE.mjs +230 -0
- package/chunks/DcTVYqeJ.mjs +113 -0
- package/chunks/Dt3lfDnL.mjs +166 -0
- package/chunks/GI8krYU82.mjs +478 -0
- package/chunks/V2p-PCpL.mjs +176 -0
- package/chunks/YFiU0ngn.mjs +622 -0
- package/chunks/bFbPPcdq.mjs +25 -0
- package/chunks/eae6huQB.mjs +25 -0
- package/chunks/gCeDFHo1.mjs +32 -0
- package/chunks/gLPy4Sus.mjs +164 -0
- package/chunks/hlha6Bhc.mjs +107 -0
- package/chunks/pIzhYsBe.mjs +93 -0
- package/chunks/wDS9KBFw.mjs +67 -0
- package/chunks/wXeqV-_7.mjs +89 -0
- package/confirm-button/index.d.ts +122 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +93 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +54 -0
- package/constants/index.mjs +4 -0
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- 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 +337 -16
- package/element-dialog/index.mjs +2 -91
- package/element-resize-observer/index.d.ts +8 -0
- package/element-resize-observer/index.mjs +40 -0
- package/element-resize-observer/style.css +1 -0
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.mjs +13 -12
- package/form-button/index.d.ts +123 -0
- package/form-button/index.mjs +36 -0
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +472 -0
- package/form-cascader/index.mjs +2 -0
- package/form-checkbox/index.d.ts +236 -16
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +364 -0
- package/form-checkbox-group/index.mjs +2 -0
- package/form-checkbox-group/style.css +1 -0
- package/form-date-picker/index.d.ts +390 -19
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +87 -20
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +145 -13
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +301 -20
- package/form-input/index.mjs +1 -1
- package/form-input/style.css +1 -0
- package/form-input-cron-expression/index.d.ts +217 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +307 -16
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +307 -16
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +246 -18
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +307 -16
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-config-provider/index.d.ts +22 -0
- package/form-item-config-provider/index.mjs +24 -0
- package/form-item-group/index.d.ts +91 -17
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.d.ts +141 -11
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -0
- package/form-radio-group/index.d.ts +303 -16
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +254 -14
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +537 -18
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +283 -16
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +272 -14
- package/form-switch/index.mjs +1 -1
- package/form-table/index.d.ts +269 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.d.ts +165 -13
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +351 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/form-view/index.mjs +1 -1
- package/helper/dictionary.d.ts +15 -0
- package/helper/dictionary.mjs +97 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/index.css +2 -0
- package/index.d.ts +57 -36
- package/index.mjs +59 -61
- package/package.json +10 -5
- package/pageable-table/index.d.ts +400 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/resolver/index.mjs +29 -0
- package/sub-table/index.d.ts +100 -0
- package/sub-table/index.mjs +537 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +100 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/table-column/index.d.ts +160 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +95 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +341 -1
- package/table-view/index.mjs +457 -6
- package/table-view/style.css +1 -0
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +188 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +228 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/B4M_TFeR.mjs +0 -152
- package/chunks/B5BIQCcK.mjs +0 -149
- package/chunks/BHNKrW1j.mjs +0 -61
- package/chunks/BO9jWhBl.mjs +0 -46
- package/chunks/BZ8aOa78.mjs +0 -35
- package/chunks/Bsz7y4Xp.mjs +0 -73
- package/chunks/Bxj372sF.mjs +0 -53
- package/chunks/C33EmJN8.mjs +0 -32
- package/chunks/C6Li3-l7.mjs +0 -28
- package/chunks/CBcdalMX.mjs +0 -35
- package/chunks/CdRsyF0n.mjs +0 -43
- package/chunks/ClNahmiU.mjs +0 -23
- package/chunks/CstztYMu.mjs +0 -28
- package/chunks/DC9b53M6.mjs +0 -32
- package/chunks/DDVAgRED.mjs +0 -36
- package/chunks/DpJQABVD.mjs +0 -91
- package/chunks/ZsLNWI9x.mjs +0 -46
- package/chunks/jn_iQrVZ.mjs +0 -28
- package/constants.d.ts +0 -1
- package/constants.mjs +0 -4
- package/form-check-box-group/index.d.ts +0 -93
- package/form-check-box-group/index.mjs +0 -2
- package/input/style.css +0 -1
- package/resolver.mjs +0 -79
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { i as e, n as t } from "./D_qiRmiE.mjs";
|
|
2
|
+
import { n } from "./CJdkjadi.mjs";
|
|
3
|
+
import { useDictionary as r } from "../hook/useDictionary.mjs";
|
|
4
|
+
import { t as i } from "./CabldOLo.mjs";
|
|
5
|
+
import { computed as a, createVNode as o, defineComponent as s, isVNode as c, mergeProps as l, useModel as u } from "vue";
|
|
6
|
+
import { ElCheckbox as d, ElCheckboxButton as f, ElCheckboxGroup as p } from "element-plus/es";
|
|
7
|
+
//#region src/components/form/props/checkbox-group.ts
|
|
8
|
+
var m = {
|
|
9
|
+
...n,
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: [Array, String],
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
size: String,
|
|
15
|
+
min: Number,
|
|
16
|
+
max: Number,
|
|
17
|
+
ariaLabel: String,
|
|
18
|
+
textColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "#ffffff"
|
|
21
|
+
},
|
|
22
|
+
fill: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "#409eff"
|
|
25
|
+
},
|
|
26
|
+
tag: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "div"
|
|
29
|
+
},
|
|
30
|
+
validateEvent: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
options: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default: () => []
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => ({
|
|
41
|
+
value: "value",
|
|
42
|
+
label: "label",
|
|
43
|
+
disabled: "disabled"
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "checkbox"
|
|
49
|
+
},
|
|
50
|
+
stringMode: Boolean,
|
|
51
|
+
delimiter: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ","
|
|
54
|
+
},
|
|
55
|
+
other: [String],
|
|
56
|
+
otherVal: [String],
|
|
57
|
+
otherProp: String,
|
|
58
|
+
otherPlaceholder: String,
|
|
59
|
+
otherLabel: String,
|
|
60
|
+
otherWidth: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "200px"
|
|
63
|
+
},
|
|
64
|
+
otherMaxLength: String,
|
|
65
|
+
gender: Boolean,
|
|
66
|
+
confirm: Boolean,
|
|
67
|
+
labelProp: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "name"
|
|
70
|
+
},
|
|
71
|
+
valueProp: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "code"
|
|
74
|
+
},
|
|
75
|
+
split: Boolean,
|
|
76
|
+
sort: Boolean,
|
|
77
|
+
classic: Boolean,
|
|
78
|
+
fillRow: Boolean,
|
|
79
|
+
ellipsis: Boolean,
|
|
80
|
+
dictType: String
|
|
81
|
+
}, h = {
|
|
82
|
+
modelValue: !0,
|
|
83
|
+
type: !0,
|
|
84
|
+
disabled: !0,
|
|
85
|
+
options: !0
|
|
86
|
+
}, g = (e) => n[e] === void 0 && h[e] !== !0;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/components/form/FormCheckboxGroup.vue?vue&type=script&lang.jsx
|
|
89
|
+
function _(e) {
|
|
90
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/components/form/FormCheckboxGroup.vue
|
|
94
|
+
var v = /* @__PURE__ */ s({
|
|
95
|
+
name: "FormCheckboxGroup",
|
|
96
|
+
inheritAttrs: !1,
|
|
97
|
+
props: { ...m },
|
|
98
|
+
emits: {
|
|
99
|
+
...t,
|
|
100
|
+
"update:other": null
|
|
101
|
+
},
|
|
102
|
+
setup(t, { emit: n, slots: s, attrs: c }) {
|
|
103
|
+
let m = u(t, "other"), { emitInput: h, render: v, disabled: y, listeners: b, inputProps: x } = e(t, {
|
|
104
|
+
emit: n,
|
|
105
|
+
slots: s,
|
|
106
|
+
attrs: c,
|
|
107
|
+
predicate: g,
|
|
108
|
+
messagePrefix: "请选择",
|
|
109
|
+
class: a(() => ["form-checkbox-group", {
|
|
110
|
+
"form-checkbox-group-row": t.fillRow,
|
|
111
|
+
"form-checkbox-group-row-break-word": t.fillRow,
|
|
112
|
+
"form-checkbox-group-row-ellipsis": t.ellipsis
|
|
113
|
+
}])
|
|
114
|
+
}), S = (e) => {
|
|
115
|
+
let n = e;
|
|
116
|
+
t.sort && (n = e.sort()), t.stringMode || t.split ? h(n.join(",")) : h(n);
|
|
117
|
+
}, C = a(() => {
|
|
118
|
+
if (t.stringMode || t.split) {
|
|
119
|
+
var e;
|
|
120
|
+
return Array.isArray(t.modelValue) ? t.modelValue.filter((e) => e) : ((e = t.modelValue) == null ? void 0 : e.split(t.delimiter).filter((e) => e)) ?? [];
|
|
121
|
+
}
|
|
122
|
+
return t.modelValue || [];
|
|
123
|
+
}), w = a(() => t.classic ? "label" : t.labelProp), T = a(() => t.classic ? "value" : t.valueProp), { dictItems: E } = r(t), D = a(() => t.dictType ? E.value : t.gender ? [{
|
|
124
|
+
[w.value]: "男",
|
|
125
|
+
[T.value]: "男"
|
|
126
|
+
}, {
|
|
127
|
+
[w.value]: "女",
|
|
128
|
+
[T.value]: "女"
|
|
129
|
+
}] : t.confirm ? [{
|
|
130
|
+
[w.value]: "是",
|
|
131
|
+
[T.value]: "是"
|
|
132
|
+
}, {
|
|
133
|
+
[w.value]: "否",
|
|
134
|
+
[T.value]: "否"
|
|
135
|
+
}] : t.options);
|
|
136
|
+
return () => v({ vNodes: [o(p, l(b.value, x.value, {
|
|
137
|
+
modelValue: C.value,
|
|
138
|
+
disabled: y.value,
|
|
139
|
+
"onUpdate:modelValue": S
|
|
140
|
+
}), {
|
|
141
|
+
...s,
|
|
142
|
+
default: s.default || (() => {
|
|
143
|
+
var e;
|
|
144
|
+
return (e = D.value) == null ? void 0 : e.map(({ value: e, label: n, disabled: r }) => t.type === "button" ? o(f, {
|
|
145
|
+
key: e,
|
|
146
|
+
value: e,
|
|
147
|
+
disabled: r
|
|
148
|
+
}, _(n) ? n : { default: () => [n] }) : o(d, {
|
|
149
|
+
key: e,
|
|
150
|
+
value: e,
|
|
151
|
+
disabled: r
|
|
152
|
+
}, _(n) ? n : { default: () => [n] }));
|
|
153
|
+
})
|
|
154
|
+
}), C.value.includes(t.otherVal) ? o(i, {
|
|
155
|
+
"wrap-col": !1,
|
|
156
|
+
class: "form-checkbox-group-other",
|
|
157
|
+
"hide-label": !0,
|
|
158
|
+
"label-width": "0",
|
|
159
|
+
prop: t.otherProp,
|
|
160
|
+
disabled: y.value,
|
|
161
|
+
required: !!t.otherProp,
|
|
162
|
+
placeholder: t.otherPlaceholder,
|
|
163
|
+
label: t.otherLabel,
|
|
164
|
+
"show-message": !!t.otherLabel,
|
|
165
|
+
style: t.otherLabel ? { width: t.otherWidth } : {
|
|
166
|
+
marginBottom: 0,
|
|
167
|
+
width: t.otherWidth
|
|
168
|
+
},
|
|
169
|
+
modelValue: m.value,
|
|
170
|
+
"onUpdate:modelValue": (e) => m.value = e,
|
|
171
|
+
"max-length": t.otherMaxLength
|
|
172
|
+
}, null) : null] });
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//#endregion
|
|
176
|
+
export { v as t };
|