@das-fed/upf-ui 6.4.0-dev.132 → 6.4.0-dev.134
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/package.json +5 -5
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +8 -2
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +8 -2
- package/packages/components/button/index.d.ts +3 -0
- package/packages/components/button/index.js +276 -283
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/src/Index.vue.d.ts +1 -0
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/cascader/index.d.ts +9 -9
- package/packages/components/cascader/index.js +110 -100
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/src/Index.vue.d.ts +1 -1
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.js +355 -334
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/src/Index.vue.d.ts +5 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/color-picker/index.js +42 -41
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/date-picker/index.js +503 -486
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/edit-table/index.js +1 -1
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/error-overlay-model/index.js +15 -15
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form/hooks/use-form-size.d.ts +3 -0
- package/packages/components/form/index.d.ts +12 -2
- package/packages/components/form/index.js +62 -69
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form/src/Index.vue.d.ts +9 -0
- package/packages/components/form/src/type.d.ts +3 -0
- package/packages/components/form/style.css +1 -1
- package/packages/components/form-item/index.js +1110 -1082
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/src/hooks/use-form.d.ts +13 -3
- package/packages/components/form-item/src/type.d.ts +6 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/input/index.js +399 -215
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/constants.d.ts +17 -0
- package/packages/components/input/src/hooks/use-overflow-tip.d.ts +13 -0
- package/packages/components/input/src/type.d.ts +9 -9
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +74 -66
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-dialog-select/style.css +1 -1
- package/packages/components/input-dialog-select/style.css.gz +0 -0
- package/packages/components/input-number/index.js +76 -70
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/message/index.js +1 -1
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/message/style.css +1 -1
- package/packages/components/message/style.css.gz +0 -0
- package/packages/components/radio/index.js +116 -103
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/radio/src/Index.vue.d.ts +5 -0
- package/packages/components/radio/style.css +1 -1
- package/packages/components/radio/style.css.gz +0 -0
- package/packages/components/select/index.js +92 -88
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +39 -37
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-input/style.css +1 -1
- package/packages/components/select-input/style.css.gz +0 -0
- package/packages/components/split-panel/index.js +209 -193
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/split-panel/style.css +1 -1
- package/packages/components/split-panel/style.css.gz +0 -0
- package/packages/components/switch/index.js +45 -29
- package/packages/components/switch/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.js +1944 -1932
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +12 -9
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tree-select/index.js +1 -1
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/upload/index.js +3 -2
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/style.css +1 -1
- package/packages/components/upload/style.css.gz +0 -0
- package/packages/components/upload/theme/index.d.ts +3 -0
- package/packages/components/form-item/src/hooks/useFormLabelWidth.d.ts +0 -6
- package/packages/components/input/index.d.ts +0 -124
- package/packages/components/input/src/index.vue.d.ts +0 -49
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/checkbox/style.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
import { CheckboxGroup as
|
|
2
|
+
import { defineComponent as ae, computed as m, reactive as le, toRefs as oe, watchEffect as te, watch as se, useSlots as ue, ref as Q, onMounted as re, createElementBlock as u, openBlock as o, normalizeStyle as y, createBlock as W, createCommentVNode as c, unref as r, mergeProps as U, isRef as A, withCtx as M, withDirectives as g, renderSlot as C, normalizeClass as n, Fragment as $, renderList as B, createElementVNode as j, createTextVNode as N, toDisplayString as p, createVNode as G } from "vue";
|
|
3
|
+
import { withInstall as ie } from "@das-fed/upf-utils/with-install/index";
|
|
4
|
+
import { CheckboxGroup as de } from "ant-design-vue/es";
|
|
5
5
|
import "ant-design-vue/es/checkbox/style/css";
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { DasAutoRegisterIcon as
|
|
6
|
+
import { Checkbox as H } from "ant-design-vue";
|
|
7
|
+
import { DasAutoRegisterIcon as ce, DasIcon as J } from "@das-fed/upf-ui/packages/components/icon/index";
|
|
8
8
|
import { vDasTooltip as x } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
9
|
-
import { useModelValue as
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { useModelValue as K } from "@das-fed/upf-utils/vue";
|
|
10
|
+
import { useFormSize as ne } from "@das-fed/upf-ui/packages/components/form";
|
|
11
|
+
import { setThemeRule as fe } from "@das-fed/upf-web/packages/theme/index";
|
|
12
|
+
const he = { class: "label" }, be = ["onClick", "onBlur", "tabindex"], pe = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "square-select-icon"
|
|
14
|
-
},
|
|
15
|
+
}, ve = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "empty-text"
|
|
17
|
-
},
|
|
18
|
+
}, ke = ["onClick", "tabindex"], me = {
|
|
18
19
|
key: 6,
|
|
19
20
|
class: "das-checkbox-error-label-content"
|
|
20
|
-
},
|
|
21
|
+
}, ye = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "das-input-error-label"
|
|
23
|
-
},
|
|
24
|
+
}, ge = {
|
|
24
25
|
key: 7,
|
|
25
26
|
class: "das-checkbox-overlay-error-label-content"
|
|
26
|
-
},
|
|
27
|
+
}, xe = { class: "label" }, Te = /* @__PURE__ */ ae({
|
|
27
28
|
__name: "Index",
|
|
28
29
|
props: {
|
|
29
30
|
modelValue: { default: null },
|
|
@@ -50,371 +51,391 @@ const de = { class: "das-ui-checkbox" }, ce = { class: "label" }, ne = ["onClick
|
|
|
50
51
|
noSetDefaultVal: { type: Boolean, default: !1 }
|
|
51
52
|
},
|
|
52
53
|
emits: ["change", "update:modelValue", "update:indeterminate"],
|
|
53
|
-
setup(T, { emit:
|
|
54
|
-
|
|
54
|
+
setup(T, { emit: S }) {
|
|
55
|
+
ce({
|
|
55
56
|
select: import("@das-fed/upf-ui/packages/icons/select")
|
|
56
57
|
});
|
|
57
|
-
const
|
|
58
|
+
const t = T, z = m(() => t.noSetDefaultVal ? "" : "-"), D = le({
|
|
58
59
|
checkboxValue: null,
|
|
59
60
|
isFocus: !1,
|
|
60
61
|
checkboxLayout: "",
|
|
61
62
|
checkboxIndeterminate: !1
|
|
62
63
|
});
|
|
63
|
-
let { checkboxValue:
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}),
|
|
64
|
+
let { checkboxValue: s, isFocus: F, checkboxIndeterminate: v } = oe(D);
|
|
65
|
+
const I = t.layout, k = S;
|
|
66
|
+
te(() => {
|
|
67
|
+
s.value = t.modelValue, v.value = t.indeterminate, t.checkboxType == "default" && t.optionType == "default" && t.modelValue && (v.value = !1);
|
|
68
|
+
}), se(s, (e) => {
|
|
68
69
|
k("update:modelValue", e);
|
|
69
70
|
});
|
|
70
|
-
const f =
|
|
71
|
+
const f = K(t, "defaultProps"), V = K(t, "options"), h = m(() => V.value.length ? V.value.map((e) => {
|
|
71
72
|
var l;
|
|
72
73
|
return {
|
|
73
74
|
value: e[f.value.value],
|
|
74
75
|
label: e[f.value.label],
|
|
75
76
|
disabled: e.disabled,
|
|
76
77
|
isFocus: !1,
|
|
77
|
-
checked: (l =
|
|
78
|
+
checked: (l = t.modelValue) == null ? void 0 : l.includes(e[f.value.value]),
|
|
78
79
|
mutual: e.mutual
|
|
79
80
|
};
|
|
80
|
-
}) : []),
|
|
81
|
-
v && (v.value = !1, k("update:indeterminate", v.value), k("update:modelValue",
|
|
82
|
-
},
|
|
83
|
-
if (!
|
|
81
|
+
}) : []), O = () => {
|
|
82
|
+
v && (v.value = !1, k("update:indeterminate", v.value), k("update:modelValue", s.value)), k("change", s.value);
|
|
83
|
+
}, X = t.disabled, Y = h.value.some((e) => !!e.mutual), L = (e, l) => {
|
|
84
|
+
if (!X)
|
|
84
85
|
if (e == "group") {
|
|
85
86
|
if (l.disabled) return;
|
|
86
|
-
|
|
87
|
+
Y ? l.mutual ? (h.value.forEach((i) => {
|
|
87
88
|
i.checked = !1;
|
|
88
|
-
}), l.checked = !0) : (l.checked = !l.checked,
|
|
89
|
-
i.mutual && (i.checked = !
|
|
90
|
-
})) : l.checked = !l.checked, l.isFocus = !0,
|
|
89
|
+
}), l.checked = !0) : (l.checked = !l.checked, h.value.forEach((i) => {
|
|
90
|
+
i.mutual && (i.checked = !h.value.some((a) => a.checked));
|
|
91
|
+
})) : l.checked = !l.checked, l.isFocus = !0, s.value = h.value.filter((i) => i.checked).map((i) => i.value), k("change", s.value);
|
|
91
92
|
} else
|
|
92
|
-
|
|
93
|
-
},
|
|
93
|
+
s.value = !s.value, F.value = !0, k("change", s.value);
|
|
94
|
+
}, R = m(() => {
|
|
94
95
|
var e, l, i;
|
|
95
|
-
if (!
|
|
96
|
-
if ((!((e = V.value) != null && e.length) || !((l =
|
|
97
|
-
if (
|
|
96
|
+
if (!t.isView) return [];
|
|
97
|
+
if ((!((e = V.value) != null && e.length) || !((l = s.value) != null && l.length)) && t.checkboxType == "group") return [];
|
|
98
|
+
if (t.checkboxType == "group")
|
|
98
99
|
return V.value.filter((a) => {
|
|
99
|
-
if (
|
|
100
|
+
if (s.value.includes(a[f.value.value]))
|
|
100
101
|
return a;
|
|
101
102
|
});
|
|
102
103
|
{
|
|
103
|
-
if (!
|
|
104
|
-
const a =
|
|
104
|
+
if (!s.value) return [];
|
|
105
|
+
const a = ue();
|
|
105
106
|
let d = null;
|
|
106
107
|
return a && a.default && ((i = a.default()) == null ? void 0 : i.length) == 0 && (d = a.default()[0].children), [
|
|
107
108
|
{
|
|
108
|
-
value:
|
|
109
|
+
value: s.value,
|
|
109
110
|
label: d
|
|
110
111
|
}
|
|
111
112
|
];
|
|
112
113
|
}
|
|
113
|
-
}),
|
|
114
|
-
e == "group" ? l.isFocus = !1 :
|
|
115
|
-
},
|
|
116
|
-
let e = `${Number(String(
|
|
117
|
-
if (
|
|
114
|
+
}), P = (e, l) => {
|
|
115
|
+
e == "group" ? l.isFocus = !1 : F.value = !1;
|
|
116
|
+
}, Z = m(() => t.maxWidth ? t.maxWidth : t.width), b = m(() => {
|
|
117
|
+
let e = `${Number(String(Z.value).split("px")[0])}`;
|
|
118
|
+
if (t.maxWidth)
|
|
118
119
|
return `max-width:${e}px`;
|
|
119
|
-
if (
|
|
120
|
-
return Number(e) > 72 &&
|
|
121
|
-
}),
|
|
122
|
-
return se(() => {
|
|
120
|
+
if (t.width)
|
|
121
|
+
return Number(e) > 72 && t.maxWidth ? `width:${e};max-width:${e}px;` : `width:${e}px`;
|
|
122
|
+
}), E = Q(null), _ = () => {
|
|
123
123
|
setTimeout(() => {
|
|
124
124
|
var l, i;
|
|
125
|
-
const e = (i = (l =
|
|
125
|
+
const e = (i = (l = E.value) == null ? void 0 : l.$el) == null ? void 0 : i.querySelectorAll(".ant-checkbox-input");
|
|
126
126
|
e && e.length && e.forEach((a) => a.setAttribute("tabindex", "-1"));
|
|
127
127
|
}, 1e3);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
key: 1,
|
|
167
|
-
class: n([
|
|
168
|
-
"das-ui-checkbox-square",
|
|
169
|
-
e.size,
|
|
170
|
-
{
|
|
171
|
-
"das-ui-checkbox-square--disabled": e.disabled,
|
|
172
|
-
"das-ui-checkbox-square--checked": !!r(t),
|
|
173
|
-
"das-ui-checkbox-square--focus": r(S),
|
|
174
|
-
"ellipsis-square-checkbox": !!h.value
|
|
175
|
-
}
|
|
176
|
-
]),
|
|
177
|
-
tabindex: "0",
|
|
178
|
-
onClick: l[1] || (l[1] = (a) => I("default", "")),
|
|
179
|
-
onBlur: l[2] || (l[2] = (a) => O("default", "")),
|
|
180
|
-
style: g(h.value)
|
|
181
|
-
},
|
|
182
|
-
[
|
|
183
|
-
y((o(), u("div", ce, [
|
|
184
|
-
w(e.$slots, "default", {}, void 0, !0)
|
|
185
|
-
])), [
|
|
186
|
-
[r(x)]
|
|
187
|
-
])
|
|
188
|
-
],
|
|
189
|
-
38
|
|
190
|
-
/* CLASS, STYLE, NEED_HYDRATION */
|
|
191
|
-
)) : c("v-if", !0),
|
|
192
|
-
e.checkboxType == "group" && e.optionType == "default" && !e.isView ? (o(), E(i, P({
|
|
193
|
-
key: 2,
|
|
194
|
-
ref_key: "checkboxRef",
|
|
195
|
-
ref: R
|
|
196
|
-
}, e.$attrs, {
|
|
197
|
-
class: [e.size, { "das-ui-checkbox-vertical": r(z) == "vertical" }],
|
|
198
|
-
value: r(t),
|
|
199
|
-
"onUpdate:value": l[3] || (l[3] = (a) => U(t) ? t.value = a : t = a),
|
|
200
|
-
name: e.name,
|
|
201
|
-
onChange: N
|
|
202
|
-
}), {
|
|
203
|
-
default: W(() => [
|
|
204
|
-
(o(!0), u(
|
|
205
|
-
C,
|
|
206
|
-
null,
|
|
207
|
-
$(b.value, (a, d) => (o(), E(r(G), {
|
|
208
|
-
key: d,
|
|
209
|
-
value: a.value,
|
|
210
|
-
"onUpdate:value": (q) => a.value = q,
|
|
211
|
-
disabled: a.disabled || e.disabled
|
|
212
|
-
}, {
|
|
213
|
-
default: W(() => [
|
|
214
|
-
A(
|
|
215
|
-
"div",
|
|
216
|
-
{
|
|
217
|
-
class: n(["label", { "label-min-width": !!h.value }]),
|
|
218
|
-
style: g([h.value, { color: "#666" }])
|
|
219
|
-
},
|
|
220
|
-
[
|
|
221
|
-
w(e.$slots, "content", {
|
|
222
|
-
item: a,
|
|
223
|
-
index: d
|
|
224
|
-
}, () => [
|
|
225
|
-
y((o(), u("div", null, [
|
|
226
|
-
M(
|
|
227
|
-
p(a.label),
|
|
228
|
-
1
|
|
229
|
-
/* TEXT */
|
|
230
|
-
)
|
|
231
|
-
])), [
|
|
232
|
-
[r(x)]
|
|
233
|
-
])
|
|
234
|
-
], !0)
|
|
235
|
-
],
|
|
236
|
-
6
|
|
237
|
-
/* CLASS, STYLE */
|
|
238
|
-
)
|
|
239
|
-
]),
|
|
240
|
-
_: 2
|
|
241
|
-
/* DYNAMIC */
|
|
242
|
-
}, 1032, ["value", "onUpdate:value", "disabled"]))),
|
|
243
|
-
128
|
|
244
|
-
/* KEYED_FRAGMENT */
|
|
245
|
-
))
|
|
246
|
-
]),
|
|
247
|
-
_: 3
|
|
248
|
-
/* FORWARDED */
|
|
249
|
-
}, 16, ["class", "value", "name"])) : c("v-if", !0),
|
|
250
|
-
e.checkboxType == "group" && e.optionType == "square" && !e.isView ? (o(), u(
|
|
251
|
-
"div",
|
|
252
|
-
{
|
|
253
|
-
key: 3,
|
|
254
|
-
class: n(["das-ui-checkbox-square-group", [e.size, { "das-ui-checkbox-vertical": r(z) == "vertical" }]])
|
|
255
|
-
},
|
|
256
|
-
[
|
|
257
|
-
(o(!0), u(
|
|
258
|
-
C,
|
|
259
|
-
null,
|
|
260
|
-
$(b.value, (a, d) => (o(), u("div", {
|
|
261
|
-
class: n([
|
|
262
|
-
"das-ui-checkbox-square",
|
|
263
|
-
{
|
|
264
|
-
"das-ui-checkbox-square--disabled": a.disabled || e.disabled,
|
|
265
|
-
"das-ui-checkbox-square--checked": a.checked,
|
|
266
|
-
"das-ui-checkbox-square--focus": a.isFocus,
|
|
267
|
-
"ellipsis-square-checkbox": !!h.value
|
|
268
|
-
}
|
|
269
|
-
]),
|
|
270
|
-
style: g(h.value),
|
|
271
|
-
onClick: (q) => I("group", a),
|
|
272
|
-
onBlur: (q) => O("group", a),
|
|
273
|
-
tabindex: d,
|
|
274
|
-
key: d
|
|
275
|
-
}, [
|
|
276
|
-
a.checked ? (o(), u("span", fe, [
|
|
277
|
-
j(r(H), {
|
|
278
|
-
size: "mini",
|
|
279
|
-
icon: "select",
|
|
280
|
-
iconColor: "#fff",
|
|
281
|
-
class: "view-icon"
|
|
282
|
-
})
|
|
283
|
-
])) : c("v-if", !0),
|
|
284
|
-
y((o(), u("div", null, [
|
|
285
|
-
M(
|
|
286
|
-
p(a.label),
|
|
287
|
-
1
|
|
288
|
-
/* TEXT */
|
|
289
|
-
)
|
|
290
|
-
])), [
|
|
291
|
-
[r(x)]
|
|
292
|
-
])
|
|
293
|
-
], 46, ne))),
|
|
294
|
-
128
|
|
295
|
-
/* KEYED_FRAGMENT */
|
|
296
|
-
))
|
|
297
|
-
],
|
|
298
|
-
2
|
|
299
|
-
/* CLASS */
|
|
300
|
-
)) : c("v-if", !0),
|
|
301
|
-
c("多选组 查看状态 "),
|
|
302
|
-
e.isView ? (o(), u(
|
|
303
|
-
"div",
|
|
304
|
-
{
|
|
305
|
-
key: 4,
|
|
306
|
-
class: n(["das-ui-checkbox-view-group", { "flex-view": L.value.length > 1 }])
|
|
307
|
-
},
|
|
308
|
-
[
|
|
309
|
-
L.value.length ? (o(!0), u(
|
|
310
|
-
C,
|
|
311
|
-
{ key: 0 },
|
|
312
|
-
$(L.value, (a, d) => (o(), u(
|
|
128
|
+
}, q = ne(), ee = m(() => ({
|
|
129
|
+
"--checkbox-height": q.value && {
|
|
130
|
+
small: "24px",
|
|
131
|
+
default: "32px",
|
|
132
|
+
large: "40px"
|
|
133
|
+
}[q.value],
|
|
134
|
+
"--checkbox-font-size": q.value && {
|
|
135
|
+
small: "12px",
|
|
136
|
+
default: "14px",
|
|
137
|
+
large: "14px"
|
|
138
|
+
}[q.value]
|
|
139
|
+
}));
|
|
140
|
+
return re(_), (e, l) => {
|
|
141
|
+
const i = de;
|
|
142
|
+
return o(), u(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
class: "das-ui-checkbox",
|
|
146
|
+
style: y(ee.value)
|
|
147
|
+
},
|
|
148
|
+
[
|
|
149
|
+
e.checkboxType == "default" && e.optionType == "default" && !e.isView ? (o(), W(r(H), U({
|
|
150
|
+
key: 0,
|
|
151
|
+
ref_key: "checkboxRef",
|
|
152
|
+
ref: E,
|
|
153
|
+
checked: r(s),
|
|
154
|
+
"onUpdate:checked": l[0] || (l[0] = (a) => A(s) ? s.value = a : s = a),
|
|
155
|
+
disabled: e.disabled
|
|
156
|
+
}, e.$attrs, {
|
|
157
|
+
optionType: e.optionType,
|
|
158
|
+
indeterminate: r(v),
|
|
159
|
+
onChange: O,
|
|
160
|
+
class: [e.size, { nolabel: Object.keys(e.$slots).length == 0 }]
|
|
161
|
+
}), {
|
|
162
|
+
default: M(() => [
|
|
163
|
+
g((o(), u(
|
|
313
164
|
"div",
|
|
314
165
|
{
|
|
315
|
-
class:
|
|
316
|
-
|
|
166
|
+
class: "label",
|
|
167
|
+
style: y([b.value, { color: "#666" }])
|
|
317
168
|
},
|
|
318
169
|
[
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
170
|
+
C(e.$slots, "default", {}, void 0, !0)
|
|
171
|
+
],
|
|
172
|
+
4
|
|
173
|
+
/* STYLE */
|
|
174
|
+
)), [
|
|
175
|
+
[r(x)]
|
|
176
|
+
])
|
|
177
|
+
]),
|
|
178
|
+
_: 3
|
|
179
|
+
/* FORWARDED */
|
|
180
|
+
}, 16, ["checked", "disabled", "optionType", "indeterminate", "class"])) : c("v-if", !0),
|
|
181
|
+
e.checkboxType == "default" && e.optionType == "square" && !e.isView ? (o(), u(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
key: 1,
|
|
185
|
+
class: n([
|
|
186
|
+
"das-ui-checkbox-square",
|
|
187
|
+
e.size,
|
|
188
|
+
{
|
|
189
|
+
"das-ui-checkbox-square--disabled": e.disabled,
|
|
190
|
+
"das-ui-checkbox-square--checked": !!r(s),
|
|
191
|
+
"das-ui-checkbox-square--focus": r(F),
|
|
192
|
+
"ellipsis-square-checkbox": !!b.value
|
|
193
|
+
}
|
|
194
|
+
]),
|
|
195
|
+
tabindex: "0",
|
|
196
|
+
onClick: l[1] || (l[1] = (a) => L("default", "")),
|
|
197
|
+
onBlur: l[2] || (l[2] = (a) => P("default", "")),
|
|
198
|
+
style: y(b.value)
|
|
199
|
+
},
|
|
200
|
+
[
|
|
201
|
+
g((o(), u("div", he, [
|
|
202
|
+
C(e.$slots, "default", {}, void 0, !0)
|
|
203
|
+
])), [
|
|
204
|
+
[r(x)]
|
|
205
|
+
])
|
|
206
|
+
],
|
|
207
|
+
38
|
|
208
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
209
|
+
)) : c("v-if", !0),
|
|
210
|
+
e.checkboxType == "group" && e.optionType == "default" && !e.isView ? (o(), W(i, U({
|
|
211
|
+
key: 2,
|
|
212
|
+
ref_key: "checkboxRef",
|
|
213
|
+
ref: E
|
|
214
|
+
}, e.$attrs, {
|
|
215
|
+
class: [e.size, { "das-ui-checkbox-vertical": r(I) == "vertical" }],
|
|
216
|
+
value: r(s),
|
|
217
|
+
"onUpdate:value": l[3] || (l[3] = (a) => A(s) ? s.value = a : s = a),
|
|
218
|
+
name: e.name,
|
|
219
|
+
onChange: O
|
|
220
|
+
}), {
|
|
221
|
+
default: M(() => [
|
|
222
|
+
(o(!0), u(
|
|
223
|
+
$,
|
|
224
|
+
null,
|
|
225
|
+
B(h.value, (a, d) => (o(), W(r(H), {
|
|
226
|
+
key: d,
|
|
227
|
+
value: a.value,
|
|
228
|
+
"onUpdate:value": (w) => a.value = w,
|
|
229
|
+
disabled: a.disabled || e.disabled
|
|
230
|
+
}, {
|
|
231
|
+
default: M(() => [
|
|
232
|
+
j(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
class: n(["label", { "label-min-width": !!b.value }]),
|
|
236
|
+
style: y([b.value, { color: "#666" }])
|
|
237
|
+
},
|
|
238
|
+
[
|
|
239
|
+
C(e.$slots, "content", {
|
|
240
|
+
item: a,
|
|
241
|
+
index: d
|
|
242
|
+
}, () => [
|
|
243
|
+
g((o(), u("div", null, [
|
|
244
|
+
N(
|
|
245
|
+
p(a.label),
|
|
246
|
+
1
|
|
247
|
+
/* TEXT */
|
|
248
|
+
)
|
|
249
|
+
])), [
|
|
250
|
+
[r(x)]
|
|
251
|
+
])
|
|
252
|
+
], !0)
|
|
253
|
+
],
|
|
254
|
+
6
|
|
255
|
+
/* CLASS, STYLE */
|
|
256
|
+
)
|
|
257
|
+
]),
|
|
258
|
+
_: 2
|
|
259
|
+
/* DYNAMIC */
|
|
260
|
+
}, 1032, ["value", "onUpdate:value", "disabled"]))),
|
|
261
|
+
128
|
|
262
|
+
/* KEYED_FRAGMENT */
|
|
263
|
+
))
|
|
264
|
+
]),
|
|
265
|
+
_: 3
|
|
266
|
+
/* FORWARDED */
|
|
267
|
+
}, 16, ["class", "value", "name"])) : c("v-if", !0),
|
|
268
|
+
e.checkboxType == "group" && e.optionType == "square" && !e.isView ? (o(), u(
|
|
269
|
+
"div",
|
|
270
|
+
{
|
|
271
|
+
key: 3,
|
|
272
|
+
class: n(["das-ui-checkbox-square-group", [e.size, { "das-ui-checkbox-vertical": r(I) == "vertical" }]])
|
|
273
|
+
},
|
|
274
|
+
[
|
|
275
|
+
(o(!0), u(
|
|
276
|
+
$,
|
|
277
|
+
null,
|
|
278
|
+
B(h.value, (a, d) => (o(), u("div", {
|
|
279
|
+
class: n([
|
|
280
|
+
"das-ui-checkbox-square",
|
|
327
281
|
{
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
282
|
+
"das-ui-checkbox-square--disabled": a.disabled || e.disabled,
|
|
283
|
+
"das-ui-checkbox-square--checked": a.checked,
|
|
284
|
+
"das-ui-checkbox-square--focus": a.isFocus,
|
|
285
|
+
"ellipsis-square-checkbox": !!b.value
|
|
286
|
+
}
|
|
287
|
+
]),
|
|
288
|
+
style: y(b.value),
|
|
289
|
+
onClick: (w) => L("group", a),
|
|
290
|
+
onBlur: (w) => P("group", a),
|
|
291
|
+
tabindex: d,
|
|
292
|
+
key: d
|
|
293
|
+
}, [
|
|
294
|
+
a.checked ? (o(), u("span", pe, [
|
|
295
|
+
G(r(J), {
|
|
296
|
+
size: "mini",
|
|
297
|
+
icon: "select",
|
|
298
|
+
iconColor: "#fff",
|
|
299
|
+
class: "view-icon"
|
|
300
|
+
})
|
|
301
|
+
])) : c("v-if", !0),
|
|
302
|
+
g((o(), u("div", null, [
|
|
303
|
+
N(
|
|
304
|
+
p(a.label),
|
|
305
|
+
1
|
|
306
|
+
/* TEXT */
|
|
307
|
+
)
|
|
308
|
+
])), [
|
|
342
309
|
[r(x)]
|
|
343
|
-
])
|
|
344
|
-
],
|
|
345
|
-
|
|
346
|
-
/*
|
|
347
|
-
))
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
310
|
+
])
|
|
311
|
+
], 46, be))),
|
|
312
|
+
128
|
|
313
|
+
/* KEYED_FRAGMENT */
|
|
314
|
+
))
|
|
315
|
+
],
|
|
316
|
+
2
|
|
317
|
+
/* CLASS */
|
|
318
|
+
)) : c("v-if", !0),
|
|
319
|
+
c("多选组 查看状态 "),
|
|
320
|
+
e.isView ? (o(), u(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
key: 4,
|
|
324
|
+
class: n(["das-ui-checkbox-view-group", { "flex-view": R.value.length > 1 }])
|
|
325
|
+
},
|
|
326
|
+
[
|
|
327
|
+
R.value.length ? (o(!0), u(
|
|
328
|
+
$,
|
|
329
|
+
{ key: 0 },
|
|
330
|
+
B(R.value, (a, d) => (o(), u(
|
|
331
|
+
"div",
|
|
332
|
+
{
|
|
333
|
+
class: n(["das-checkbox-item-view", a[r(f).label] && "nonelabel-item-view"]),
|
|
334
|
+
key: d
|
|
335
|
+
},
|
|
336
|
+
[
|
|
337
|
+
G(r(J), {
|
|
338
|
+
size: "mini",
|
|
339
|
+
icon: "select",
|
|
340
|
+
iconColor: "#666",
|
|
341
|
+
class: n(["view-icon", { "m-r-5": a[r(f).label] || Object.keys(e.$slots).length > 0 }])
|
|
342
|
+
}, null, 8, ["class"]),
|
|
343
|
+
a[r(f).label] ? g((o(), u(
|
|
344
|
+
"div",
|
|
345
|
+
{
|
|
346
|
+
key: 0,
|
|
347
|
+
class: n(["label", e.size]),
|
|
348
|
+
style: y([b.value, { color: "#666" }])
|
|
349
|
+
},
|
|
350
|
+
[
|
|
351
|
+
N(
|
|
352
|
+
p(a[r(f).label]),
|
|
353
|
+
1
|
|
354
|
+
/* TEXT */
|
|
355
|
+
)
|
|
356
|
+
],
|
|
357
|
+
6
|
|
358
|
+
/* CLASS, STYLE */
|
|
359
|
+
)), [
|
|
360
|
+
[r(x)]
|
|
361
|
+
]) : C(e.$slots, "default", { key: 1 }, void 0, !0)
|
|
362
|
+
],
|
|
363
|
+
2
|
|
364
|
+
/* CLASS */
|
|
365
|
+
))),
|
|
366
|
+
128
|
|
367
|
+
/* KEYED_FRAGMENT */
|
|
368
|
+
)) : (o(), u(
|
|
369
|
+
"span",
|
|
370
|
+
ve,
|
|
371
|
+
p(z.value),
|
|
372
|
+
1
|
|
373
|
+
/* TEXT */
|
|
374
|
+
))
|
|
375
|
+
],
|
|
376
|
+
2
|
|
377
|
+
/* CLASS */
|
|
378
|
+
)) : c("v-if", !0),
|
|
379
|
+
c(" 用于过滤条件的多选 "),
|
|
380
|
+
e.checkboxType == "group" && e.optionType == "filterSquare" ? (o(), u(
|
|
381
|
+
"div",
|
|
382
|
+
{
|
|
383
|
+
key: 5,
|
|
384
|
+
class: n(["das-ui-checkbox-square-group das-ui-checkbox-filter-square-group", { "das-ui-checkbox-vertical": r(I) == "vertical" }])
|
|
385
|
+
},
|
|
386
|
+
[
|
|
387
|
+
(o(!0), u(
|
|
388
|
+
$,
|
|
389
|
+
null,
|
|
390
|
+
B(h.value, (a, d) => (o(), u("div", {
|
|
391
|
+
class: n([
|
|
392
|
+
"das-ui-checkbox-square",
|
|
393
|
+
{
|
|
394
|
+
"das-ui-checkbox-square--disabled": a.disabled || e.disabled,
|
|
395
|
+
"das-ui-checkbox-square--checked": a.checked
|
|
396
|
+
}
|
|
397
|
+
]),
|
|
398
|
+
onClick: (w) => L("group", a),
|
|
399
|
+
tabindex: d,
|
|
400
|
+
key: d
|
|
401
|
+
}, p(a.label), 11, ke))),
|
|
402
|
+
128
|
|
403
|
+
/* KEYED_FRAGMENT */
|
|
404
|
+
))
|
|
405
|
+
],
|
|
406
|
+
2
|
|
407
|
+
/* CLASS */
|
|
408
|
+
)) : c("v-if", !0),
|
|
409
|
+
e.error && e.errorLabel && e.errorMode === "default" ? (o(), u("div", me, [
|
|
410
|
+
e.error ? (o(), u(
|
|
351
411
|
"span",
|
|
352
|
-
|
|
353
|
-
p(
|
|
412
|
+
ye,
|
|
413
|
+
p(e.errorLabel),
|
|
354
414
|
1
|
|
355
415
|
/* TEXT */
|
|
356
|
-
))
|
|
357
|
-
],
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
null,
|
|
372
|
-
$(b.value, (a, d) => (o(), u("div", {
|
|
373
|
-
class: n([
|
|
374
|
-
"das-ui-checkbox-square",
|
|
375
|
-
{
|
|
376
|
-
"das-ui-checkbox-square--disabled": a.disabled || e.disabled,
|
|
377
|
-
"das-ui-checkbox-square--checked": a.checked
|
|
378
|
-
}
|
|
379
|
-
]),
|
|
380
|
-
onClick: (q) => I("group", a),
|
|
381
|
-
tabindex: d,
|
|
382
|
-
key: d
|
|
383
|
-
}, p(a.label), 11, he))),
|
|
384
|
-
128
|
|
385
|
-
/* KEYED_FRAGMENT */
|
|
386
|
-
))
|
|
387
|
-
],
|
|
388
|
-
2
|
|
389
|
-
/* CLASS */
|
|
390
|
-
)) : c("v-if", !0),
|
|
391
|
-
e.error && e.errorLabel && e.errorMode === "default" ? (o(), u("div", pe, [
|
|
392
|
-
e.error ? (o(), u(
|
|
393
|
-
"span",
|
|
394
|
-
ve,
|
|
395
|
-
p(e.errorLabel),
|
|
396
|
-
1
|
|
397
|
-
/* TEXT */
|
|
398
|
-
)) : c("v-if", !0)
|
|
399
|
-
])) : c("v-if", !0),
|
|
400
|
-
e.error && e.errorLabel && e.errorMode === "overlay" ? (o(), u("div", ke, [
|
|
401
|
-
A(
|
|
402
|
-
"span",
|
|
403
|
-
me,
|
|
404
|
-
p(e.errorLabel),
|
|
405
|
-
1
|
|
406
|
-
/* TEXT */
|
|
407
|
-
)
|
|
408
|
-
])) : c("v-if", !0)
|
|
409
|
-
]);
|
|
416
|
+
)) : c("v-if", !0)
|
|
417
|
+
])) : c("v-if", !0),
|
|
418
|
+
e.error && e.errorLabel && e.errorMode === "overlay" ? (o(), u("div", ge, [
|
|
419
|
+
j(
|
|
420
|
+
"span",
|
|
421
|
+
xe,
|
|
422
|
+
p(e.errorLabel),
|
|
423
|
+
1
|
|
424
|
+
/* TEXT */
|
|
425
|
+
)
|
|
426
|
+
])) : c("v-if", !0)
|
|
427
|
+
],
|
|
428
|
+
4
|
|
429
|
+
/* STYLE */
|
|
430
|
+
);
|
|
410
431
|
};
|
|
411
432
|
}
|
|
412
|
-
}),
|
|
413
|
-
const
|
|
414
|
-
for (const [
|
|
415
|
-
|
|
416
|
-
return
|
|
417
|
-
},
|
|
433
|
+
}), Ve = (T, S) => {
|
|
434
|
+
const t = T.__vccOpts || T;
|
|
435
|
+
for (const [z, D] of S)
|
|
436
|
+
t[z] = D;
|
|
437
|
+
return t;
|
|
438
|
+
}, qe = /* @__PURE__ */ Ve(Te, [["__scopeId", "data-v-38011197"]]), we = {
|
|
418
439
|
"--demo-alert-bg": {
|
|
419
440
|
light: "#fff",
|
|
420
441
|
dark: "rgba(255,255,255,.2)"
|
|
@@ -427,10 +448,10 @@ const de = { class: "das-ui-checkbox" }, ce = { class: "label" }, ne = ["onClick
|
|
|
427
448
|
"--das-ui-radio-bgff": "#fff",
|
|
428
449
|
"--das-ui-radio-shadow": "rgba(85, 130, 243, 0.1)"
|
|
429
450
|
};
|
|
430
|
-
|
|
431
|
-
const
|
|
451
|
+
fe(we);
|
|
452
|
+
const Ee = () => Q(null), We = ie(qe);
|
|
432
453
|
export {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
454
|
+
We as DasCheckbox,
|
|
455
|
+
Ee as DasCheckboxRef,
|
|
456
|
+
We as default
|
|
436
457
|
};
|