st-comp 0.0.279 → 0.0.281
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/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -14
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +377 -376
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +294 -294
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +260 -260
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +579 -553
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +23 -24
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +30 -29
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +517 -425
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +43 -43
- package/es/User.cjs +1 -1
- package/es/User.js +898 -866
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +110 -109
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +615 -464
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +3079 -2913
- package/es/{VarietySelect-41daac7b.js → VarietySelect-3fc0f0ce.js} +5 -5
- package/es/{VarietySelect-d58eee29.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +51 -51
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +1927 -2259
- package/es/_baseClone-f8e5d3ba.cjs +1 -0
- package/es/_baseClone-fb6a3947.js +210 -0
- package/es/base-d987e5c9.cjs +5 -0
- package/es/base-dd156b8e.js +790 -0
- package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
- package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
- package/es/clamp-17c4d8aa.cjs +1 -0
- package/es/clamp-c7512966.js +10 -0
- package/es/config-provider-06d8207f.js +86 -0
- package/es/config-provider-bb61bd3e.cjs +1 -0
- package/es/debounce-0a98a9c6.js +57 -0
- package/es/debounce-37b17615.cjs +1 -0
- package/es/dropdown-8fa21bfd.cjs +1 -0
- package/es/dropdown-bcf8d198.js +178 -0
- package/es/el-autocomplete-13b9e372.cjs +1 -0
- package/es/el-autocomplete-419bfbcf.js +434 -0
- package/es/el-button-ee9fe159.js +343 -0
- package/es/el-button-fac5e058.cjs +1 -0
- package/es/el-checkbox-6cf1a71c.cjs +1 -0
- package/es/el-checkbox-b5ac7f04.js +566 -0
- package/es/el-dialog-060b3735.js +252 -0
- package/es/el-dialog-54aebacd.cjs +1 -0
- package/es/el-divider-3f0320be.cjs +1 -0
- package/es/el-divider-c5d72961.js +51 -0
- package/es/el-empty-552baf04.js +159 -0
- package/es/el-empty-58bc2a10.cjs +1 -0
- package/es/el-form-item-2be6b683.js +1265 -0
- package/es/el-form-item-758dfefa.cjs +12 -0
- package/es/el-input-7fe53030.cjs +1 -0
- package/es/el-input-d23f5442.js +761 -0
- package/es/el-input-number-484fb184.js +390 -0
- package/es/el-input-number-f0f4eedb.cjs +1 -0
- package/es/el-loading-9d3e405c.js +190 -0
- package/es/el-loading-fafaaa7b.cjs +1 -0
- package/es/el-menu-item-0ac22681.js +824 -0
- package/es/el-menu-item-c91ae430.cjs +1 -0
- package/es/el-message-box-568a0aa6.js +481 -0
- package/es/el-message-box-ceacb54e.cjs +1 -0
- package/es/el-overlay-9f36e73c.cjs +1 -0
- package/es/el-overlay-cb5c85aa.js +444 -0
- package/es/el-popconfirm-4a8cd35c.cjs +1 -0
- package/es/el-popconfirm-6f8e65c8.js +190 -0
- package/es/el-popper-0454c8e8.js +2235 -0
- package/es/el-popper-acd0ff35.cjs +1 -0
- package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
- package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
- package/es/el-segmented-64dc7258.js +168 -0
- package/es/el-segmented-eb3c8e65.cjs +1 -0
- package/es/el-select-a573c78b.js +1535 -0
- package/es/el-select-c317294a.cjs +1 -0
- package/es/el-table-column-1c443963.js +3651 -0
- package/es/el-table-column-f555115d.cjs +14 -0
- package/es/el-tag-2d8a3fe7.js +77 -0
- package/es/el-tag-dca1292c.cjs +1 -0
- package/es/el-text-649c986a.cjs +1 -0
- package/es/el-text-761e6717.js +84 -0
- package/es/index-11181b5f.cjs +1 -0
- package/es/index-21a3dc89.cjs +1 -0
- package/es/index-33e039e3.cjs +1 -0
- package/es/index-3806160e.js +710 -0
- package/es/{index-a9246d17.cjs → index-4614e8e9.cjs} +109 -109
- package/es/{index-44a382a5.js → index-53beef02.js} +12 -12
- package/es/index-5cada1ed.cjs +1 -0
- package/es/index-6a36e1fc.cjs +1 -0
- package/es/{index-eb96e074.js → index-6a52dc7c.js} +235 -236
- package/es/index-71ba4c28.cjs +1 -0
- package/es/index-78dab605.js +141 -0
- package/es/index-798fec2d.cjs +1 -0
- package/es/index-9573f74b.js +372 -0
- package/es/index-a181f161.js +429 -0
- package/es/{index-a33b2fb8.js → index-ab0ad219.js} +5090 -5090
- package/es/index-beb5cb7d.cjs +1 -0
- package/es/index-c09fc6f5.js +131 -0
- package/es/index-ceae4c47.cjs +1 -0
- package/es/index-d372e68f.cjs +5 -0
- package/es/index-d9379af4.js +413 -0
- package/es/index-dddacf80.js +47 -0
- package/es/index-de9ad85c.js +12 -0
- package/es/index-e2e58ea9.js +468 -0
- package/es/index-f5474dcc.cjs +3 -0
- package/es/{python-a3db9620.cjs → python-60e79979.cjs} +1 -1
- package/es/{python-8a1664e6.js → python-673bf8b8.js} +32 -31
- package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
- package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
- package/es/scroll-07bade1e.cjs +1 -0
- package/es/scroll-70271cb1.js +35 -0
- package/es/style.css +1 -1
- package/es/toNumber-b47ceb68.cjs +1 -0
- package/es/toNumber-f077c66a.js +31 -0
- package/es/use-form-item-76516e50.cjs +2 -0
- package/es/use-form-item-784142b4.js +422 -0
- package/es/use-global-config-7ff9a1c2.cjs +1 -0
- package/es/use-global-config-9a4ccf33.js +71 -0
- package/es/validator-1926345b.cjs +1 -0
- package/es/{validator-c60a8956.js → validator-a66ec4f8.js} +1 -1
- package/es/vnode-6f7b84f0.cjs +1 -0
- package/es/vnode-8ee9bf4e.js +12 -0
- package/es/{zh-cn-b59a0910.js → zh-cn-51c2e528.js} +36 -33
- package/es/zh-cn-ad12d9f5.cjs +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +265 -246
- package/lib/{index-62fa175a.js → index-7282d3be.js} +52335 -50156
- package/lib/{python-4a48fa39.js → python-418be57d.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_initCloneObject-5e73c9c8.js +0 -81
- package/es/_initCloneObject-a5832933.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/config-provider-06ea6b42.cjs +0 -1
- package/es/config-provider-88b637a8.js +0 -59
- package/es/dayjs.min-2c20abe6.cjs +0 -1
- package/es/dayjs.min-8313b006.js +0 -299
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-4ce4c3e2.cjs +0 -1
- package/es/dropdown-72fbc15d.js +0 -178
- package/es/el-autocomplete-6cafcdf1.js +0 -329
- package/es/el-autocomplete-e0857c5b.cjs +0 -1
- package/es/el-button-613e0bb2.cjs +0 -1
- package/es/el-button-94d3de38.js +0 -272
- package/es/el-checkbox-6d4cb393.js +0 -459
- package/es/el-checkbox-e90762df.cjs +0 -1
- package/es/el-dialog-02942e22.cjs +0 -1
- package/es/el-dialog-5e30161f.js +0 -276
- package/es/el-divider-4713d74c.cjs +0 -1
- package/es/el-divider-4e059794.js +0 -45
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-empty-33cb66f1.js +0 -183
- package/es/el-form-item-44f060d8.cjs +0 -12
- package/es/el-form-item-9e8969ea.js +0 -1269
- package/es/el-input-342b2def.js +0 -531
- package/es/el-input-9a9a7f7f.cjs +0 -1
- package/es/el-input-number-65c847d6.cjs +0 -1
- package/es/el-input-number-c22b803a.js +0 -311
- package/es/el-loading-8179b497.cjs +0 -1
- package/es/el-loading-bcc51e3d.js +0 -203
- package/es/el-menu-item-339baf6d.js +0 -768
- package/es/el-menu-item-83186444.cjs +0 -1
- package/es/el-message-box-035b699c.js +0 -489
- package/es/el-message-box-c62d3217.cjs +0 -1
- package/es/el-overlay-3e17604b.js +0 -324
- package/es/el-overlay-8f1da9e8.cjs +0 -1
- package/es/el-popconfirm-4e32ec1b.cjs +0 -1
- package/es/el-popconfirm-f8a86e2c.js +0 -162
- package/es/el-popper-a4f3ae4d.cjs +0 -1
- package/es/el-popper-fbd0dcea.js +0 -2094
- package/es/el-segmented-56bd58a8.js +0 -142
- package/es/el-segmented-833ac177.cjs +0 -1
- package/es/el-select-44fa547d.js +0 -1256
- package/es/el-select-70806166.cjs +0 -1
- package/es/el-table-column-3e2cdfca.cjs +0 -14
- package/es/el-table-column-b74a857d.js +0 -3432
- package/es/el-tag-66c83156.js +0 -117
- package/es/el-tag-9c2f329f.cjs +0 -1
- package/es/el-text-034bd3f4.js +0 -67
- package/es/el-text-6b2374bb.cjs +0 -1
- package/es/index-00f6ca75.cjs +0 -1
- package/es/index-185792a7.cjs +0 -1
- package/es/index-1e2a38ab.js +0 -113
- package/es/index-2e331d74.js +0 -10
- package/es/index-3153c1db.cjs +0 -1
- package/es/index-5216d5f5.js +0 -406
- package/es/index-5c0dd943.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-870b6c9d.cjs +0 -1
- package/es/index-8c2d7e05.js +0 -368
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9d16cea8.cjs +0 -1
- package/es/index-ac8dc53d.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c5f2d372.js +0 -326
- package/es/index-c6584658.js +0 -163
- package/es/index-d77a7336.js +0 -204
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index-f034b910.js +0 -60
- package/es/index-f1c702f6.cjs +0 -1
- package/es/index-f58b2920.cjs +0 -1
- package/es/scroll-679bd6bf.js +0 -35
- package/es/scroll-b108dabd.cjs +0 -1
- package/es/use-form-common-props-ac666630.cjs +0 -1
- package/es/use-form-common-props-ed72e914.js +0 -364
- package/es/use-global-config-23472471.cjs +0 -1
- package/es/use-global-config-ee406d58.js +0 -72
- package/es/validator-366dbf39.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/es/zh-cn-c21d12d8.cjs +0 -1
|
@@ -1,459 +0,0 @@
|
|
|
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-ed72e914.js";
|
|
3
|
-
import { u as be, U as F, d as ve, C as P, p as Be } from "./el-popper-fbd0dcea.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-8c2d7e05.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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),E=require("./use-form-common-props-ac666630.cjs"),g=require("./el-popper-a4f3ae4d.cjs"),o=require("./base-ef747d02.cjs"),L=require("./index-5c0dd943.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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./el-overlay-8f1da9e8.cjs"),T=require("./el-popper-a4f3ae4d.cjs"),I=require("./index-00f6ca75.cjs"),E=require("./base-ef747d02.cjs"),R=require("./use-form-common-props-ac666630.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;
|