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,329 +0,0 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as k, useAttrs as Ce, ref as d, onBeforeUnmount as Se, onMounted as Ie, openBlock as b, createBlock as Ne, unref as t, withCtx as v, createElementVNode as X, normalizeClass as y, normalizeStyle as Y, createElementBlock as w, withModifiers as N, renderSlot as g, createCommentVNode as Z, createVNode as T, Fragment as Te, renderList as Ae, createTextVNode as Fe, toDisplayString as Pe, mergeProps as x, withKeys as C, createSlots as Ve } from "vue";
|
|
2
|
-
import { g as _e, x as Be } from "./use-form-common-props-ed72e914.js";
|
|
3
|
-
import { E as De, l as Oe } from "./index-eb96e074.js";
|
|
4
|
-
import { i as se, E as Ke } from "./el-input-342b2def.js";
|
|
5
|
-
import { E as Re } from "./index-c5f2d372.js";
|
|
6
|
-
import { g as ee, U as A, I as K, C as le, p as Me, E as Ue, b as We } from "./el-popper-fbd0dcea.js";
|
|
7
|
-
import { b as Le, e as te, N as He, c as B, p as D, f as qe, u as je, _ as ze, j as O, w as Ge } from "./base-a5af3db3.js";
|
|
8
|
-
import { u as Je } from "./index-960806da.js";
|
|
9
|
-
import { d as Qe } from "./debounce-8d53f4dd.js";
|
|
10
|
-
const Xe = Le({
|
|
11
|
-
...se,
|
|
12
|
-
valueKey: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "value"
|
|
15
|
-
},
|
|
16
|
-
modelValue: {
|
|
17
|
-
type: [String, Number],
|
|
18
|
-
default: ""
|
|
19
|
-
},
|
|
20
|
-
debounce: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 300
|
|
23
|
-
},
|
|
24
|
-
placement: {
|
|
25
|
-
type: te(String),
|
|
26
|
-
values: [
|
|
27
|
-
"top",
|
|
28
|
-
"top-start",
|
|
29
|
-
"top-end",
|
|
30
|
-
"bottom",
|
|
31
|
-
"bottom-start",
|
|
32
|
-
"bottom-end"
|
|
33
|
-
],
|
|
34
|
-
default: "bottom-start"
|
|
35
|
-
},
|
|
36
|
-
fetchSuggestions: {
|
|
37
|
-
type: te([Function, Array]),
|
|
38
|
-
default: He
|
|
39
|
-
},
|
|
40
|
-
popperClass: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ""
|
|
43
|
-
},
|
|
44
|
-
triggerOnFocus: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !0
|
|
47
|
-
},
|
|
48
|
-
selectWhenUnmatched: Boolean,
|
|
49
|
-
hideLoading: Boolean,
|
|
50
|
-
teleported: ee.teleported,
|
|
51
|
-
appendTo: ee.appendTo,
|
|
52
|
-
highlightFirstItem: Boolean,
|
|
53
|
-
fitInputWidth: Boolean
|
|
54
|
-
}), Ye = {
|
|
55
|
-
[A]: (l) => B(l) || D(l),
|
|
56
|
-
[K]: (l) => B(l) || D(l),
|
|
57
|
-
[le]: (l) => B(l) || D(l),
|
|
58
|
-
focus: (l) => l instanceof FocusEvent,
|
|
59
|
-
blur: (l) => l instanceof FocusEvent,
|
|
60
|
-
clear: () => !0,
|
|
61
|
-
select: (l) => qe(l)
|
|
62
|
-
}, ae = "ElAutocomplete", Ze = oe({
|
|
63
|
-
name: ae,
|
|
64
|
-
inheritAttrs: !1
|
|
65
|
-
}), xe = /* @__PURE__ */ oe({
|
|
66
|
-
...Ze,
|
|
67
|
-
props: Xe,
|
|
68
|
-
emits: Ye,
|
|
69
|
-
setup(l, { expose: ne, emit: i }) {
|
|
70
|
-
const n = l, re = k(() => Me(n, Object.keys(se))), ue = Ce(), R = _e(), r = je("autocomplete"), p = d(), M = d(), S = d(), U = d();
|
|
71
|
-
let W = !1, F = !1;
|
|
72
|
-
const c = d([]), a = d(-1), L = d(""), f = d(!1), I = d(!1), h = d(!1), E = Je(), ie = k(() => ue.style), m = k(() => (c.value.length > 0 || h.value) && f.value), H = k(() => !n.hideLoading && h.value), ce = k(() => p.value ? Array.from(p.value.$el.querySelectorAll("input")) : []), pe = () => {
|
|
73
|
-
m.value && (L.value = `${p.value.$el.offsetWidth}px`);
|
|
74
|
-
}, de = () => {
|
|
75
|
-
a.value = -1;
|
|
76
|
-
}, q = async (e) => {
|
|
77
|
-
if (I.value)
|
|
78
|
-
return;
|
|
79
|
-
const o = (s) => {
|
|
80
|
-
h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) : We(ae, "autocomplete suggestions must be an array"));
|
|
81
|
-
};
|
|
82
|
-
if (h.value = !0, O(n.fetchSuggestions))
|
|
83
|
-
o(n.fetchSuggestions);
|
|
84
|
-
else {
|
|
85
|
-
const s = await n.fetchSuggestions(e, o);
|
|
86
|
-
O(s) && o(s);
|
|
87
|
-
}
|
|
88
|
-
}, j = Qe(q, n.debounce), fe = (e) => {
|
|
89
|
-
const o = !!e;
|
|
90
|
-
if (i(K, e), i(A, e), I.value = !1, f.value || (f.value = o), !n.triggerOnFocus && !e) {
|
|
91
|
-
I.value = !0, c.value = [];
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
j(e);
|
|
95
|
-
}, ve = (e) => {
|
|
96
|
-
var o;
|
|
97
|
-
R.value || (((o = e.target) == null ? void 0 : o.tagName) !== "INPUT" || ce.value.includes(document.activeElement)) && (f.value = !0);
|
|
98
|
-
}, ge = (e) => {
|
|
99
|
-
i(le, e);
|
|
100
|
-
}, me = (e) => {
|
|
101
|
-
var o;
|
|
102
|
-
if (F)
|
|
103
|
-
F = !1;
|
|
104
|
-
else {
|
|
105
|
-
f.value = !0, i("focus", e);
|
|
106
|
-
const s = (o = n.modelValue) != null ? o : "";
|
|
107
|
-
n.triggerOnFocus && !W && j(String(s));
|
|
108
|
-
}
|
|
109
|
-
}, he = (e) => {
|
|
110
|
-
setTimeout(() => {
|
|
111
|
-
var o;
|
|
112
|
-
if ((o = S.value) != null && o.isFocusInsideContent()) {
|
|
113
|
-
F = !0;
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
f.value && $(), i("blur", e);
|
|
117
|
-
});
|
|
118
|
-
}, be = () => {
|
|
119
|
-
f.value = !1, i(A, ""), i("clear");
|
|
120
|
-
}, z = async () => {
|
|
121
|
-
var e;
|
|
122
|
-
(e = p.value) != null && e.isComposing || (m.value && a.value >= 0 && a.value < c.value.length ? P(c.value[a.value]) : n.selectWhenUnmatched && (i("select", { value: n.modelValue }), c.value = [], a.value = -1));
|
|
123
|
-
}, ye = (e) => {
|
|
124
|
-
m.value && (e.preventDefault(), e.stopPropagation(), $());
|
|
125
|
-
}, $ = () => {
|
|
126
|
-
f.value = !1;
|
|
127
|
-
}, Ee = () => {
|
|
128
|
-
var e;
|
|
129
|
-
(e = p.value) == null || e.focus();
|
|
130
|
-
}, $e = () => {
|
|
131
|
-
var e;
|
|
132
|
-
(e = p.value) == null || e.blur();
|
|
133
|
-
}, P = async (e) => {
|
|
134
|
-
i(K, e[n.valueKey]), i(A, e[n.valueKey]), i("select", e), c.value = [], a.value = -1;
|
|
135
|
-
}, V = (e) => {
|
|
136
|
-
var o, s;
|
|
137
|
-
if (!m.value || h.value)
|
|
138
|
-
return;
|
|
139
|
-
if (e < 0) {
|
|
140
|
-
a.value = -1;
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
e >= c.value.length && (e = c.value.length - 1);
|
|
144
|
-
const u = M.value.querySelector(`.${r.be("suggestion", "wrap")}`), we = u.querySelectorAll(`.${r.be("suggestion", "list")} li`)[e], J = u.scrollTop, { offsetTop: Q, scrollHeight: _ } = we;
|
|
145
|
-
Q + _ > J + u.clientHeight && (u.scrollTop += _), Q < J && (u.scrollTop -= _), a.value = e, (s = (o = p.value) == null ? void 0 : o.ref) == null || s.setAttribute("aria-activedescendant", `${E.value}-item-${a.value}`);
|
|
146
|
-
}, G = Be(U, () => {
|
|
147
|
-
var e;
|
|
148
|
-
(e = S.value) != null && e.isFocusInsideContent() || m.value && $();
|
|
149
|
-
});
|
|
150
|
-
return Se(() => {
|
|
151
|
-
G == null || G();
|
|
152
|
-
}), Ie(() => {
|
|
153
|
-
var e;
|
|
154
|
-
const o = (e = p.value) == null ? void 0 : e.ref;
|
|
155
|
-
o && ([
|
|
156
|
-
{ key: "role", value: "textbox" },
|
|
157
|
-
{ key: "aria-autocomplete", value: "list" },
|
|
158
|
-
{ key: "aria-controls", value: "id" },
|
|
159
|
-
{
|
|
160
|
-
key: "aria-activedescendant",
|
|
161
|
-
value: `${E.value}-item-${a.value}`
|
|
162
|
-
}
|
|
163
|
-
].forEach(({ key: s, value: u }) => o.setAttribute(s, u)), W = o.hasAttribute("readonly"));
|
|
164
|
-
}), ne({
|
|
165
|
-
highlightedIndex: a,
|
|
166
|
-
activated: f,
|
|
167
|
-
loading: h,
|
|
168
|
-
inputRef: p,
|
|
169
|
-
popperRef: S,
|
|
170
|
-
suggestions: c,
|
|
171
|
-
handleSelect: P,
|
|
172
|
-
handleKeyEnter: z,
|
|
173
|
-
focus: Ee,
|
|
174
|
-
blur: $e,
|
|
175
|
-
close: $,
|
|
176
|
-
highlight: V,
|
|
177
|
-
getData: q
|
|
178
|
-
}), (e, o) => (b(), Ne(t(Ue), {
|
|
179
|
-
ref_key: "popperRef",
|
|
180
|
-
ref: S,
|
|
181
|
-
visible: t(m),
|
|
182
|
-
placement: e.placement,
|
|
183
|
-
"fallback-placements": ["bottom-start", "top-start"],
|
|
184
|
-
"popper-class": [t(r).e("popper"), e.popperClass],
|
|
185
|
-
teleported: e.teleported,
|
|
186
|
-
"append-to": e.appendTo,
|
|
187
|
-
"gpu-acceleration": !1,
|
|
188
|
-
pure: "",
|
|
189
|
-
"manual-mode": "",
|
|
190
|
-
effect: "light",
|
|
191
|
-
trigger: "click",
|
|
192
|
-
transition: `${t(r).namespace.value}-zoom-in-top`,
|
|
193
|
-
persistent: "",
|
|
194
|
-
role: "listbox",
|
|
195
|
-
onBeforeShow: pe,
|
|
196
|
-
onHide: de
|
|
197
|
-
}, {
|
|
198
|
-
content: v(() => [
|
|
199
|
-
X("div", {
|
|
200
|
-
ref_key: "regionRef",
|
|
201
|
-
ref: M,
|
|
202
|
-
class: y([t(r).b("suggestion"), t(r).is("loading", t(H))]),
|
|
203
|
-
style: Y({
|
|
204
|
-
[e.fitInputWidth ? "width" : "minWidth"]: L.value,
|
|
205
|
-
outline: "none"
|
|
206
|
-
}),
|
|
207
|
-
role: "region"
|
|
208
|
-
}, [
|
|
209
|
-
e.$slots.header ? (b(), w("div", {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: y(t(r).be("suggestion", "header")),
|
|
212
|
-
onClick: N(() => {
|
|
213
|
-
}, ["stop"])
|
|
214
|
-
}, [
|
|
215
|
-
g(e.$slots, "header")
|
|
216
|
-
], 10, ["onClick"])) : Z("v-if", !0),
|
|
217
|
-
T(t(Re), {
|
|
218
|
-
id: t(E),
|
|
219
|
-
tag: "ul",
|
|
220
|
-
"wrap-class": t(r).be("suggestion", "wrap"),
|
|
221
|
-
"view-class": t(r).be("suggestion", "list"),
|
|
222
|
-
role: "listbox"
|
|
223
|
-
}, {
|
|
224
|
-
default: v(() => [
|
|
225
|
-
t(H) ? (b(), w("li", { key: 0 }, [
|
|
226
|
-
g(e.$slots, "loading", {}, () => [
|
|
227
|
-
T(t(De), {
|
|
228
|
-
class: y(t(r).is("loading"))
|
|
229
|
-
}, {
|
|
230
|
-
default: v(() => [
|
|
231
|
-
T(t(Oe))
|
|
232
|
-
]),
|
|
233
|
-
_: 1
|
|
234
|
-
}, 8, ["class"])
|
|
235
|
-
])
|
|
236
|
-
])) : (b(!0), w(Te, { key: 1 }, Ae(c.value, (s, u) => (b(), w("li", {
|
|
237
|
-
id: `${t(E)}-item-${u}`,
|
|
238
|
-
key: u,
|
|
239
|
-
class: y({ highlighted: a.value === u }),
|
|
240
|
-
role: "option",
|
|
241
|
-
"aria-selected": a.value === u,
|
|
242
|
-
onClick: (ke) => P(s)
|
|
243
|
-
}, [
|
|
244
|
-
g(e.$slots, "default", { item: s }, () => [
|
|
245
|
-
Fe(Pe(s[e.valueKey]), 1)
|
|
246
|
-
])
|
|
247
|
-
], 10, ["id", "aria-selected", "onClick"]))), 128))
|
|
248
|
-
]),
|
|
249
|
-
_: 3
|
|
250
|
-
}, 8, ["id", "wrap-class", "view-class"]),
|
|
251
|
-
e.$slots.footer ? (b(), w("div", {
|
|
252
|
-
key: 1,
|
|
253
|
-
class: y(t(r).be("suggestion", "footer")),
|
|
254
|
-
onClick: N(() => {
|
|
255
|
-
}, ["stop"])
|
|
256
|
-
}, [
|
|
257
|
-
g(e.$slots, "footer")
|
|
258
|
-
], 10, ["onClick"])) : Z("v-if", !0)
|
|
259
|
-
], 6)
|
|
260
|
-
]),
|
|
261
|
-
default: v(() => [
|
|
262
|
-
X("div", {
|
|
263
|
-
ref_key: "listboxRef",
|
|
264
|
-
ref: U,
|
|
265
|
-
class: y([t(r).b(), e.$attrs.class]),
|
|
266
|
-
style: Y(t(ie)),
|
|
267
|
-
role: "combobox",
|
|
268
|
-
"aria-haspopup": "listbox",
|
|
269
|
-
"aria-expanded": t(m),
|
|
270
|
-
"aria-owns": t(E)
|
|
271
|
-
}, [
|
|
272
|
-
T(t(Ke), x({
|
|
273
|
-
ref_key: "inputRef",
|
|
274
|
-
ref: p
|
|
275
|
-
}, x(t(re), e.$attrs), {
|
|
276
|
-
"model-value": e.modelValue,
|
|
277
|
-
disabled: t(R),
|
|
278
|
-
onInput: fe,
|
|
279
|
-
onChange: ge,
|
|
280
|
-
onFocus: me,
|
|
281
|
-
onBlur: he,
|
|
282
|
-
onClear: be,
|
|
283
|
-
onKeydown: [
|
|
284
|
-
C(N((s) => V(a.value - 1), ["prevent"]), ["up"]),
|
|
285
|
-
C(N((s) => V(a.value + 1), ["prevent"]), ["down"]),
|
|
286
|
-
C(z, ["enter"]),
|
|
287
|
-
C($, ["tab"]),
|
|
288
|
-
C(ye, ["esc"])
|
|
289
|
-
],
|
|
290
|
-
onMousedown: ve
|
|
291
|
-
}), Ve({
|
|
292
|
-
_: 2
|
|
293
|
-
}, [
|
|
294
|
-
e.$slots.prepend ? {
|
|
295
|
-
name: "prepend",
|
|
296
|
-
fn: v(() => [
|
|
297
|
-
g(e.$slots, "prepend")
|
|
298
|
-
])
|
|
299
|
-
} : void 0,
|
|
300
|
-
e.$slots.append ? {
|
|
301
|
-
name: "append",
|
|
302
|
-
fn: v(() => [
|
|
303
|
-
g(e.$slots, "append")
|
|
304
|
-
])
|
|
305
|
-
} : void 0,
|
|
306
|
-
e.$slots.prefix ? {
|
|
307
|
-
name: "prefix",
|
|
308
|
-
fn: v(() => [
|
|
309
|
-
g(e.$slots, "prefix")
|
|
310
|
-
])
|
|
311
|
-
} : void 0,
|
|
312
|
-
e.$slots.suffix ? {
|
|
313
|
-
name: "suffix",
|
|
314
|
-
fn: v(() => [
|
|
315
|
-
g(e.$slots, "suffix")
|
|
316
|
-
])
|
|
317
|
-
} : void 0
|
|
318
|
-
]), 1040, ["model-value", "disabled", "onKeydown"])
|
|
319
|
-
], 14, ["aria-expanded", "aria-owns"])
|
|
320
|
-
]),
|
|
321
|
-
_: 3
|
|
322
|
-
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
var et = /* @__PURE__ */ ze(xe, [["__file", "autocomplete.vue"]]);
|
|
326
|
-
const ct = Ge(et);
|
|
327
|
-
export {
|
|
328
|
-
ct as E
|
|
329
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),K=require("./use-form-common-props-ac666630.cjs"),M=require("./index-00f6ca75.cjs"),S=require("./el-input-9a9a7f7f.cjs"),se=require("./index-185792a7.cjs"),u=require("./el-popper-a4f3ae4d.cjs"),n=require("./base-ef747d02.cjs"),re=require("./index-9780a537.cjs"),ae=require("./debounce-62f5b6e8.cjs"),ue=n.buildProps({...S.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:n.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:n.definePropType([Function,Array]),default:n.NOOP},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:u.useTooltipContentProps.teleported,appendTo:u.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),ie={[u.UPDATE_MODEL_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.INPUT_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.CHANGE_EVENT]:s=>n.isString(s)||n.isNumber(s),focus:s=>s instanceof FocusEvent,blur:s=>s instanceof FocusEvent,clear:()=>!0,select:s=>n.isObject(s)},U="ElAutocomplete",ce=e.defineComponent({name:U,inheritAttrs:!1}),de=e.defineComponent({...ce,props:ue,emits:ie,setup(s,{expose:z,emit:d}){const a=s,L=e.computed(()=>u.pick(a,Object.keys(S.inputProps))),R=e.useAttrs(),T=K.useFormDisabled(),i=n.useNamespace("autocomplete"),f=e.ref(),$=e.ref(),b=e.ref(),A=e.ref();let P=!1,C=!1;const p=e.ref([]),r=e.ref(-1),V=e.ref(""),v=e.ref(!1),E=e.ref(!1),m=e.ref(!1),h=re.useId(),W=e.computed(()=>R.style),g=e.computed(()=>(p.value.length>0||m.value)&&v.value),I=e.computed(()=>!a.hideLoading&&m.value),H=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),x=()=>{g.value&&(V.value=`${f.value.$el.offsetWidth}px`)},G=()=>{r.value=-1},_=async t=>{if(E.value)return;const o=l=>{m.value=!1,!E.value&&(n.isArray(l)?(p.value=l,r.value=a.highlightFirstItem?0:-1):u.throwError(U,"autocomplete suggestions must be an array"))};if(m.value=!0,n.isArray(a.fetchSuggestions))o(a.fetchSuggestions);else{const l=await a.fetchSuggestions(t,o);n.isArray(l)&&o(l)}},B=ae.debounce(_,a.debounce),j=t=>{const o=!!t;if(d(u.INPUT_EVENT,t),d(u.UPDATE_MODEL_EVENT,t),E.value=!1,v.value||(v.value=o),!a.triggerOnFocus&&!t){E.value=!0,p.value=[];return}B(t)},J=t=>{var o;T.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||H.value.includes(document.activeElement))&&(v.value=!0)},Q=t=>{d(u.CHANGE_EVENT,t)},X=t=>{var o;if(C)C=!1;else{v.value=!0,d("focus",t);const l=(o=a.modelValue)!=null?o:"";a.triggerOnFocus&&!P&&B(String(l))}},Y=t=>{setTimeout(()=>{var o;if((o=b.value)!=null&&o.isFocusInsideContent()){C=!0;return}v.value&&y(),d("blur",t)})},Z=()=>{v.value=!1,d(u.UPDATE_MODEL_EVENT,""),d("clear")},D=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&r.value>=0&&r.value<p.value.length?w(p.value[r.value]):a.selectWhenUnmatched&&(d("select",{value:a.modelValue}),p.value=[],r.value=-1))},ee=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),y())},y=()=>{v.value=!1},te=()=>{var t;(t=f.value)==null||t.focus()},oe=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{d(u.INPUT_EVENT,t[a.valueKey]),d(u.UPDATE_MODEL_EVENT,t[a.valueKey]),d("select",t),p.value=[],r.value=-1},k=t=>{var o,l;if(!g.value||m.value)return;if(t<0){r.value=-1;return}t>=p.value.length&&(t=p.value.length-1);const c=$.value.querySelector(`.${i.be("suggestion","wrap")}`),ne=c.querySelectorAll(`.${i.be("suggestion","list")} li`)[t],O=c.scrollTop,{offsetTop:q,scrollHeight:N}=ne;q+N>O+c.clientHeight&&(c.scrollTop+=N),q<O&&(c.scrollTop-=N),r.value=t,(l=(o=f.value)==null?void 0:o.ref)==null||l.setAttribute("aria-activedescendant",`${h.value}-item-${r.value}`)},F=K.onClickOutside(A,()=>{var t;(t=b.value)!=null&&t.isFocusInsideContent()||g.value&&y()});return e.onBeforeUnmount(()=>{F==null||F()}),e.onMounted(()=>{var t;const o=(t=f.value)==null?void 0:t.ref;o&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${h.value}-item-${r.value}`}].forEach(({key:l,value:c})=>o.setAttribute(l,c)),P=o.hasAttribute("readonly"))}),z({highlightedIndex:r,activated:v,loading:m,inputRef:f,popperRef:b,suggestions:p,handleSelect:w,handleKeyEnter:D,focus:te,blur:oe,close:y,highlight:k,getData:_}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(u.ElTooltip),{ref_key:"popperRef",ref:b,visible:e.unref(g),placement:t.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(i).e("popper"),t.popperClass],teleported:t.teleported,"append-to":t.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:x,onHide:G},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:$,class:e.normalizeClass([e.unref(i).b("suggestion"),e.unref(i).is("loading",e.unref(I))]),style:e.normalizeStyle({[t.fitInputWidth?"width":"minWidth"]:V.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).be("suggestion","header")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"header")],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(se.ElScrollbar),{id:e.unref(h),tag:"ul","wrap-class":e.unref(i).be("suggestion","wrap"),"view-class":e.unref(i).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[e.unref(I)?(e.openBlock(),e.createElementBlock("li",{key:0},[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(M.ElIcon),{class:e.normalizeClass(e.unref(i).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,(l,c)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(h)}-item-${c}`,key:c,class:e.normalizeClass({highlighted:r.value===c}),role:"option","aria-selected":r.value===c,onClick:le=>w(l)},[e.renderSlot(t.$slots,"default",{item:l},()=>[e.createTextVNode(e.toDisplayString(l[t.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).be("suggestion","footer")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"footer")],10,["onClick"])):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:A,class:e.normalizeClass([e.unref(i).b(),t.$attrs.class]),style:e.normalizeStyle(e.unref(W)),role:"combobox","aria-haspopup":"listbox","aria-expanded":e.unref(g),"aria-owns":e.unref(h)},[e.createVNode(e.unref(S.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(e.unref(L),t.$attrs),{"model-value":t.modelValue,disabled:e.unref(T),onInput:j,onChange:Q,onFocus:X,onBlur:Y,onClear:Z,onKeydown:[e.withKeys(e.withModifiers(l=>k(r.value-1),["prevent"]),["up"]),e.withKeys(e.withModifiers(l=>k(r.value+1),["prevent"]),["down"]),e.withKeys(D,["enter"]),e.withKeys(y,["tab"]),e.withKeys(ee,["esc"])],onMousedown:J}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")])}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")])}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")])}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var pe=n._export_sfc(de,[["__file","autocomplete.vue"]]);const fe=n.withInstall(pe);exports.ElAutocomplete=fe;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("./index-00f6ca75.cjs"),z=require("./index-f1c702f6.cjs"),E=require("./use-global-config-23472471.cjs"),b=require("./use-form-common-props-ac666630.cjs"),p=require("./base-ef747d02.cjs"),I=require("./index-eea0bcb3.cjs"),N=Symbol("buttonGroupContextKey"),P=(o,u)=>{z.useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},e.computed(()=>o.type==="text"));const r=e.inject(N,void 0),l=E.useGlobalConfig("button"),{form:c}=b.useFormItem(),a=b.useFormSize(e.computed(()=>r==null?void 0:r.size)),n=b.useFormDisabled(),d=e.ref(),m=e.useSlots(),v=e.computed(()=>{var t;return o.type||(r==null?void 0:r.type)||((t=l.value)==null?void 0:t.type)||""}),g=e.computed(()=>{var t,s,i;return(i=(s=o.autoInsertSpace)!=null?s:(t=l.value)==null?void 0:t.autoInsertSpace)!=null?i:!1}),y=e.computed(()=>{var t,s,i;return(i=(s=o.plain)!=null?s:(t=l.value)==null?void 0:t.plain)!=null?i:!1}),_=e.computed(()=>{var t,s,i;return(i=(s=o.round)!=null?s:(t=l.value)==null?void 0:t.round)!=null?i:!1}),B=e.computed(()=>{var t,s,i;return(i=(s=o.text)!=null?s:(t=l.value)==null?void 0:t.text)!=null?i:!1}),k=e.computed(()=>o.tag==="button"?{ariaDisabled:n.value||o.loading,disabled:n.value||o.loading,autofocus:o.autofocus,type:o.nativeType}:{}),C=e.computed(()=>{var t;const s=(t=m.default)==null?void 0:t.call(m);if(g.value&&(s==null?void 0:s.length)===1){const i=s[0];if((i==null?void 0:i.type)===e.Text){const w=i.children;return/^\p{Unified_Ideograph}{2}$/u.test(w.trim())}}return!1});return{_disabled:n,_size:a,_type:v,_ref:d,_props:k,_plain:y,_round:_,_text:B,shouldAddSpace:C,handleClick:t=>{if(n.value||o.loading){t.stopPropagation();return}o.nativeType==="reset"&&(c==null||c.resetFields()),u("click",t)}}},$=["default","primary","success","warning","info","danger","text",""],T=["button","submit","reset"],h=p.buildProps({size:b.useSizeProp,disabled:Boolean,type:{type:String,values:$,default:""},icon:{type:b.iconPropType},nativeType:{type:String,values:T,default:"button"},loading:Boolean,loadingIcon:{type:b.iconPropType,default:()=>S.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:p.definePropType([String,Object]),default:"button"}}),D={click:o=>o instanceof MouseEvent};function f(o,u=20){return o.mix("#141414",u).toString()}function G(o){const u=b.useFormDisabled(),r=p.useNamespace("button");return e.computed(()=>{let l={},c=o.color;if(c){const a=c.match(/var\((.*?)\)/);a&&(c=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const n=new I.TinyColor(c),d=o.dark?n.tint(20).toString():f(n,20);if(o.plain)l=r.cssVarBlock({"bg-color":o.dark?f(n,90):n.tint(90).toString(),"text-color":c,"border-color":o.dark?f(n,50):n.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":c,"hover-border-color":c,"active-bg-color":d,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":d}),u.value&&(l[r.cssVarBlockName("disabled-bg-color")]=o.dark?f(n,90):n.tint(90).toString(),l[r.cssVarBlockName("disabled-text-color")]=o.dark?f(n,50):n.tint(50).toString(),l[r.cssVarBlockName("disabled-border-color")]=o.dark?f(n,80):n.tint(80).toString());else{const m=o.dark?f(n,30):n.tint(30).toString(),v=n.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(l=r.cssVarBlock({"bg-color":c,"text-color":v,"border-color":c,"hover-bg-color":m,"hover-text-color":v,"hover-border-color":m,"active-bg-color":d,"active-border-color":d}),u.value){const g=o.dark?f(n,50):n.tint(50).toString();l[r.cssVarBlockName("disabled-bg-color")]=g,l[r.cssVarBlockName("disabled-text-color")]=o.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,l[r.cssVarBlockName("disabled-border-color")]=g}}}return l})}const q=e.defineComponent({name:"ElButton"}),F=e.defineComponent({...q,props:h,emits:D,setup(o,{expose:u,emit:r}){const l=o,c=G(l),a=p.useNamespace("button"),{_ref:n,_size:d,_type:m,_disabled:v,_props:g,_plain:y,_round:_,_text:B,shouldAddSpace:k,handleClick:C}=P(l,r),x=e.computed(()=>[a.b(),a.m(m.value),a.m(d.value),a.is("disabled",v.value),a.is("loading",l.loading),a.is("plain",y.value),a.is("round",_.value),a.is("circle",l.circle),a.is("text",B.value),a.is("link",l.link),a.is("has-bg",l.bg)]);return u({ref:n,size:d,type:m,disabled:v,shouldAddSpace:k}),(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({ref_key:"_ref",ref:n},e.unref(g),{class:e.unref(x),style:e.unref(c),onClick:e.unref(C)}),{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.loading?e.renderSlot(t.$slots,"loading",{key:0}):(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1,class:e.normalizeClass(e.unref(a).is("loading"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||t.$slots.icon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0})):e.renderSlot(t.$slots,"icon",{key:1})]),_:3})):e.createCommentVNode("v-if",!0),t.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({[e.unref(a).em("text","expand")]:e.unref(k)})},[e.renderSlot(t.$slots,"default")],2)):e.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var K=p._export_sfc(F,[["__file","button.vue"]]);const j={size:h.size,type:h.type},A=e.defineComponent({name:"ElButtonGroup"}),R=e.defineComponent({...A,props:j,setup(o){const u=o;e.provide(N,e.reactive({size:e.toRef(u,"size"),type:e.toRef(u,"type")}));const r=p.useNamespace("button");return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b("group"))},[e.renderSlot(l.$slots,"default")],2))}});var V=p._export_sfc(R,[["__file","button-group.vue"]]);const U=p.withInstall(K,{ButtonGroup:V});p.withNoopInstall(V);exports.ElButton=U;exports.buttonTypes=$;
|
package/es/el-button-94d3de38.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { computed as u, inject as M, ref as O, useSlots as R, Text as q, defineComponent as B, openBlock as m, createBlock as y, resolveDynamicComponent as N, mergeProps as H, unref as d, withCtx as V, createElementBlock as $, Fragment as J, renderSlot as k, normalizeClass as w, createCommentVNode as T, provide as L, reactive as Q, toRef as P } from "vue";
|
|
2
|
-
import { l as W, E as G } from "./index-eb96e074.js";
|
|
3
|
-
import { u as X } from "./index-2e331d74.js";
|
|
4
|
-
import { a as Y } from "./use-global-config-ee406d58.js";
|
|
5
|
-
import { d as Z, e as tt, g as F, h as et, i as D } from "./use-form-common-props-ed72e914.js";
|
|
6
|
-
import { b as ot, e as lt, u as I, _ as K, w as nt, l as at } from "./base-a5af3db3.js";
|
|
7
|
-
import { T as rt } from "./index-657047bb.js";
|
|
8
|
-
const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
9
|
-
X({
|
|
10
|
-
from: "type.text",
|
|
11
|
-
replacement: "link",
|
|
12
|
-
version: "3.0.0",
|
|
13
|
-
scope: "props",
|
|
14
|
-
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
15
|
-
}, u(() => t.type === "text"));
|
|
16
|
-
const n = M(j, void 0), l = Y("button"), { form: s } = Z(), a = tt(u(() => n == null ? void 0 : n.size)), o = F(), b = O(), v = R(), p = u(() => {
|
|
17
|
-
var e;
|
|
18
|
-
return t.type || (n == null ? void 0 : n.type) || ((e = l.value) == null ? void 0 : e.type) || "";
|
|
19
|
-
}), g = u(() => {
|
|
20
|
-
var e, r, i;
|
|
21
|
-
return (i = (r = t.autoInsertSpace) != null ? r : (e = l.value) == null ? void 0 : e.autoInsertSpace) != null ? i : !1;
|
|
22
|
-
}), h = u(() => {
|
|
23
|
-
var e, r, i;
|
|
24
|
-
return (i = (r = t.plain) != null ? r : (e = l.value) == null ? void 0 : e.plain) != null ? i : !1;
|
|
25
|
-
}), S = u(() => {
|
|
26
|
-
var e, r, i;
|
|
27
|
-
return (i = (r = t.round) != null ? r : (e = l.value) == null ? void 0 : e.round) != null ? i : !1;
|
|
28
|
-
}), C = u(() => {
|
|
29
|
-
var e, r, i;
|
|
30
|
-
return (i = (r = t.text) != null ? r : (e = l.value) == null ? void 0 : e.text) != null ? i : !1;
|
|
31
|
-
}), _ = u(() => t.tag === "button" ? {
|
|
32
|
-
ariaDisabled: o.value || t.loading,
|
|
33
|
-
disabled: o.value || t.loading,
|
|
34
|
-
autofocus: t.autofocus,
|
|
35
|
-
type: t.nativeType
|
|
36
|
-
} : {}), x = u(() => {
|
|
37
|
-
var e;
|
|
38
|
-
const r = (e = v.default) == null ? void 0 : e.call(v);
|
|
39
|
-
if (g.value && (r == null ? void 0 : r.length) === 1) {
|
|
40
|
-
const i = r[0];
|
|
41
|
-
if ((i == null ? void 0 : i.type) === q) {
|
|
42
|
-
const U = i.children;
|
|
43
|
-
return /^\p{Unified_Ideograph}{2}$/u.test(U.trim());
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return !1;
|
|
47
|
-
});
|
|
48
|
-
return {
|
|
49
|
-
_disabled: o,
|
|
50
|
-
_size: a,
|
|
51
|
-
_type: p,
|
|
52
|
-
_ref: b,
|
|
53
|
-
_props: _,
|
|
54
|
-
_plain: h,
|
|
55
|
-
_round: S,
|
|
56
|
-
_text: C,
|
|
57
|
-
shouldAddSpace: x,
|
|
58
|
-
handleClick: (e) => {
|
|
59
|
-
if (o.value || t.loading) {
|
|
60
|
-
e.stopPropagation();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
t.nativeType === "reset" && (s == null || s.resetFields()), c("click", e);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}, it = [
|
|
67
|
-
"default",
|
|
68
|
-
"primary",
|
|
69
|
-
"success",
|
|
70
|
-
"warning",
|
|
71
|
-
"info",
|
|
72
|
-
"danger",
|
|
73
|
-
"text",
|
|
74
|
-
""
|
|
75
|
-
], ct = ["button", "submit", "reset"], z = ot({
|
|
76
|
-
size: et,
|
|
77
|
-
disabled: Boolean,
|
|
78
|
-
type: {
|
|
79
|
-
type: String,
|
|
80
|
-
values: it,
|
|
81
|
-
default: ""
|
|
82
|
-
},
|
|
83
|
-
icon: {
|
|
84
|
-
type: D
|
|
85
|
-
},
|
|
86
|
-
nativeType: {
|
|
87
|
-
type: String,
|
|
88
|
-
values: ct,
|
|
89
|
-
default: "button"
|
|
90
|
-
},
|
|
91
|
-
loading: Boolean,
|
|
92
|
-
loadingIcon: {
|
|
93
|
-
type: D,
|
|
94
|
-
default: () => W
|
|
95
|
-
},
|
|
96
|
-
plain: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: void 0
|
|
99
|
-
},
|
|
100
|
-
text: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
default: void 0
|
|
103
|
-
},
|
|
104
|
-
link: Boolean,
|
|
105
|
-
bg: Boolean,
|
|
106
|
-
autofocus: Boolean,
|
|
107
|
-
round: {
|
|
108
|
-
type: Boolean,
|
|
109
|
-
default: void 0
|
|
110
|
-
},
|
|
111
|
-
circle: Boolean,
|
|
112
|
-
color: String,
|
|
113
|
-
dark: Boolean,
|
|
114
|
-
autoInsertSpace: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: void 0
|
|
117
|
-
},
|
|
118
|
-
tag: {
|
|
119
|
-
type: lt([String, Object]),
|
|
120
|
-
default: "button"
|
|
121
|
-
}
|
|
122
|
-
}), ut = {
|
|
123
|
-
click: (t) => t instanceof MouseEvent
|
|
124
|
-
};
|
|
125
|
-
function f(t, c = 20) {
|
|
126
|
-
return t.mix("#141414", c).toString();
|
|
127
|
-
}
|
|
128
|
-
function dt(t) {
|
|
129
|
-
const c = F(), n = I("button");
|
|
130
|
-
return u(() => {
|
|
131
|
-
let l = {}, s = t.color;
|
|
132
|
-
if (s) {
|
|
133
|
-
const a = s.match(/var\((.*?)\)/);
|
|
134
|
-
a && (s = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
|
|
135
|
-
const o = new rt(s), b = t.dark ? o.tint(20).toString() : f(o, 20);
|
|
136
|
-
if (t.plain)
|
|
137
|
-
l = n.cssVarBlock({
|
|
138
|
-
"bg-color": t.dark ? f(o, 90) : o.tint(90).toString(),
|
|
139
|
-
"text-color": s,
|
|
140
|
-
"border-color": t.dark ? f(o, 50) : o.tint(50).toString(),
|
|
141
|
-
"hover-text-color": `var(${n.cssVarName("color-white")})`,
|
|
142
|
-
"hover-bg-color": s,
|
|
143
|
-
"hover-border-color": s,
|
|
144
|
-
"active-bg-color": b,
|
|
145
|
-
"active-text-color": `var(${n.cssVarName("color-white")})`,
|
|
146
|
-
"active-border-color": b
|
|
147
|
-
}), c.value && (l[n.cssVarBlockName("disabled-bg-color")] = t.dark ? f(o, 90) : o.tint(90).toString(), l[n.cssVarBlockName("disabled-text-color")] = t.dark ? f(o, 50) : o.tint(50).toString(), l[n.cssVarBlockName("disabled-border-color")] = t.dark ? f(o, 80) : o.tint(80).toString());
|
|
148
|
-
else {
|
|
149
|
-
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
|
|
150
|
-
if (l = n.cssVarBlock({
|
|
151
|
-
"bg-color": s,
|
|
152
|
-
"text-color": p,
|
|
153
|
-
"border-color": s,
|
|
154
|
-
"hover-bg-color": v,
|
|
155
|
-
"hover-text-color": p,
|
|
156
|
-
"hover-border-color": v,
|
|
157
|
-
"active-bg-color": b,
|
|
158
|
-
"active-border-color": b
|
|
159
|
-
}), c.value) {
|
|
160
|
-
const g = t.dark ? f(o, 50) : o.tint(50).toString();
|
|
161
|
-
l[n.cssVarBlockName("disabled-bg-color")] = g, l[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, l[n.cssVarBlockName("disabled-border-color")] = g;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return l;
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
const bt = B({
|
|
169
|
-
name: "ElButton"
|
|
170
|
-
}), vt = /* @__PURE__ */ B({
|
|
171
|
-
...bt,
|
|
172
|
-
props: z,
|
|
173
|
-
emits: ut,
|
|
174
|
-
setup(t, { expose: c, emit: n }) {
|
|
175
|
-
const l = t, s = dt(l), a = I("button"), {
|
|
176
|
-
_ref: o,
|
|
177
|
-
_size: b,
|
|
178
|
-
_type: v,
|
|
179
|
-
_disabled: p,
|
|
180
|
-
_props: g,
|
|
181
|
-
_plain: h,
|
|
182
|
-
_round: S,
|
|
183
|
-
_text: C,
|
|
184
|
-
shouldAddSpace: _,
|
|
185
|
-
handleClick: x
|
|
186
|
-
} = st(l, n), E = u(() => [
|
|
187
|
-
a.b(),
|
|
188
|
-
a.m(v.value),
|
|
189
|
-
a.m(b.value),
|
|
190
|
-
a.is("disabled", p.value),
|
|
191
|
-
a.is("loading", l.loading),
|
|
192
|
-
a.is("plain", h.value),
|
|
193
|
-
a.is("round", S.value),
|
|
194
|
-
a.is("circle", l.circle),
|
|
195
|
-
a.is("text", C.value),
|
|
196
|
-
a.is("link", l.link),
|
|
197
|
-
a.is("has-bg", l.bg)
|
|
198
|
-
]);
|
|
199
|
-
return c({
|
|
200
|
-
ref: o,
|
|
201
|
-
size: b,
|
|
202
|
-
type: v,
|
|
203
|
-
disabled: p,
|
|
204
|
-
shouldAddSpace: _
|
|
205
|
-
}), (e, r) => (m(), y(N(e.tag), H({
|
|
206
|
-
ref_key: "_ref",
|
|
207
|
-
ref: o
|
|
208
|
-
}, d(g), {
|
|
209
|
-
class: d(E),
|
|
210
|
-
style: d(s),
|
|
211
|
-
onClick: d(x)
|
|
212
|
-
}), {
|
|
213
|
-
default: V(() => [
|
|
214
|
-
e.loading ? (m(), $(J, { key: 0 }, [
|
|
215
|
-
e.$slots.loading ? k(e.$slots, "loading", { key: 0 }) : (m(), y(d(G), {
|
|
216
|
-
key: 1,
|
|
217
|
-
class: w(d(a).is("loading"))
|
|
218
|
-
}, {
|
|
219
|
-
default: V(() => [
|
|
220
|
-
(m(), y(N(e.loadingIcon)))
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
}, 8, ["class"]))
|
|
224
|
-
], 64)) : e.icon || e.$slots.icon ? (m(), y(d(G), { key: 1 }, {
|
|
225
|
-
default: V(() => [
|
|
226
|
-
e.icon ? (m(), y(N(e.icon), { key: 0 })) : k(e.$slots, "icon", { key: 1 })
|
|
227
|
-
]),
|
|
228
|
-
_: 3
|
|
229
|
-
})) : T("v-if", !0),
|
|
230
|
-
e.$slots.default ? (m(), $("span", {
|
|
231
|
-
key: 2,
|
|
232
|
-
class: w({ [d(a).em("text", "expand")]: d(_) })
|
|
233
|
-
}, [
|
|
234
|
-
k(e.$slots, "default")
|
|
235
|
-
], 2)) : T("v-if", !0)
|
|
236
|
-
]),
|
|
237
|
-
_: 3
|
|
238
|
-
}, 16, ["class", "style", "onClick"]));
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
var ft = /* @__PURE__ */ K(vt, [["__file", "button.vue"]]);
|
|
242
|
-
const mt = {
|
|
243
|
-
size: z.size,
|
|
244
|
-
type: z.type
|
|
245
|
-
}, pt = B({
|
|
246
|
-
name: "ElButtonGroup"
|
|
247
|
-
}), gt = /* @__PURE__ */ B({
|
|
248
|
-
...pt,
|
|
249
|
-
props: mt,
|
|
250
|
-
setup(t) {
|
|
251
|
-
const c = t;
|
|
252
|
-
L(j, Q({
|
|
253
|
-
size: P(c, "size"),
|
|
254
|
-
type: P(c, "type")
|
|
255
|
-
}));
|
|
256
|
-
const n = I("button");
|
|
257
|
-
return (l, s) => (m(), $("div", {
|
|
258
|
-
class: w(d(n).b("group"))
|
|
259
|
-
}, [
|
|
260
|
-
k(l.$slots, "default")
|
|
261
|
-
], 2));
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
var A = /* @__PURE__ */ K(gt, [["__file", "button-group.vue"]]);
|
|
265
|
-
const xt = nt(ft, {
|
|
266
|
-
ButtonGroup: A
|
|
267
|
-
});
|
|
268
|
-
at(A);
|
|
269
|
-
export {
|
|
270
|
-
xt as E,
|
|
271
|
-
it as b
|
|
272
|
-
};
|