st-comp 0.0.201 → 0.0.203
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/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +5 -4
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +333 -321
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +587 -570
- package/es/Table.cjs +1 -1
- package/es/Table.js +12 -11
- package/es/User.cjs +1 -1
- package/es/User.js +609 -565
- package/es/VarietySearch.cjs +7 -7
- package/es/VarietySearch.js +18 -17
- package/es/el-checkbox-7421ccd3.js +459 -0
- package/es/el-checkbox-c25236a6.cjs +1 -0
- package/es/el-table-column-376cd907.js +3432 -0
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/style.css +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +152 -152
- package/lib/{index-c0ce50bc.js → index-233becad.js} +11438 -11366
- package/lib/{python-9dae326e.js → python-5d251ebd.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/config.js +2 -0
- package/packages/KlineConfig/index.vue +9 -0
- package/packages/KlinePlus/index.vue +8 -8
- package/packages/KlinePlus/utils.js +41 -5
- package/packages/User/components/EditInfoDialog/Mobile.vue +83 -3
- package/es/el-table-column-079b76f5.cjs +0 -14
- package/es/el-table-column-72c50d58.js +0 -3882
package/es/VarietySearch.js
CHANGED
|
@@ -3,19 +3,20 @@ import "./el-tag-66cab138.js";
|
|
|
3
3
|
import { E as fe, a as pe } from "./el-select-95627997.js";
|
|
4
4
|
import "./el-scrollbar-323542e7.js";
|
|
5
5
|
import { U as be, C as he, u as ut, d as et, E as tt } from "./el-popper-b4f97157.js";
|
|
6
|
-
import {
|
|
6
|
+
import { E as nt, a as rt } from "./el-checkbox-7421ccd3.js";
|
|
7
7
|
import "./el-checkbox-group-4ed993c7.js";
|
|
8
|
-
import { ref as eu, inject as o0, computed as Q, defineComponent as Du, openBlock as E, createElementBlock as S, normalizeClass as lu, unref as O, createElementVNode as V, withDirectives as Nu, isRef as a0, withModifiers as qu, vModelRadio as l0, renderSlot as me, createTextVNode as L, toDisplayString as uu, nextTick as Bu, normalizeStyle as i0, onMounted as c0, provide as
|
|
8
|
+
import { ref as eu, inject as o0, computed as Q, defineComponent as Du, openBlock as E, createElementBlock as S, normalizeClass as lu, unref as O, createElementVNode as V, withDirectives as Nu, isRef as a0, withModifiers as qu, vModelRadio as l0, renderSlot as me, createTextVNode as L, toDisplayString as uu, nextTick as Bu, normalizeStyle as i0, onMounted as c0, provide as ot, reactive as at, toRefs as lt, watch as vu, Fragment as z, renderList as Z, createBlock as P, mergeProps as it, mergeModels as ju, useModel as Zu, withCtx as D, createVNode as y, createCommentVNode as U, resolveComponent as qe, vShow as s0, pushScopeId as xe, popScopeId as _e, createSlots as Ku } from "vue";
|
|
9
9
|
import { E as ge } from "./el-dialog-41ab8417.js";
|
|
10
10
|
import "./el-overlay-09ad71cd.js";
|
|
11
|
-
import { a as
|
|
11
|
+
import { a as ct, E as st } from "./el-form-item-c53c374d.js";
|
|
12
12
|
import { E as d0 } from "./el-input-2f75c4ba.js";
|
|
13
13
|
import { E as f0 } from "./el-input-number-5193fe6d.js";
|
|
14
14
|
import "./el-tooltip-4ed993c7.js";
|
|
15
15
|
import { E as p0 } from "./el-button-c95adb85.js";
|
|
16
16
|
import "./el-popover-4ed993c7.js";
|
|
17
|
-
import { E as
|
|
18
|
-
import { p as Xu, i as
|
|
17
|
+
import { E as dt } from "./el-text-ac60d0f2.js";
|
|
18
|
+
import { p as Xu, i as ft, c as pt, s as bt, E as ht } from "./index-a871c3eb.js";
|
|
19
|
+
import { E as mt, a as xt } from "./el-table-column-376cd907.js";
|
|
19
20
|
import { E as b0 } from "./index-844bdd85.js";
|
|
20
21
|
import { M as _t } from "./index-bc8e277e.js";
|
|
21
22
|
import { E as W } from "./el-message-e544a8f5.js";
|
|
@@ -35,9 +36,9 @@ import "./debounce-8d53f4dd.js";
|
|
|
35
36
|
import "./vnode-5ddb7ed1.js";
|
|
36
37
|
import "./use-global-config-b5e9d3d5.js";
|
|
37
38
|
import "./_initCloneObject-eaef9418.js";
|
|
38
|
-
import "./raf-80ef0c0a.js";
|
|
39
39
|
import "./typescript-7ae59c4c.js";
|
|
40
40
|
import "./index-657047bb.js";
|
|
41
|
+
import "./raf-80ef0c0a.js";
|
|
41
42
|
import "./index-7ed0999e.js";
|
|
42
43
|
import "./config-provider-b16efd62.js";
|
|
43
44
|
import "./validator-764a9db0.js";
|
|
@@ -281,8 +282,8 @@ const $t = Uu({
|
|
|
281
282
|
};
|
|
282
283
|
return { ...m, ...d };
|
|
283
284
|
};
|
|
284
|
-
return
|
|
285
|
-
...
|
|
285
|
+
return ot(g0, at({
|
|
286
|
+
...lt(t),
|
|
286
287
|
changeEvent: i,
|
|
287
288
|
name: f
|
|
288
289
|
})), vu(() => t.modelValue, (m, d) => {
|
|
@@ -297,7 +298,7 @@ const $t = Uu({
|
|
|
297
298
|
"aria-labelledby": O(c) ? O(l).labelId : void 0
|
|
298
299
|
}, [
|
|
299
300
|
me(m.$slots, "default", {}, () => [
|
|
300
|
-
(E(!0), S(z, null, Z(t.options, (w, $) => (E(), P(y0,
|
|
301
|
+
(E(!0), S(z, null, Z(t.options, (w, $) => (E(), P(y0, it({ key: $ }, p(w)), null, 16))), 128))
|
|
301
302
|
])
|
|
302
303
|
], 10, ["id", "aria-label", "aria-labelledby"]));
|
|
303
304
|
}
|
|
@@ -4044,7 +4045,7 @@ const Ao = ["innerHTML"], wo = {
|
|
|
4044
4045
|
const { data: o } = await e.post("/middleLayer/special/getOss", { url: "resource/factor_select.md" }), l = new Uint8Array(o.data), c = new TextDecoder("utf-8").decode(l);
|
|
4045
4046
|
n.value = t.render(c);
|
|
4046
4047
|
}), (o, l) => {
|
|
4047
|
-
const a =
|
|
4048
|
+
const a = mt, c = xt, i = b0, f = ge;
|
|
4048
4049
|
return E(), P(f, {
|
|
4049
4050
|
modelValue: r.value,
|
|
4050
4051
|
"onUpdate:modelValue": l[0] || (l[0] = (s) => r.value = s),
|
|
@@ -4318,7 +4319,7 @@ const Y0 = (u) => (xe("data-v-deab9c48"), u = u(), _e(), u), To = { class: "fact
|
|
|
4318
4319
|
{ deep: !0 }
|
|
4319
4320
|
), (k, b) => {
|
|
4320
4321
|
var Ie;
|
|
4321
|
-
const x =
|
|
4322
|
+
const x = dt, g = h0, _ = kt, I = p0, v = ht, T = tt, F = D0, q = ve, B = qe("st-customFunction"), C = fe, N = pe, H = ct, xu = f0, _u = ye, gu = d0, K = st, X = b0, Yu = ge, K0 = qe("st-varSelectDialog");
|
|
4322
4323
|
return E(), S(z, null, [
|
|
4323
4324
|
V("div", To, [
|
|
4324
4325
|
V("div", null, [
|
|
@@ -4419,7 +4420,7 @@ const Y0 = (u) => (xe("data-v-deab9c48"), u = u(), _e(), u), To = { class: "fact
|
|
|
4419
4420
|
onClick: b[2] || (b[2] = (R) => l.value = !0)
|
|
4420
4421
|
}, {
|
|
4421
4422
|
default: D(() => [
|
|
4422
|
-
y(O(
|
|
4423
|
+
y(O(ft))
|
|
4423
4424
|
]),
|
|
4424
4425
|
_: 1
|
|
4425
4426
|
})
|
|
@@ -4466,7 +4467,7 @@ const Y0 = (u) => (xe("data-v-deab9c48"), u = u(), _e(), u), To = { class: "fact
|
|
|
4466
4467
|
onClick: b[4] || (b[4] = (R) => o.value = !1)
|
|
4467
4468
|
}, {
|
|
4468
4469
|
default: D(() => [
|
|
4469
|
-
y(O(
|
|
4470
|
+
y(O(pt))
|
|
4470
4471
|
]),
|
|
4471
4472
|
_: 1
|
|
4472
4473
|
})
|
|
@@ -4712,7 +4713,7 @@ const Y0 = (u) => (xe("data-v-deab9c48"), u = u(), _e(), u), To = { class: "fact
|
|
|
4712
4713
|
onClick: (R) => p(nu)
|
|
4713
4714
|
}, {
|
|
4714
4715
|
default: D(() => [
|
|
4715
|
-
y(O(
|
|
4716
|
+
y(O(bt))
|
|
4716
4717
|
]),
|
|
4717
4718
|
_: 2
|
|
4718
4719
|
}, 1032, ["onClick"])
|
|
@@ -5843,7 +5844,7 @@ const Au = (u) => (xe("data-v-efd872de"), u = u(), _e(), u), ga = { class: "vari
|
|
|
5843
5844
|
}
|
|
5844
5845
|
}), (s, p) => {
|
|
5845
5846
|
var k, b, x, g, _, I;
|
|
5846
|
-
const m = ye, d = ve, w =
|
|
5847
|
+
const m = ye, d = ve, w = nt, $ = rt, A = fe, h = pe;
|
|
5847
5848
|
return E(), S("div", ga, [
|
|
5848
5849
|
(k = r.value.varietyMarket) != null && k.show ? (E(), S("div", ka, [
|
|
5849
5850
|
V("div", ya, [
|
|
@@ -6006,11 +6007,11 @@ const Au = (u) => (xe("data-v-efd872de"), u = u(), _e(), u), ga = { class: "vari
|
|
|
6006
6007
|
]);
|
|
6007
6008
|
};
|
|
6008
6009
|
}
|
|
6009
|
-
}, za = /* @__PURE__ */ ke(Ba, [["__scopeId", "data-v-efd872de"]]),
|
|
6010
|
+
}, za = /* @__PURE__ */ ke(Ba, [["__scopeId", "data-v-efd872de"]]), Il = {
|
|
6010
6011
|
install(u) {
|
|
6011
6012
|
u.component("st-varietySearch", za);
|
|
6012
6013
|
}
|
|
6013
6014
|
};
|
|
6014
6015
|
export {
|
|
6015
|
-
|
|
6016
|
+
Il as default
|
|
6016
6017
|
};
|
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { inject as I, computed as m, getCurrentInstance as X, watch as Y, nextTick as Z, ref as D, toRaw as H, defineComponent as S, useSlots as ee, openBlock as V, createBlock as w, resolveDynamicComponent as le, unref as s, normalizeClass as y, withCtx as ae, createElementVNode as N, withDirectives as te, mergeProps as A, isRef as ne, withModifiers as oe, vModelCheckbox as ue, createElementBlock as E, renderSlot as j, Fragment as se, createTextVNode as ie, toDisplayString as re, createCommentVNode as $, normalizeStyle as Ve, provide as ye, toRefs as Se, renderList as Le } from "vue";
|
|
2
|
+
import { h as ce, g as Ee, d as M, e as W, f as de } from "./use-form-common-props-815d48a6.js";
|
|
3
|
+
import { u as be, U as F, d as ve, C as P, p as Be } from "./el-popper-b4f97157.js";
|
|
4
|
+
import { c as J, p as Q, o as U, i as O, j as B, k as T, f as Ie, u as R, _ as K, b as Ne, e as G, w as Fe, l as me } from "./base-a5af3db3.js";
|
|
5
|
+
import { i as fe } from "./index-e5566b94.js";
|
|
6
|
+
import { u as z } from "./index-2e331d74.js";
|
|
7
|
+
const he = {
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: [Number, String, Boolean],
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
type: [String, Boolean, Number, Object],
|
|
14
|
+
default: void 0
|
|
15
|
+
},
|
|
16
|
+
value: {
|
|
17
|
+
type: [String, Boolean, Number, Object],
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
indeterminate: Boolean,
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
checked: Boolean,
|
|
23
|
+
name: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
trueValue: {
|
|
28
|
+
type: [String, Number],
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
falseValue: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
trueLabel: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
falseLabel: {
|
|
40
|
+
type: [String, Number],
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
id: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: void 0
|
|
46
|
+
},
|
|
47
|
+
border: Boolean,
|
|
48
|
+
size: ce,
|
|
49
|
+
tabindex: [String, Number],
|
|
50
|
+
validateEvent: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !0
|
|
53
|
+
},
|
|
54
|
+
...be(["ariaControls"])
|
|
55
|
+
}, pe = {
|
|
56
|
+
[F]: (e) => J(e) || Q(e) || U(e),
|
|
57
|
+
change: (e) => J(e) || Q(e) || U(e)
|
|
58
|
+
}, L = Symbol("checkboxGroupContextKey"), Ge = ({
|
|
59
|
+
model: e,
|
|
60
|
+
isChecked: l
|
|
61
|
+
}) => {
|
|
62
|
+
const i = I(L, void 0), t = m(() => {
|
|
63
|
+
var r, b;
|
|
64
|
+
const n = (r = i == null ? void 0 : i.max) == null ? void 0 : r.value, v = (b = i == null ? void 0 : i.min) == null ? void 0 : b.value;
|
|
65
|
+
return !O(n) && e.value.length >= n && !l.value || !O(v) && e.value.length <= v && l.value;
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
isDisabled: Ee(m(() => (i == null ? void 0 : i.disabled.value) || t.value)),
|
|
69
|
+
isLimitDisabled: t
|
|
70
|
+
};
|
|
71
|
+
}, ze = (e, {
|
|
72
|
+
model: l,
|
|
73
|
+
isLimitExceeded: i,
|
|
74
|
+
hasOwnLabel: t,
|
|
75
|
+
isDisabled: d,
|
|
76
|
+
isLabeledByFormItem: r
|
|
77
|
+
}) => {
|
|
78
|
+
const b = I(L, void 0), { formItem: n } = M(), { emit: v } = X();
|
|
79
|
+
function f(p) {
|
|
80
|
+
var a, g, k, c;
|
|
81
|
+
return [!0, e.trueValue, e.trueLabel].includes(p) ? (g = (a = e.trueValue) != null ? a : e.trueLabel) != null ? g : !0 : (c = (k = e.falseValue) != null ? k : e.falseLabel) != null ? c : !1;
|
|
82
|
+
}
|
|
83
|
+
function o(p, a) {
|
|
84
|
+
v(P, f(p), a);
|
|
85
|
+
}
|
|
86
|
+
function u(p) {
|
|
87
|
+
if (i.value)
|
|
88
|
+
return;
|
|
89
|
+
const a = p.target;
|
|
90
|
+
v(P, f(a.checked), p);
|
|
91
|
+
}
|
|
92
|
+
async function h(p) {
|
|
93
|
+
i.value || !t.value && !d.value && r.value && (p.composedPath().some((k) => k.tagName === "LABEL") || (l.value = f([!1, e.falseValue, e.falseLabel].includes(l.value)), await Z(), o(l.value, p)));
|
|
94
|
+
}
|
|
95
|
+
const x = m(() => (b == null ? void 0 : b.validateEvent) || e.validateEvent);
|
|
96
|
+
return Y(() => e.modelValue, () => {
|
|
97
|
+
x.value && (n == null || n.validate("change").catch((p) => ve()));
|
|
98
|
+
}), {
|
|
99
|
+
handleChange: u,
|
|
100
|
+
onClickRoot: h
|
|
101
|
+
};
|
|
102
|
+
}, De = (e) => {
|
|
103
|
+
const l = D(!1), { emit: i } = X(), t = I(L, void 0), d = m(() => O(t) === !1), r = D(!1), b = m({
|
|
104
|
+
get() {
|
|
105
|
+
var n, v;
|
|
106
|
+
return d.value ? (n = t == null ? void 0 : t.modelValue) == null ? void 0 : n.value : (v = e.modelValue) != null ? v : l.value;
|
|
107
|
+
},
|
|
108
|
+
set(n) {
|
|
109
|
+
var v, f;
|
|
110
|
+
d.value && B(n) ? (r.value = ((v = t == null ? void 0 : t.max) == null ? void 0 : v.value) !== void 0 && n.length > (t == null ? void 0 : t.max.value) && n.length > b.value.length, r.value === !1 && ((f = t == null ? void 0 : t.changeEvent) == null || f.call(t, n))) : (i(F, n), l.value = n);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return {
|
|
114
|
+
model: b,
|
|
115
|
+
isGroup: d,
|
|
116
|
+
isLimitExceeded: r
|
|
117
|
+
};
|
|
118
|
+
}, we = (e, l, { model: i }) => {
|
|
119
|
+
const t = I(L, void 0), d = D(!1), r = m(() => T(e.value) ? e.label : e.value), b = m(() => {
|
|
120
|
+
const o = i.value;
|
|
121
|
+
return U(o) ? o : B(o) ? Ie(r.value) ? o.map(H).some((u) => fe(u, r.value)) : o.map(H).includes(r.value) : o != null ? o === e.trueValue || o === e.trueLabel : !!o;
|
|
122
|
+
}), n = W(m(() => {
|
|
123
|
+
var o;
|
|
124
|
+
return (o = t == null ? void 0 : t.size) == null ? void 0 : o.value;
|
|
125
|
+
}), {
|
|
126
|
+
prop: !0
|
|
127
|
+
}), v = W(m(() => {
|
|
128
|
+
var o;
|
|
129
|
+
return (o = t == null ? void 0 : t.size) == null ? void 0 : o.value;
|
|
130
|
+
})), f = m(() => !!l.default || !T(r.value));
|
|
131
|
+
return {
|
|
132
|
+
checkboxButtonSize: n,
|
|
133
|
+
isChecked: b,
|
|
134
|
+
isFocused: d,
|
|
135
|
+
checkboxSize: v,
|
|
136
|
+
hasOwnLabel: f,
|
|
137
|
+
actualValue: r
|
|
138
|
+
};
|
|
139
|
+
}, ke = (e, l) => {
|
|
140
|
+
const { formItem: i } = M(), { model: t, isGroup: d, isLimitExceeded: r } = De(e), {
|
|
141
|
+
isFocused: b,
|
|
142
|
+
isChecked: n,
|
|
143
|
+
checkboxButtonSize: v,
|
|
144
|
+
checkboxSize: f,
|
|
145
|
+
hasOwnLabel: o,
|
|
146
|
+
actualValue: u
|
|
147
|
+
} = we(e, l, { model: t }), { isDisabled: h } = Ge({ model: t, isChecked: n }), { inputId: x, isLabeledByFormItem: p } = de(e, {
|
|
148
|
+
formItemContext: i,
|
|
149
|
+
disableIdGeneration: o,
|
|
150
|
+
disableIdManagement: d
|
|
151
|
+
}), { handleChange: a, onClickRoot: g } = ze(e, {
|
|
152
|
+
model: t,
|
|
153
|
+
isLimitExceeded: r,
|
|
154
|
+
hasOwnLabel: o,
|
|
155
|
+
isDisabled: h,
|
|
156
|
+
isLabeledByFormItem: p
|
|
157
|
+
});
|
|
158
|
+
return (() => {
|
|
159
|
+
function c() {
|
|
160
|
+
var C, _;
|
|
161
|
+
B(t.value) && !t.value.includes(u.value) ? t.value.push(u.value) : t.value = (_ = (C = e.trueValue) != null ? C : e.trueLabel) != null ? _ : !0;
|
|
162
|
+
}
|
|
163
|
+
e.checked && c();
|
|
164
|
+
})(), z({
|
|
165
|
+
from: "label act as value",
|
|
166
|
+
replacement: "value",
|
|
167
|
+
version: "3.0.0",
|
|
168
|
+
scope: "el-checkbox",
|
|
169
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
170
|
+
}, m(() => d.value && T(e.value))), z({
|
|
171
|
+
from: "true-label",
|
|
172
|
+
replacement: "true-value",
|
|
173
|
+
version: "3.0.0",
|
|
174
|
+
scope: "el-checkbox",
|
|
175
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
176
|
+
}, m(() => !!e.trueLabel)), z({
|
|
177
|
+
from: "false-label",
|
|
178
|
+
replacement: "false-value",
|
|
179
|
+
version: "3.0.0",
|
|
180
|
+
scope: "el-checkbox",
|
|
181
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
182
|
+
}, m(() => !!e.falseLabel)), {
|
|
183
|
+
inputId: x,
|
|
184
|
+
isLabeledByFormItem: p,
|
|
185
|
+
isChecked: n,
|
|
186
|
+
isDisabled: h,
|
|
187
|
+
isFocused: b,
|
|
188
|
+
checkboxButtonSize: v,
|
|
189
|
+
checkboxSize: f,
|
|
190
|
+
hasOwnLabel: o,
|
|
191
|
+
model: t,
|
|
192
|
+
actualValue: u,
|
|
193
|
+
handleChange: a,
|
|
194
|
+
onClickRoot: g
|
|
195
|
+
};
|
|
196
|
+
}, $e = S({
|
|
197
|
+
name: "ElCheckbox"
|
|
198
|
+
}), Pe = /* @__PURE__ */ S({
|
|
199
|
+
...$e,
|
|
200
|
+
props: he,
|
|
201
|
+
emits: pe,
|
|
202
|
+
setup(e) {
|
|
203
|
+
const l = e, i = ee(), {
|
|
204
|
+
inputId: t,
|
|
205
|
+
isLabeledByFormItem: d,
|
|
206
|
+
isChecked: r,
|
|
207
|
+
isDisabled: b,
|
|
208
|
+
isFocused: n,
|
|
209
|
+
checkboxSize: v,
|
|
210
|
+
hasOwnLabel: f,
|
|
211
|
+
model: o,
|
|
212
|
+
actualValue: u,
|
|
213
|
+
handleChange: h,
|
|
214
|
+
onClickRoot: x
|
|
215
|
+
} = ke(l, i), p = m(() => {
|
|
216
|
+
var c, C, _, q;
|
|
217
|
+
return l.trueValue || l.falseValue || l.trueLabel || l.falseLabel ? {
|
|
218
|
+
"true-value": (C = (c = l.trueValue) != null ? c : l.trueLabel) != null ? C : !0,
|
|
219
|
+
"false-value": (q = (_ = l.falseValue) != null ? _ : l.falseLabel) != null ? q : !1
|
|
220
|
+
} : {
|
|
221
|
+
value: u.value
|
|
222
|
+
};
|
|
223
|
+
}), a = R("checkbox"), g = m(() => [
|
|
224
|
+
a.b(),
|
|
225
|
+
a.m(v.value),
|
|
226
|
+
a.is("disabled", b.value),
|
|
227
|
+
a.is("bordered", l.border),
|
|
228
|
+
a.is("checked", r.value)
|
|
229
|
+
]), k = m(() => [
|
|
230
|
+
a.e("input"),
|
|
231
|
+
a.is("disabled", b.value),
|
|
232
|
+
a.is("checked", r.value),
|
|
233
|
+
a.is("indeterminate", l.indeterminate),
|
|
234
|
+
a.is("focus", n.value)
|
|
235
|
+
]);
|
|
236
|
+
return (c, C) => (V(), w(le(!s(f) && s(d) ? "span" : "label"), {
|
|
237
|
+
class: y(s(g)),
|
|
238
|
+
"aria-controls": c.indeterminate ? c.ariaControls : null,
|
|
239
|
+
onClick: s(x)
|
|
240
|
+
}, {
|
|
241
|
+
default: ae(() => [
|
|
242
|
+
N("span", {
|
|
243
|
+
class: y(s(k))
|
|
244
|
+
}, [
|
|
245
|
+
te(N("input", A({
|
|
246
|
+
id: s(t),
|
|
247
|
+
"onUpdate:modelValue": (_) => ne(o) ? o.value = _ : null,
|
|
248
|
+
class: s(a).e("original"),
|
|
249
|
+
type: "checkbox",
|
|
250
|
+
indeterminate: c.indeterminate,
|
|
251
|
+
name: c.name,
|
|
252
|
+
tabindex: c.tabindex,
|
|
253
|
+
disabled: s(b)
|
|
254
|
+
}, s(p), {
|
|
255
|
+
onChange: s(h),
|
|
256
|
+
onFocus: (_) => n.value = !0,
|
|
257
|
+
onBlur: (_) => n.value = !1,
|
|
258
|
+
onClick: oe(() => {
|
|
259
|
+
}, ["stop"])
|
|
260
|
+
}), null, 16, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "onChange", "onFocus", "onBlur", "onClick"]), [
|
|
261
|
+
[ue, s(o)]
|
|
262
|
+
]),
|
|
263
|
+
N("span", {
|
|
264
|
+
class: y(s(a).e("inner"))
|
|
265
|
+
}, null, 2)
|
|
266
|
+
], 2),
|
|
267
|
+
s(f) ? (V(), E("span", {
|
|
268
|
+
key: 0,
|
|
269
|
+
class: y(s(a).e("label"))
|
|
270
|
+
}, [
|
|
271
|
+
j(c.$slots, "default"),
|
|
272
|
+
c.$slots.default ? $("v-if", !0) : (V(), E(se, { key: 0 }, [
|
|
273
|
+
ie(re(c.label), 1)
|
|
274
|
+
], 64))
|
|
275
|
+
], 2)) : $("v-if", !0)
|
|
276
|
+
]),
|
|
277
|
+
_: 3
|
|
278
|
+
}, 8, ["class", "aria-controls", "onClick"]));
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
var ge = /* @__PURE__ */ K(Pe, [["__file", "checkbox.vue"]]);
|
|
282
|
+
const Ue = S({
|
|
283
|
+
name: "ElCheckboxButton"
|
|
284
|
+
}), Oe = /* @__PURE__ */ S({
|
|
285
|
+
...Ue,
|
|
286
|
+
props: he,
|
|
287
|
+
emits: pe,
|
|
288
|
+
setup(e) {
|
|
289
|
+
const l = e, i = ee(), {
|
|
290
|
+
isFocused: t,
|
|
291
|
+
isChecked: d,
|
|
292
|
+
isDisabled: r,
|
|
293
|
+
checkboxButtonSize: b,
|
|
294
|
+
model: n,
|
|
295
|
+
actualValue: v,
|
|
296
|
+
handleChange: f
|
|
297
|
+
} = ke(l, i), o = m(() => {
|
|
298
|
+
var a, g, k, c;
|
|
299
|
+
return l.trueValue || l.falseValue || l.trueLabel || l.falseLabel ? {
|
|
300
|
+
"true-value": (g = (a = l.trueValue) != null ? a : l.trueLabel) != null ? g : !0,
|
|
301
|
+
"false-value": (c = (k = l.falseValue) != null ? k : l.falseLabel) != null ? c : !1
|
|
302
|
+
} : {
|
|
303
|
+
value: v.value
|
|
304
|
+
};
|
|
305
|
+
}), u = I(L, void 0), h = R("checkbox"), x = m(() => {
|
|
306
|
+
var a, g, k, c;
|
|
307
|
+
const C = (g = (a = u == null ? void 0 : u.fill) == null ? void 0 : a.value) != null ? g : "";
|
|
308
|
+
return {
|
|
309
|
+
backgroundColor: C,
|
|
310
|
+
borderColor: C,
|
|
311
|
+
color: (c = (k = u == null ? void 0 : u.textColor) == null ? void 0 : k.value) != null ? c : "",
|
|
312
|
+
boxShadow: C ? `-1px 0 0 0 ${C}` : void 0
|
|
313
|
+
};
|
|
314
|
+
}), p = m(() => [
|
|
315
|
+
h.b("button"),
|
|
316
|
+
h.bm("button", b.value),
|
|
317
|
+
h.is("disabled", r.value),
|
|
318
|
+
h.is("checked", d.value),
|
|
319
|
+
h.is("focus", t.value)
|
|
320
|
+
]);
|
|
321
|
+
return (a, g) => (V(), E("label", {
|
|
322
|
+
class: y(s(p))
|
|
323
|
+
}, [
|
|
324
|
+
te(N("input", A({
|
|
325
|
+
"onUpdate:modelValue": (k) => ne(n) ? n.value = k : null,
|
|
326
|
+
class: s(h).be("button", "original"),
|
|
327
|
+
type: "checkbox",
|
|
328
|
+
name: a.name,
|
|
329
|
+
tabindex: a.tabindex,
|
|
330
|
+
disabled: s(r)
|
|
331
|
+
}, s(o), {
|
|
332
|
+
onChange: s(f),
|
|
333
|
+
onFocus: (k) => t.value = !0,
|
|
334
|
+
onBlur: (k) => t.value = !1,
|
|
335
|
+
onClick: oe(() => {
|
|
336
|
+
}, ["stop"])
|
|
337
|
+
}), null, 16, ["onUpdate:modelValue", "name", "tabindex", "disabled", "onChange", "onFocus", "onBlur", "onClick"]), [
|
|
338
|
+
[ue, s(n)]
|
|
339
|
+
]),
|
|
340
|
+
a.$slots.default || a.label ? (V(), E("span", {
|
|
341
|
+
key: 0,
|
|
342
|
+
class: y(s(h).be("button", "inner")),
|
|
343
|
+
style: Ve(s(d) ? s(x) : void 0)
|
|
344
|
+
}, [
|
|
345
|
+
j(a.$slots, "default", {}, () => [
|
|
346
|
+
ie(re(a.label), 1)
|
|
347
|
+
])
|
|
348
|
+
], 6)) : $("v-if", !0)
|
|
349
|
+
], 2));
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
var xe = /* @__PURE__ */ K(Oe, [["__file", "checkbox-button.vue"]]);
|
|
353
|
+
const Te = Ne({
|
|
354
|
+
modelValue: {
|
|
355
|
+
type: G(Array),
|
|
356
|
+
default: () => []
|
|
357
|
+
},
|
|
358
|
+
disabled: Boolean,
|
|
359
|
+
min: Number,
|
|
360
|
+
max: Number,
|
|
361
|
+
size: ce,
|
|
362
|
+
fill: String,
|
|
363
|
+
textColor: String,
|
|
364
|
+
tag: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: "div"
|
|
367
|
+
},
|
|
368
|
+
validateEvent: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
default: !0
|
|
371
|
+
},
|
|
372
|
+
options: {
|
|
373
|
+
type: G(Array)
|
|
374
|
+
},
|
|
375
|
+
props: {
|
|
376
|
+
type: G(Object),
|
|
377
|
+
default: () => Ce
|
|
378
|
+
},
|
|
379
|
+
...be(["ariaLabel"])
|
|
380
|
+
}), Ae = {
|
|
381
|
+
[F]: (e) => B(e),
|
|
382
|
+
change: (e) => B(e)
|
|
383
|
+
}, Ce = {
|
|
384
|
+
label: "label",
|
|
385
|
+
value: "value",
|
|
386
|
+
disabled: "disabled"
|
|
387
|
+
}, je = S({
|
|
388
|
+
name: "ElCheckboxGroup"
|
|
389
|
+
}), Me = /* @__PURE__ */ S({
|
|
390
|
+
...je,
|
|
391
|
+
props: Te,
|
|
392
|
+
emits: Ae,
|
|
393
|
+
setup(e, { emit: l }) {
|
|
394
|
+
const i = e, t = R("checkbox"), { formItem: d } = M(), { inputId: r, isLabeledByFormItem: b } = de(i, {
|
|
395
|
+
formItemContext: d
|
|
396
|
+
}), n = async (u) => {
|
|
397
|
+
l(F, u), await Z(), l(P, u);
|
|
398
|
+
}, v = m({
|
|
399
|
+
get() {
|
|
400
|
+
return i.modelValue;
|
|
401
|
+
},
|
|
402
|
+
set(u) {
|
|
403
|
+
n(u);
|
|
404
|
+
}
|
|
405
|
+
}), f = m(() => ({
|
|
406
|
+
...Ce,
|
|
407
|
+
...i.props
|
|
408
|
+
})), o = (u) => {
|
|
409
|
+
const h = {
|
|
410
|
+
label: u[f.value.label],
|
|
411
|
+
value: u[f.value.value],
|
|
412
|
+
disabled: u[f.value.disabled]
|
|
413
|
+
};
|
|
414
|
+
return { ...u, ...h };
|
|
415
|
+
};
|
|
416
|
+
return ye(L, {
|
|
417
|
+
...Be(Se(i), [
|
|
418
|
+
"size",
|
|
419
|
+
"min",
|
|
420
|
+
"max",
|
|
421
|
+
"disabled",
|
|
422
|
+
"validateEvent",
|
|
423
|
+
"fill",
|
|
424
|
+
"textColor"
|
|
425
|
+
]),
|
|
426
|
+
modelValue: v,
|
|
427
|
+
changeEvent: n
|
|
428
|
+
}), Y(() => i.modelValue, (u, h) => {
|
|
429
|
+
i.validateEvent && !fe(u, h) && (d == null || d.validate("change").catch((x) => ve()));
|
|
430
|
+
}), (u, h) => {
|
|
431
|
+
var x;
|
|
432
|
+
return V(), w(le(u.tag), {
|
|
433
|
+
id: s(r),
|
|
434
|
+
class: y(s(t).b("group")),
|
|
435
|
+
role: "group",
|
|
436
|
+
"aria-label": s(b) ? void 0 : u.ariaLabel || "checkbox-group",
|
|
437
|
+
"aria-labelledby": s(b) ? (x = s(d)) == null ? void 0 : x.labelId : void 0
|
|
438
|
+
}, {
|
|
439
|
+
default: ae(() => [
|
|
440
|
+
j(u.$slots, "default", {}, () => [
|
|
441
|
+
(V(!0), E(se, null, Le(i.options, (p, a) => (V(), w(ge, A({ key: a }, o(p)), null, 16))), 128))
|
|
442
|
+
])
|
|
443
|
+
]),
|
|
444
|
+
_: 3
|
|
445
|
+
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
var _e = /* @__PURE__ */ K(Me, [["__file", "checkbox-group.vue"]]);
|
|
450
|
+
const Qe = Fe(ge, {
|
|
451
|
+
CheckboxButton: xe,
|
|
452
|
+
CheckboxGroup: _e
|
|
453
|
+
});
|
|
454
|
+
me(xe);
|
|
455
|
+
const Xe = me(_e);
|
|
456
|
+
export {
|
|
457
|
+
Qe as E,
|
|
458
|
+
Xe as a
|
|
459
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),E=require("./use-form-common-props-fd9b61a0.cjs"),g=require("./el-popper-b6c99b28.cjs"),o=require("./base-ef747d02.cjs"),L=require("./index-c108567d.cjs"),B=require("./index-f1c702f6.cjs"),N={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:E.useSizeProp,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...g.useAriaProps(["ariaControls"])},I={[g.UPDATE_MODEL_EVENT]:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l),change:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l)},y=Symbol("checkboxGroupContextKey"),A=({model:l,isChecked:t})=>{const i=e.inject(y,void 0),n=e.computed(()=>{var c,b;const u=(c=i==null?void 0:i.max)==null?void 0:c.value,v=(b=i==null?void 0:i.min)==null?void 0:b.value;return!o.isUndefined(u)&&l.value.length>=u&&!t.value||!o.isUndefined(v)&&l.value.length<=v&&t.value});return{isDisabled:E.useFormDisabled(e.computed(()=>(i==null?void 0:i.disabled.value)||n.value)),isLimitDisabled:n}},w=(l,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:m,isLabeledByFormItem:c})=>{const b=e.inject(y,void 0),{formItem:u}=E.useFormItem(),{emit:v}=e.getCurrentInstance();function f(h){var a,C,k,d;return[!0,l.trueValue,l.trueLabel].includes(h)?(C=(a=l.trueValue)!=null?a:l.trueLabel)!=null?C:!0:(d=(k=l.falseValue)!=null?k:l.falseLabel)!=null?d:!1}function r(h,a){v(g.CHANGE_EVENT,f(h),a)}function s(h){if(i.value)return;const a=h.target;v(g.CHANGE_EVENT,f(a.checked),h)}async function p(h){i.value||!n.value&&!m.value&&c.value&&(h.composedPath().some(k=>k.tagName==="LABEL")||(t.value=f([!1,l.falseValue,l.falseLabel].includes(t.value)),await e.nextTick(),r(t.value,h)))}const x=e.computed(()=>(b==null?void 0:b.validateEvent)||l.validateEvent);return e.watch(()=>l.modelValue,()=>{x.value&&(u==null||u.validate("change").catch(h=>g.debugWarn()))}),{handleChange:s,onClickRoot:p}},G=l=>{const t=e.ref(!1),{emit:i}=e.getCurrentInstance(),n=e.inject(y,void 0),m=e.computed(()=>o.isUndefined(n)===!1),c=e.ref(!1),b=e.computed({get(){var u,v;return m.value?(u=n==null?void 0:n.modelValue)==null?void 0:u.value:(v=l.modelValue)!=null?v:t.value},set(u){var v,f;m.value&&o.isArray(u)?(c.value=((v=n==null?void 0:n.max)==null?void 0:v.value)!==void 0&&u.length>(n==null?void 0:n.max.value)&&u.length>b.value.length,c.value===!1&&((f=n==null?void 0:n.changeEvent)==null||f.call(n,u))):(i(g.UPDATE_MODEL_EVENT,u),t.value=u)}});return{model:b,isGroup:m,isLimitExceeded:c}},$=(l,t,{model:i})=>{const n=e.inject(y,void 0),m=e.ref(!1),c=e.computed(()=>o.isPropAbsent(l.value)?l.label:l.value),b=e.computed(()=>{const r=i.value;return o.isBoolean(r)?r:o.isArray(r)?o.isObject(c.value)?r.map(e.toRaw).some(s=>L.isEqual(s,c.value)):r.map(e.toRaw).includes(c.value):r!=null?r===l.trueValue||r===l.trueLabel:!!r}),u=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.size)==null?void 0:r.value}),{prop:!0}),v=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.size)==null?void 0:r.value})),f=e.computed(()=>!!t.default||!o.isPropAbsent(c.value));return{checkboxButtonSize:u,isChecked:b,isFocused:m,checkboxSize:v,hasOwnLabel:f,actualValue:c}},D=(l,t)=>{const{formItem:i}=E.useFormItem(),{model:n,isGroup:m,isLimitExceeded:c}=G(l),{isFocused:b,isChecked:u,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,actualValue:s}=$(l,t,{model:n}),{isDisabled:p}=A({model:n,isChecked:u}),{inputId:x,isLabeledByFormItem:h}=E.useFormItemInputId(l,{formItemContext:i,disableIdGeneration:r,disableIdManagement:m}),{handleChange:a,onClickRoot:C}=w(l,{model:n,isLimitExceeded:c,hasOwnLabel:r,isDisabled:p,isLabeledByFormItem:h});return(()=>{function d(){var _,V;o.isArray(n.value)&&!n.value.includes(s.value)?n.value.push(s.value):n.value=(V=(_=l.trueValue)!=null?_:l.trueLabel)!=null?V:!0}l.checked&&d()})(),B.useDeprecated({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>m.value&&o.isPropAbsent(l.value))),B.useDeprecated({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.trueLabel)),B.useDeprecated({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.falseLabel)),{inputId:x,isLabeledByFormItem:h,isChecked:u,isDisabled:p,isFocused:b,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,model:n,actualValue:s,handleChange:a,onClickRoot:C}},U=e.defineComponent({name:"ElCheckbox"}),O=e.defineComponent({...U,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{inputId:n,isLabeledByFormItem:m,isChecked:c,isDisabled:b,isFocused:u,checkboxSize:v,hasOwnLabel:f,model:r,actualValue:s,handleChange:p,onClickRoot:x}=D(t,i),h=e.computed(()=>{var d,_,V,S;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(_=(d=t.trueValue)!=null?d:t.trueLabel)!=null?_:!0,"false-value":(S=(V=t.falseValue)!=null?V:t.falseLabel)!=null?S:!1}:{value:s.value}}),a=o.useNamespace("checkbox"),C=e.computed(()=>[a.b(),a.m(v.value),a.is("disabled",b.value),a.is("bordered",t.border),a.is("checked",c.value)]),k=e.computed(()=>[a.e("input"),a.is("disabled",b.value),a.is("checked",c.value),a.is("indeterminate",t.indeterminate),a.is("focus",u.value)]);return(d,_)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(!e.unref(f)&&e.unref(m)?"span":"label"),{class:e.normalizeClass(e.unref(C)),"aria-controls":d.indeterminate?d.ariaControls:null,onClick:e.unref(x)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(k))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":V=>e.isRef(r)?r.value=V:null,class:e.unref(a).e("original"),type:"checkbox",indeterminate:d.indeterminate,name:d.name,tabindex:d.tabindex,disabled:e.unref(b)},e.unref(h),{onChange:e.unref(p),onFocus:V=>u.value=!0,onBlur:V=>u.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(r)]]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("inner"))},null,2)],2),e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("label"))},[e.renderSlot(d.$slots,"default"),d.$slots.default?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.label),1)],64))],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var P=o._export_sfc(O,[["__file","checkbox.vue"]]);const M=e.defineComponent({name:"ElCheckboxButton"}),j=e.defineComponent({...M,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{isFocused:n,isChecked:m,isDisabled:c,checkboxButtonSize:b,model:u,actualValue:v,handleChange:f}=D(t,i),r=e.computed(()=>{var a,C,k,d;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(C=(a=t.trueValue)!=null?a:t.trueLabel)!=null?C:!0,"false-value":(d=(k=t.falseValue)!=null?k:t.falseLabel)!=null?d:!1}:{value:v.value}}),s=e.inject(y,void 0),p=o.useNamespace("checkbox"),x=e.computed(()=>{var a,C,k,d;const _=(C=(a=s==null?void 0:s.fill)==null?void 0:a.value)!=null?C:"";return{backgroundColor:_,borderColor:_,color:(d=(k=s==null?void 0:s.textColor)==null?void 0:k.value)!=null?d:"",boxShadow:_?`-1px 0 0 0 ${_}`:void 0}}),h=e.computed(()=>[p.b("button"),p.bm("button",b.value),p.is("disabled",c.value),p.is("checked",m.value),p.is("focus",n.value)]);return(a,C)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(h))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":k=>e.isRef(u)?u.value=k:null,class:e.unref(p).be("button","original"),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:e.unref(c)},e.unref(r),{onChange:e.unref(f),onFocus:k=>n.value=!0,onBlur:k=>n.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["onUpdate:modelValue","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(u)]]),a.$slots.default||a.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(p).be("button","inner")),style:e.normalizeStyle(e.unref(m)?e.unref(x):void 0)},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.label),1)])],6)):e.createCommentVNode("v-if",!0)],2))}});var z=o._export_sfc(j,[["__file","checkbox-button.vue"]]);const q=o.buildProps({modelValue:{type:o.definePropType(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:E.useSizeProp,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:o.definePropType(Array)},props:{type:o.definePropType(Object),default:()=>F},...g.useAriaProps(["ariaLabel"])}),R={[g.UPDATE_MODEL_EVENT]:l=>o.isArray(l),change:l=>o.isArray(l)},F={label:"label",value:"value",disabled:"disabled"},K=e.defineComponent({name:"ElCheckboxGroup"}),H=e.defineComponent({...K,props:q,emits:R,setup(l,{emit:t}){const i=l,n=o.useNamespace("checkbox"),{formItem:m}=E.useFormItem(),{inputId:c,isLabeledByFormItem:b}=E.useFormItemInputId(i,{formItemContext:m}),u=async s=>{t(g.UPDATE_MODEL_EVENT,s),await e.nextTick(),t(g.CHANGE_EVENT,s)},v=e.computed({get(){return i.modelValue},set(s){u(s)}}),f=e.computed(()=>({...F,...i.props})),r=s=>{const p={label:s[f.value.label],value:s[f.value.value],disabled:s[f.value.disabled]};return{...s,...p}};return e.provide(y,{...g.pick(e.toRefs(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:v,changeEvent:u}),e.watch(()=>i.modelValue,(s,p)=>{i.validateEvent&&!L.isEqual(s,p)&&(m==null||m.validate("change").catch(x=>g.debugWarn()))}),(s,p)=>{var x;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{id:e.unref(c),class:e.normalizeClass(e.unref(n).b("group")),role:"group","aria-label":e.unref(b)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":e.unref(b)?(x=e.unref(m))==null?void 0:x.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options,(h,a)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:a},r(h)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var T=o._export_sfc(H,[["__file","checkbox-group.vue"]]);const W=o.withInstall(P,{CheckboxButton:z,CheckboxGroup:T});o.withNoopInstall(z);const J=o.withNoopInstall(T);exports.ElCheckbox=W;exports.ElCheckboxGroup=J;
|