st-comp 0.0.200 → 0.0.202
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/components.d.ts +3 -0
- package/es/ChartLayout.js +4 -4
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +1 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +44 -40
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +84 -78
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +21 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +345 -331
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +20 -18
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +610 -588
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +2 -2
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +74 -72
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +9 -157
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +56 -52
- package/es/User.cjs +1 -1
- package/es/User.js +1313 -1
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +28 -26
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +19 -18
- package/es/VarietySearch.cjs +8 -8
- package/es/VarietySearch.js +704 -697
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +12 -12
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +80 -79
- package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
- package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
- package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
- package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/debounce-8d53f4dd.js +83 -0
- package/es/dropdown-071c5d7e.cjs +1 -0
- package/es/dropdown-a59bba73.js +178 -0
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
- package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
- package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
- package/es/el-checkbox-7421ccd3.js +459 -0
- package/es/el-checkbox-c25236a6.cjs +1 -0
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
- package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
- package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/el-form-item-c53c374d.js +1269 -0
- package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
- package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
- package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
- package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
- package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
- package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
- package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
- package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
- package/es/el-message-box-a93d2f6a.js +489 -0
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
- package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
- package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
- package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
- package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
- package/es/el-popover-0ea8fbf8.cjs +1 -0
- package/es/el-popover-4ed993c7.js +1 -0
- package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
- package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
- package/es/el-scrollbar-323542e7.js +34 -0
- package/es/el-scrollbar-bc3f790d.cjs +1 -0
- package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
- package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
- package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/el-table-column-376cd907.js +3432 -0
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
- package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
- package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
- package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
- package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
- package/es/index-1f7d4f70.js +157 -0
- package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
- package/es/index-57672682.js +113 -0
- package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
- package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
- package/es/index-88546436.js +163 -0
- package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
- package/es/{index-e00ee015.js → index-960806da.js} +36 -36
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
- package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
- package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
- package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
- package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
- package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
- package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
- package/es/index-f3562b52.cjs +1 -0
- package/es/index-f967d6c1.cjs +1 -0
- package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
- package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
- package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
- package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
- package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
- package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
- package/es/vnode-5ddb7ed1.js +14 -0
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +156 -156
- package/lib/{index-410c490f.js → index-a45d1494.js} +11238 -11207
- package/lib/{python-589861d2.js → python-82d17c8d.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 +18 -8
- package/packages/KlinePlus/utils.js +41 -5
- package/src/pages/KlinePlus/index.vue +6 -5
- package/es/el-autocomplete-86c0d989.cjs +0 -1
- package/es/el-form-item-41becb31.js +0 -1749
- package/es/el-form-item-95476197.cjs +0 -12
- package/es/el-scrollbar-139aa96d.cjs +0 -1
- package/es/el-scrollbar-cdadd788.js +0 -115
- package/es/el-select-e1046cc6.cjs +0 -1
- package/es/el-table-column-91d69c86.js +0 -3882
- package/es/el-table-column-f1c4af89.cjs +0 -14
- package/es/index-56ea97a9.js +0 -122
- package/es/index-8583c047.cjs +0 -1
- package/es/index-ce63356a.cjs +0 -1
- package/es/index-db1e1861.js +0 -318
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as I, onMounted as _, watchEffect as J, onBeforeUnmount as G, defineComponent as A, inject as j, computed as L, openBlock as P, createElementBlock as B, unref as e, normalizeClass as h, normalizeStyle as K, createElementVNode as R, renderSlot as k, toDisplayString as Q, createVNode as S, withCtx as C, createBlock as N, resolveDynamicComponent as Z, createCommentVNode as O, useSlots as x, provide as ee, Transition as oe, mergeProps as q, withDirectives as se, createSlots as te, vShow as le } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { F as fe,
|
|
4
|
-
import { E as pe } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import { C as be } from "./use-form-common-props-
|
|
7
|
-
import { u as ye } from "./index-
|
|
2
|
+
import { e as ae, f as ne, g as V, d as re, a as ie, u as de, E as ce, c as ue } from "./el-overlay-09ad71cd.js";
|
|
3
|
+
import { F as fe, c as me, e as ve } from "./el-popper-b4f97157.js";
|
|
4
|
+
import { E as pe } from "./index-a871c3eb.js";
|
|
5
|
+
import { n as H, x as ge, _ as W, u as he, w as Ce } from "./base-a5af3db3.js";
|
|
6
|
+
import { C as be } from "./use-form-common-props-815d48a6.js";
|
|
7
|
+
import { u as ye } from "./index-d77a7336.js";
|
|
8
8
|
import { u as Ee } from "./index-2e331d74.js";
|
|
9
9
|
const we = (r, d, l, $) => {
|
|
10
10
|
const a = {
|
|
@@ -271,5 +271,6 @@ var Le = /* @__PURE__ */ W(Te, [["__file", "dialog.vue"]]);
|
|
|
271
271
|
const Oe = Ce(Le);
|
|
272
272
|
export {
|
|
273
273
|
Oe as E,
|
|
274
|
+
ke as c,
|
|
274
275
|
we as u
|
|
275
276
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./el-overlay-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./el-overlay-9e34965f.cjs"),T=require("./el-popper-b6c99b28.cjs"),I=require("./index-098c2447.cjs"),E=require("./base-ef747d02.cjs"),R=require("./use-form-common-props-fd9b61a0.cjs"),q=require("./index-bb833443.cjs"),V=require("./index-f1c702f6.cjs"),N=(r,d,s,k)=>{const l={offsetX:0,offsetY:0},c=e.ref(!1),h=(a,i)=>{if(r.value){const{offsetX:g,offsetY:C}=l,u=r.value.getBoundingClientRect(),f=u.left,t=u.top,m=u.width,w=u.height,D=document.documentElement.clientWidth,S=document.documentElement.clientHeight,z=-f+g,B=-t+C,P=D-f-m+g,M=S-t-(w<S?w:0)+C;k!=null&&k.value||(a=Math.min(Math.max(a,z),P),i=Math.min(Math.max(i,B),M)),l.offsetX=a,l.offsetY=i,r.value.style.transform=`translate(${E.addUnit(a)}, ${E.addUnit(i)})`}},v=a=>{const i=a.clientX,g=a.clientY,{offsetX:C,offsetY:u}=l,f=m=>{c.value||(c.value=!0);const w=C+m.clientX-i,D=u+m.clientY-g;h(w,D)},t=()=>{c.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",t)},n=()=>{d.value&&r.value&&(d.value.addEventListener("mousedown",v),window.addEventListener("resize",y))},b=()=>{d.value&&r.value&&(d.value.removeEventListener("mousedown",v),window.removeEventListener("resize",y))},$=()=>{l.offsetX=0,l.offsetY=0,r.value&&(r.value.style.transform="")},y=()=>{const{offsetX:a,offsetY:i}=l;h(a,i)};return e.onMounted(()=>{e.watchEffect(()=>{s.value?n():b()})}),e.onBeforeUnmount(()=>{b()}),{isDragging:c,resetPosition:$,updatePosition:y}},F=(...r)=>d=>{r.forEach(s=>{E.isFunction(s)?s(d):s.value=d})},A=e.defineComponent({name:"ElDialogContent"}),Y=e.defineComponent({...A,props:p.dialogContentProps,emits:p.dialogContentEmits,setup(r,{expose:d}){const s=r,{t:k}=q.useLocale(),{Close:l}=R.CloseComponents,{dialogRef:c,headerRef:h,bodyId:v,ns:n,style:b}=e.inject(p.dialogInjectionKey),{focusTrapRef:$}=e.inject(T.FOCUS_TRAP_INJECTION_KEY),y=F($,c),a=e.computed(()=>!!s.draggable),i=e.computed(()=>!!s.overflow),{resetPosition:g,updatePosition:C,isDragging:u}=N(c,h,a,i),f=e.computed(()=>[n.b(),n.is("fullscreen",s.fullscreen),n.is("draggable",a.value),n.is("dragging",u.value),n.is("align-center",!!s.alignCenter),{[n.m("center")]:s.center}]);return d({resetPosition:g,updatePosition:C}),(t,m)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(y),class:e.normalizeClass(e.unref(f)),style:e.normalizeStyle(e.unref(b)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:h,class:e.normalizeClass([e.unref(n).e("header"),t.headerClass,{"show-close":t.showClose}])},[e.renderSlot(t.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":t.ariaLevel,class:e.normalizeClass(e.unref(n).e("title"))},e.toDisplayString(t.title),11,["aria-level"])]),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(k)("el.dialog.close"),class:e.normalizeClass(e.unref(n).e("headerbtn")),type:"button",onClick:w=>t.$emit("close")},[e.createVNode(e.unref(I.ElIcon),{class:e.normalizeClass(e.unref(n).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.closeIcon||e.unref(l))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(v),class:e.normalizeClass([e.unref(n).e("body"),t.bodyClass])},[e.renderSlot(t.$slots,"default")],10,["id"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(n).e("footer"),t.footerClass])},[e.renderSlot(t.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var X=E._export_sfc(Y,[["__file","dialog-content.vue"]]);const j=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),O=e.defineComponent({...j,props:p.dialogProps,emits:p.dialogEmits,setup(r,{expose:d}){const s=r,k=e.useSlots();V.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!k.title));const l=E.useNamespace("dialog"),c=e.ref(),h=e.ref(),v=e.ref(),{visible:n,titleId:b,bodyId:$,style:y,overlayDialogStyle:a,rendered:i,transitionConfig:g,zIndex:C,_draggable:u,_alignCenter:f,_overflow:t,handleClose:m,onModalClick:w,onOpenAutoFocus:D,onCloseAutoFocus:S,onCloseRequested:z,onFocusoutPrevented:B}=p.useDialog(s,c);e.provide(p.dialogInjectionKey,{dialogRef:c,headerRef:h,bodyId:$,ns:l,rendered:i,style:y});const P=p.useSameTarget(w),M=e.computed(()=>s.modalPenetrable&&!s.modal&&!s.fullscreen);return d({visible:n,dialogContentRef:v,resetPosition:()=>{var o;(o=v.value)==null||o.resetPosition()},handleClose:m}),(o,H)=>(e.openBlock(),e.createBlock(e.unref(T.ElTeleport),{to:o.appendTo,disabled:o.appendTo!=="body"?!1:!o.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,e.mergeProps(e.unref(g),{persisted:""}),{default:e.withCtx(()=>{var L;return[e.withDirectives(e.createVNode(e.unref(p.ElOverlay),{"custom-mask-event":"",mask:o.modal,"overlay-class":[(L=o.modalClass)!=null?L:"",`${e.unref(l).namespace.value}-modal-dialog`,e.unref(l).is("penetrable",e.unref(M))],"z-index":e.unref(C)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":o.title||void 0,"aria-labelledby":o.title?void 0:e.unref(b),"aria-describedby":e.unref($),class:e.normalizeClass(`${e.unref(l).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(a)),onClick:e.unref(P).onClick,onMousedown:e.unref(P).onMousedown,onMouseup:e.unref(P).onMouseup},[e.createVNode(e.unref(T.ElFocusTrap),{loop:"",trapped:e.unref(n),"focus-start-el":"container",onFocusAfterTrapped:e.unref(D),onFocusAfterReleased:e.unref(S),onFocusoutPrevented:e.unref(B),onReleaseRequested:e.unref(z)},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createBlock(X,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:v},o.$attrs,{center:o.center,"align-center":e.unref(f),"close-icon":o.closeIcon,draggable:e.unref(u),overflow:e.unref(t),fullscreen:o.fullscreen,"header-class":o.headerClass,"body-class":o.bodyClass,"footer-class":o.footerClass,"show-close":o.showClose,title:o.title,"aria-level":o.headerAriaLevel,onClose:e.unref(m)}),e.createSlots({header:e.withCtx(()=>[o.$slots.title?e.renderSlot(o.$slots,"title",{key:1}):e.renderSlot(o.$slots,"header",{key:0,close:e.unref(m),titleId:e.unref(b),titleClass:e.unref(l).e("title")})]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:2},[o.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(n)]])]}),_:3},16)]),_:3},8,["to","disabled"]))}});var U=E._export_sfc(O,[["__file","dialog.vue"]]);const K=E.withInstall(U);exports.ElDialog=K;exports.composeRefs=F;exports.useDraggable=N;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as c, openBlock as o, createElementBlock as i, normalizeClass as s, unref as r, normalizeStyle as p, renderSlot as u, createCommentVNode as v } from "vue";
|
|
2
|
-
import { b as f,
|
|
2
|
+
import { b as f, e as m, u as y, _ as S, w as _ } from "./base-a5af3db3.js";
|
|
3
3
|
const b = f({
|
|
4
4
|
direction: {
|
|
5
5
|
type: String,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, openBlock as r, createElementBlock as n, createElementVNode as l, unref as t, computed as d, normalizeClass as i, normalizeStyle as k, renderSlot as m, createVNode as v, toDisplayString as $, createCommentVNode as h } from "vue";
|
|
2
|
-
import { u, _ as y, b as _,
|
|
3
|
-
import { u as B } from "./index-
|
|
4
|
-
import { u as V } from "./index-
|
|
2
|
+
import { u, _ as y, b as _, n as N, w } from "./base-a5af3db3.js";
|
|
3
|
+
import { u as B } from "./index-960806da.js";
|
|
4
|
+
import { u as V } from "./index-d77a7336.js";
|
|
5
5
|
const x = c({
|
|
6
6
|
name: "ImgEmpty"
|
|
7
7
|
}), E = /* @__PURE__ */ c({
|