st-comp 0.0.186 → 0.0.188
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 +14 -13
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +104 -91
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +31 -28
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +17 -14
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +26 -23
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +22 -19
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +16 -13
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +19 -16
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +88 -85
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +34 -32
- package/es/TreeMap.cjs +1 -2
- package/es/TreeMap.js +1 -163
- package/es/User.cjs +1 -1
- package/es/User.js +53 -50
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +166 -479
- package/es/VarietyAutoComplete.cjs +1 -0
- package/es/VarietyAutoComplete.js +84 -0
- package/es/VarietySearch.cjs +6 -6
- package/es/VarietySearch.js +50 -47
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +33 -31
- package/es/{_initCloneObject-00cee14a.js → _initCloneObject-25087817.js} +24 -23
- package/es/_initCloneObject-95a1fe6e.cjs +1 -0
- package/es/{base-62a70f61.js → base-f5b11441.js} +40 -40
- package/es/config-provider-79c2df1b.cjs +1 -0
- package/es/{config-provider-89aba243.js → config-provider-95d27ce2.js} +9 -8
- package/es/{debounce-5f2ec4be.js → debounce-06f59c68.js} +10 -10
- package/es/{debounce-0b77a317.cjs → debounce-62f5b6e8.cjs} +1 -1
- package/es/{dropdown-0fd8bdbd.js → dropdown-7a853d45.js} +9 -9
- package/es/{dropdown-babf55db.cjs → dropdown-c2ef9062.cjs} +1 -1
- package/es/el-autocomplete-b7bcfb25.cjs +1 -0
- package/es/el-autocomplete-e74d589c.js +328 -0
- package/es/{el-button-338a49b7.cjs → el-button-5973d99c.cjs} +1 -1
- package/es/{el-button-f44cb2cf.js → el-button-5a260464.js} +33 -33
- package/es/{el-dialog-c2451c86.js → el-dialog-8d8f6443.js} +17 -17
- package/es/{el-dialog-45250561.cjs → el-dialog-a24f4f8f.cjs} +1 -1
- package/es/{el-divider-2f300113.js → el-divider-4e1c0fb8.js} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-87a86f30.js → el-empty-deee6b39.js} +10 -9
- package/es/{el-form-item-64c14a64.js → el-form-item-3167d76a.js} +74 -73
- package/es/el-form-item-8dc6aec8.cjs +12 -0
- package/es/{el-input-ef6edbf3.js → el-input-03aad76d.js} +33 -33
- package/es/{el-input-c663697a.cjs → el-input-06243b61.cjs} +1 -1
- package/es/{el-input-number-cda5c4e1.js → el-input-number-12c09ac3.js} +70 -70
- package/es/{el-input-number-5fda0890.cjs → el-input-number-854b2066.cjs} +1 -1
- package/es/{el-loading-1be77e7c.js → el-loading-86fdef94.js} +5 -5
- package/es/{el-loading-8c3379d5.cjs → el-loading-a536daf8.cjs} +1 -1
- package/es/{el-menu-item-84a4b594.js → el-menu-item-1172154b.js} +22 -22
- package/es/{el-menu-item-cf9e0e36.cjs → el-menu-item-6522d54c.cjs} +1 -1
- package/es/{el-message-c500161d.cjs → el-message-0aeea1a3.cjs} +1 -1
- package/es/{el-message-ba131b90.js → el-message-35d4e3ac.js} +23 -23
- package/es/{el-message-box-743c461a.cjs → el-message-box-2e7304ce.cjs} +1 -1
- package/es/{el-message-box-38779ab9.js → el-message-box-f43b6e7a.js} +20 -20
- package/es/{el-overlay-a6f43919.js → el-overlay-04659660.js} +41 -41
- package/es/{el-overlay-39e2e96f.cjs → el-overlay-ef92f51f.cjs} +1 -1
- package/es/{el-popconfirm-16597a41.js → el-popconfirm-29d538b6.js} +20 -20
- package/es/{el-popconfirm-08b4221f.cjs → el-popconfirm-58a1b946.cjs} +1 -1
- package/es/{el-popper-dca2de0d.cjs → el-popper-c9e0136d.cjs} +1 -1
- package/es/{el-popper-05a8f271.js → el-popper-ee1f8186.js} +79 -79
- package/es/el-scrollbar-05815cf5.cjs +1 -0
- package/es/el-scrollbar-09769d9e.js +395 -0
- package/es/{el-segmented-d68dfe31.js → el-segmented-916b982a.js} +8 -8
- package/es/{el-segmented-c2952e4c.cjs → el-segmented-d454a924.cjs} +1 -1
- package/es/el-select-6d813c15.cjs +1 -0
- package/es/{el-select-7846f331.js → el-select-8cb88e3c.js} +364 -361
- package/es/{el-table-column-cd63e722.js → el-table-column-0c899664.js} +147 -145
- package/es/el-table-column-762a20e0.cjs +14 -0
- package/es/{el-tag-914c96a9.js → el-tag-554c333b.js} +27 -26
- package/es/el-tag-fe492a6d.cjs +1 -0
- package/es/index-34048a1d.js +314 -0
- package/es/{index-b132c1b1.js → index-384ed4b0.js} +3 -3
- package/es/index-5b62ea0e.js +375 -0
- package/es/{index-1c409d46.cjs → index-62573d45.cjs} +1 -1
- package/es/{index-14c322b1.js → index-69a9bd75.js} +2 -2
- package/es/{index-2bf6214c.cjs → index-77f4746b.cjs} +1 -1
- package/es/index-7e4e0bd3.cjs +1 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/{index-e6deec5d.cjs → index-a9d4ef0f.cjs} +1 -1
- package/es/{index-35129268.js → index-b07f58c9.js} +76 -61
- package/es/index-b7fd560c.js +60 -0
- package/es/index-bb833443.cjs +1 -0
- package/es/index-ca7dbd47.cjs +1 -0
- package/es/index-cfeda35a.js +204 -0
- package/es/{index-20749652.js → index-df06f32a.js} +15 -15
- package/es/index-eab8a286.cjs +1 -0
- package/es/raf-fa761d02.js +6 -0
- package/es/{scroll-7d352c1f.js → scroll-9e2dd92b.js} +5 -5
- package/es/style.css +1 -1
- package/es/use-global-config-1923bb6f.js +72 -0
- package/es/use-global-config-c2c5ca8f.cjs +1 -0
- package/es/{validator-f66b0f34.cjs → validator-866ea0bb.cjs} +1 -1
- package/es/{validator-90d3e848.js → validator-fd32f925.js} +1 -1
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/vnode-f9752526.js +14 -0
- package/es/{zh-cn-de7ae601.cjs → zh-cn-0fa1aa6d.cjs} +1 -1
- package/es/{zh-cn-530f1ed1.js → zh-cn-d667062d.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +139 -139
- package/lib/{index-26fab3e5.js → index-02706357.js} +14643 -14551
- package/lib/{python-c34eeb40.js → python-42146c31.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/CustomFunction/index.vue +11 -2
- package/packages/VarietyAutoComplete/index.ts +8 -0
- package/packages/VarietyAutoComplete/index.vue +89 -0
- package/packages/index.ts +2 -0
- package/src/pages/VarietyAutoComplete/index.vue +19 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-4dd3c9a4.cjs +0 -1
- package/es/config-provider-d82ea78c.cjs +0 -1
- package/es/el-empty-bb2b0235.cjs +0 -1
- package/es/el-form-item-b5f6081b.cjs +0 -12
- package/es/el-scrollbar-31d72626.js +0 -763
- package/es/el-scrollbar-802d874d.cjs +0 -1
- package/es/el-select-8337856d.cjs +0 -1
- package/es/el-table-column-34f080b5.cjs +0 -14
- package/es/el-tag-a2e99294.cjs +0 -1
- package/es/index-34592e82.js +0 -513
- package/es/index-3a74eae4.cjs +0 -1
- package/es/index-8feed26f.cjs +0 -1
- package/es/raf-41aed4d4.js +0 -6
- package/es/use-global-config-53be2b7d.js +0 -71
- package/es/use-global-config-f3664595.cjs +0 -1
- package/es/vnode-6d51e502.cjs +0 -1
- package/es/vnode-8ddc4f78.js +0 -70
|
@@ -0,0 +1,328 @@
|
|
|
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 { d as _e, o as Be } from "./el-scrollbar-09769d9e.js";
|
|
3
|
+
import { E as De, l as Oe } from "./index-b07f58c9.js";
|
|
4
|
+
import { i as se, E as Ke } from "./el-input-03aad76d.js";
|
|
5
|
+
import { a as ee, U as A, I as K, C as le, p as Re, E as Me, f as Ue, t as We } from "./el-popper-ee1f8186.js";
|
|
6
|
+
import { b as Le, d as te, N as He, e as B, f as D, h as qe, u as ze, _ as je, i as O, w as Ge } from "./base-f5b11441.js";
|
|
7
|
+
import { u as Je } from "./index-34048a1d.js";
|
|
8
|
+
import { d as Qe } from "./debounce-06f59c68.js";
|
|
9
|
+
const Xe = Le({
|
|
10
|
+
...se,
|
|
11
|
+
valueKey: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "value"
|
|
14
|
+
},
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
debounce: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 300
|
|
22
|
+
},
|
|
23
|
+
placement: {
|
|
24
|
+
type: te(String),
|
|
25
|
+
values: [
|
|
26
|
+
"top",
|
|
27
|
+
"top-start",
|
|
28
|
+
"top-end",
|
|
29
|
+
"bottom",
|
|
30
|
+
"bottom-start",
|
|
31
|
+
"bottom-end"
|
|
32
|
+
],
|
|
33
|
+
default: "bottom-start"
|
|
34
|
+
},
|
|
35
|
+
fetchSuggestions: {
|
|
36
|
+
type: te([Function, Array]),
|
|
37
|
+
default: He
|
|
38
|
+
},
|
|
39
|
+
popperClass: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
triggerOnFocus: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !0
|
|
46
|
+
},
|
|
47
|
+
selectWhenUnmatched: Boolean,
|
|
48
|
+
hideLoading: Boolean,
|
|
49
|
+
teleported: ee.teleported,
|
|
50
|
+
appendTo: ee.appendTo,
|
|
51
|
+
highlightFirstItem: Boolean,
|
|
52
|
+
fitInputWidth: Boolean
|
|
53
|
+
}), Ye = {
|
|
54
|
+
[A]: (l) => B(l) || D(l),
|
|
55
|
+
[K]: (l) => B(l) || D(l),
|
|
56
|
+
[le]: (l) => B(l) || D(l),
|
|
57
|
+
focus: (l) => l instanceof FocusEvent,
|
|
58
|
+
blur: (l) => l instanceof FocusEvent,
|
|
59
|
+
clear: () => !0,
|
|
60
|
+
select: (l) => qe(l)
|
|
61
|
+
}, ae = "ElAutocomplete", Ze = oe({
|
|
62
|
+
name: ae,
|
|
63
|
+
inheritAttrs: !1
|
|
64
|
+
}), xe = /* @__PURE__ */ oe({
|
|
65
|
+
...Ze,
|
|
66
|
+
props: Xe,
|
|
67
|
+
emits: Ye,
|
|
68
|
+
setup(l, { expose: ne, emit: i }) {
|
|
69
|
+
const n = l, re = k(() => Re(n, Object.keys(se))), ue = Ce(), R = _e(), r = ze("autocomplete"), p = d(), M = d(), S = d(), U = d();
|
|
70
|
+
let W = !1, F = !1;
|
|
71
|
+
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 = () => {
|
|
72
|
+
m.value && (L.value = `${p.value.$el.offsetWidth}px`);
|
|
73
|
+
}, de = () => {
|
|
74
|
+
a.value = -1;
|
|
75
|
+
}, q = async (e) => {
|
|
76
|
+
if (I.value)
|
|
77
|
+
return;
|
|
78
|
+
const o = (s) => {
|
|
79
|
+
h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) : We(ae, "autocomplete suggestions must be an array"));
|
|
80
|
+
};
|
|
81
|
+
if (h.value = !0, O(n.fetchSuggestions))
|
|
82
|
+
o(n.fetchSuggestions);
|
|
83
|
+
else {
|
|
84
|
+
const s = await n.fetchSuggestions(e, o);
|
|
85
|
+
O(s) && o(s);
|
|
86
|
+
}
|
|
87
|
+
}, z = Qe(q, n.debounce), fe = (e) => {
|
|
88
|
+
const o = !!e;
|
|
89
|
+
if (i(K, e), i(A, e), I.value = !1, f.value || (f.value = o), !n.triggerOnFocus && !e) {
|
|
90
|
+
I.value = !0, c.value = [];
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
z(e);
|
|
94
|
+
}, ve = (e) => {
|
|
95
|
+
var o;
|
|
96
|
+
R.value || (((o = e.target) == null ? void 0 : o.tagName) !== "INPUT" || ce.value.includes(document.activeElement)) && (f.value = !0);
|
|
97
|
+
}, ge = (e) => {
|
|
98
|
+
i(le, e);
|
|
99
|
+
}, me = (e) => {
|
|
100
|
+
var o;
|
|
101
|
+
if (F)
|
|
102
|
+
F = !1;
|
|
103
|
+
else {
|
|
104
|
+
f.value = !0, i("focus", e);
|
|
105
|
+
const s = (o = n.modelValue) != null ? o : "";
|
|
106
|
+
n.triggerOnFocus && !W && z(String(s));
|
|
107
|
+
}
|
|
108
|
+
}, he = (e) => {
|
|
109
|
+
setTimeout(() => {
|
|
110
|
+
var o;
|
|
111
|
+
if ((o = S.value) != null && o.isFocusInsideContent()) {
|
|
112
|
+
F = !0;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
f.value && $(), i("blur", e);
|
|
116
|
+
});
|
|
117
|
+
}, be = () => {
|
|
118
|
+
f.value = !1, i(A, ""), i("clear");
|
|
119
|
+
}, j = async () => {
|
|
120
|
+
var e;
|
|
121
|
+
(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));
|
|
122
|
+
}, ye = (e) => {
|
|
123
|
+
m.value && (e.preventDefault(), e.stopPropagation(), $());
|
|
124
|
+
}, $ = () => {
|
|
125
|
+
f.value = !1;
|
|
126
|
+
}, Ee = () => {
|
|
127
|
+
var e;
|
|
128
|
+
(e = p.value) == null || e.focus();
|
|
129
|
+
}, $e = () => {
|
|
130
|
+
var e;
|
|
131
|
+
(e = p.value) == null || e.blur();
|
|
132
|
+
}, P = async (e) => {
|
|
133
|
+
i(K, e[n.valueKey]), i(A, e[n.valueKey]), i("select", e), c.value = [], a.value = -1;
|
|
134
|
+
}, V = (e) => {
|
|
135
|
+
var o, s;
|
|
136
|
+
if (!m.value || h.value)
|
|
137
|
+
return;
|
|
138
|
+
if (e < 0) {
|
|
139
|
+
a.value = -1;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
e >= c.value.length && (e = c.value.length - 1);
|
|
143
|
+
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;
|
|
144
|
+
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}`);
|
|
145
|
+
}, G = Be(U, () => {
|
|
146
|
+
var e;
|
|
147
|
+
(e = S.value) != null && e.isFocusInsideContent() || m.value && $();
|
|
148
|
+
});
|
|
149
|
+
return Se(() => {
|
|
150
|
+
G == null || G();
|
|
151
|
+
}), Ie(() => {
|
|
152
|
+
var e;
|
|
153
|
+
const o = (e = p.value) == null ? void 0 : e.ref;
|
|
154
|
+
o && ([
|
|
155
|
+
{ key: "role", value: "textbox" },
|
|
156
|
+
{ key: "aria-autocomplete", value: "list" },
|
|
157
|
+
{ key: "aria-controls", value: "id" },
|
|
158
|
+
{
|
|
159
|
+
key: "aria-activedescendant",
|
|
160
|
+
value: `${E.value}-item-${a.value}`
|
|
161
|
+
}
|
|
162
|
+
].forEach(({ key: s, value: u }) => o.setAttribute(s, u)), W = o.hasAttribute("readonly"));
|
|
163
|
+
}), ne({
|
|
164
|
+
highlightedIndex: a,
|
|
165
|
+
activated: f,
|
|
166
|
+
loading: h,
|
|
167
|
+
inputRef: p,
|
|
168
|
+
popperRef: S,
|
|
169
|
+
suggestions: c,
|
|
170
|
+
handleSelect: P,
|
|
171
|
+
handleKeyEnter: j,
|
|
172
|
+
focus: Ee,
|
|
173
|
+
blur: $e,
|
|
174
|
+
close: $,
|
|
175
|
+
highlight: V,
|
|
176
|
+
getData: q
|
|
177
|
+
}), (e, o) => (b(), Ne(t(Me), {
|
|
178
|
+
ref_key: "popperRef",
|
|
179
|
+
ref: S,
|
|
180
|
+
visible: t(m),
|
|
181
|
+
placement: e.placement,
|
|
182
|
+
"fallback-placements": ["bottom-start", "top-start"],
|
|
183
|
+
"popper-class": [t(r).e("popper"), e.popperClass],
|
|
184
|
+
teleported: e.teleported,
|
|
185
|
+
"append-to": e.appendTo,
|
|
186
|
+
"gpu-acceleration": !1,
|
|
187
|
+
pure: "",
|
|
188
|
+
"manual-mode": "",
|
|
189
|
+
effect: "light",
|
|
190
|
+
trigger: "click",
|
|
191
|
+
transition: `${t(r).namespace.value}-zoom-in-top`,
|
|
192
|
+
persistent: "",
|
|
193
|
+
role: "listbox",
|
|
194
|
+
onBeforeShow: pe,
|
|
195
|
+
onHide: de
|
|
196
|
+
}, {
|
|
197
|
+
content: v(() => [
|
|
198
|
+
X("div", {
|
|
199
|
+
ref_key: "regionRef",
|
|
200
|
+
ref: M,
|
|
201
|
+
class: y([t(r).b("suggestion"), t(r).is("loading", t(H))]),
|
|
202
|
+
style: Y({
|
|
203
|
+
[e.fitInputWidth ? "width" : "minWidth"]: L.value,
|
|
204
|
+
outline: "none"
|
|
205
|
+
}),
|
|
206
|
+
role: "region"
|
|
207
|
+
}, [
|
|
208
|
+
e.$slots.header ? (b(), w("div", {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: y(t(r).be("suggestion", "header")),
|
|
211
|
+
onClick: N(() => {
|
|
212
|
+
}, ["stop"])
|
|
213
|
+
}, [
|
|
214
|
+
g(e.$slots, "header")
|
|
215
|
+
], 10, ["onClick"])) : Z("v-if", !0),
|
|
216
|
+
T(t(Ue), {
|
|
217
|
+
id: t(E),
|
|
218
|
+
tag: "ul",
|
|
219
|
+
"wrap-class": t(r).be("suggestion", "wrap"),
|
|
220
|
+
"view-class": t(r).be("suggestion", "list"),
|
|
221
|
+
role: "listbox"
|
|
222
|
+
}, {
|
|
223
|
+
default: v(() => [
|
|
224
|
+
t(H) ? (b(), w("li", { key: 0 }, [
|
|
225
|
+
g(e.$slots, "loading", {}, () => [
|
|
226
|
+
T(t(De), {
|
|
227
|
+
class: y(t(r).is("loading"))
|
|
228
|
+
}, {
|
|
229
|
+
default: v(() => [
|
|
230
|
+
T(t(Oe))
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["class"])
|
|
234
|
+
])
|
|
235
|
+
])) : (b(!0), w(Te, { key: 1 }, Ae(c.value, (s, u) => (b(), w("li", {
|
|
236
|
+
id: `${t(E)}-item-${u}`,
|
|
237
|
+
key: u,
|
|
238
|
+
class: y({ highlighted: a.value === u }),
|
|
239
|
+
role: "option",
|
|
240
|
+
"aria-selected": a.value === u,
|
|
241
|
+
onClick: (ke) => P(s)
|
|
242
|
+
}, [
|
|
243
|
+
g(e.$slots, "default", { item: s }, () => [
|
|
244
|
+
Fe(Pe(s[e.valueKey]), 1)
|
|
245
|
+
])
|
|
246
|
+
], 10, ["id", "aria-selected", "onClick"]))), 128))
|
|
247
|
+
]),
|
|
248
|
+
_: 3
|
|
249
|
+
}, 8, ["id", "wrap-class", "view-class"]),
|
|
250
|
+
e.$slots.footer ? (b(), w("div", {
|
|
251
|
+
key: 1,
|
|
252
|
+
class: y(t(r).be("suggestion", "footer")),
|
|
253
|
+
onClick: N(() => {
|
|
254
|
+
}, ["stop"])
|
|
255
|
+
}, [
|
|
256
|
+
g(e.$slots, "footer")
|
|
257
|
+
], 10, ["onClick"])) : Z("v-if", !0)
|
|
258
|
+
], 6)
|
|
259
|
+
]),
|
|
260
|
+
default: v(() => [
|
|
261
|
+
X("div", {
|
|
262
|
+
ref_key: "listboxRef",
|
|
263
|
+
ref: U,
|
|
264
|
+
class: y([t(r).b(), e.$attrs.class]),
|
|
265
|
+
style: Y(t(ie)),
|
|
266
|
+
role: "combobox",
|
|
267
|
+
"aria-haspopup": "listbox",
|
|
268
|
+
"aria-expanded": t(m),
|
|
269
|
+
"aria-owns": t(E)
|
|
270
|
+
}, [
|
|
271
|
+
T(t(Ke), x({
|
|
272
|
+
ref_key: "inputRef",
|
|
273
|
+
ref: p
|
|
274
|
+
}, x(t(re), e.$attrs), {
|
|
275
|
+
"model-value": e.modelValue,
|
|
276
|
+
disabled: t(R),
|
|
277
|
+
onInput: fe,
|
|
278
|
+
onChange: ge,
|
|
279
|
+
onFocus: me,
|
|
280
|
+
onBlur: he,
|
|
281
|
+
onClear: be,
|
|
282
|
+
onKeydown: [
|
|
283
|
+
C(N((s) => V(a.value - 1), ["prevent"]), ["up"]),
|
|
284
|
+
C(N((s) => V(a.value + 1), ["prevent"]), ["down"]),
|
|
285
|
+
C(j, ["enter"]),
|
|
286
|
+
C($, ["tab"]),
|
|
287
|
+
C(ye, ["esc"])
|
|
288
|
+
],
|
|
289
|
+
onMousedown: ve
|
|
290
|
+
}), Ve({
|
|
291
|
+
_: 2
|
|
292
|
+
}, [
|
|
293
|
+
e.$slots.prepend ? {
|
|
294
|
+
name: "prepend",
|
|
295
|
+
fn: v(() => [
|
|
296
|
+
g(e.$slots, "prepend")
|
|
297
|
+
])
|
|
298
|
+
} : void 0,
|
|
299
|
+
e.$slots.append ? {
|
|
300
|
+
name: "append",
|
|
301
|
+
fn: v(() => [
|
|
302
|
+
g(e.$slots, "append")
|
|
303
|
+
])
|
|
304
|
+
} : void 0,
|
|
305
|
+
e.$slots.prefix ? {
|
|
306
|
+
name: "prefix",
|
|
307
|
+
fn: v(() => [
|
|
308
|
+
g(e.$slots, "prefix")
|
|
309
|
+
])
|
|
310
|
+
} : void 0,
|
|
311
|
+
e.$slots.suffix ? {
|
|
312
|
+
name: "suffix",
|
|
313
|
+
fn: v(() => [
|
|
314
|
+
g(e.$slots, "suffix")
|
|
315
|
+
])
|
|
316
|
+
} : void 0
|
|
317
|
+
]), 1040, ["model-value", "disabled", "onKeydown"])
|
|
318
|
+
], 14, ["aria-expanded", "aria-owns"])
|
|
319
|
+
]),
|
|
320
|
+
_: 3
|
|
321
|
+
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
var et = /* @__PURE__ */ je(xe, [["__file", "autocomplete.vue"]]);
|
|
325
|
+
const it = Ge(et);
|
|
326
|
+
export {
|
|
327
|
+
it as E
|
|
328
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("./index-eab8a286.cjs"),z=require("./index-f1c702f6.cjs"),E=require("./use-global-config-c2c5ca8f.cjs"),v=require("./el-scrollbar-05815cf5.cjs"),p=require("./base-ef747d02.cjs"),I=require("./index-eea0bcb3.cjs"),N=Symbol("buttonGroupContextKey"),T=(t,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(()=>t.type==="text"));const r=e.inject(N,void 0),l=E.useGlobalConfig("button"),{form:c}=v.useFormItem(),a=v.useFormSize(e.computed(()=>r==null?void 0:r.size)),n=v.useFormDisabled(),d=e.ref(),f=e.useSlots(),b=e.computed(()=>{var o;return t.type||(r==null?void 0:r.type)||((o=l.value)==null?void 0:o.type)||""}),g=e.computed(()=>{var o,s,i;return(i=(s=t.autoInsertSpace)!=null?s:(o=l.value)==null?void 0:o.autoInsertSpace)!=null?i:!1}),y=e.computed(()=>{var o,s,i;return(i=(s=t.plain)!=null?s:(o=l.value)==null?void 0:o.plain)!=null?i:!1}),_=e.computed(()=>{var o,s,i;return(i=(s=t.round)!=null?s:(o=l.value)==null?void 0:o.round)!=null?i:!1}),B=e.computed(()=>{var o,s,i;return(i=(s=t.text)!=null?s:(o=l.value)==null?void 0:o.text)!=null?i:!1}),k=e.computed(()=>t.tag==="button"?{ariaDisabled:n.value||t.loading,disabled:n.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),C=e.computed(()=>{var o;const s=(o=f.default)==null?void 0:o.call(f);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:b,_ref:d,_props:k,_plain:y,_round:_,_text:B,shouldAddSpace:C,handleClick:o=>{if(n.value||t.loading){o.stopPropagation();return}t.nativeType==="reset"&&(c==null||c.resetFields()),u("click",o)}}},$=["default","primary","success","warning","info","danger","text",""],P=["button","submit","reset"],h=p.buildProps({size:v.useSizeProp,disabled:Boolean,type:{type:String,values:$,default:""},icon:{type:v.iconPropType},nativeType:{type:String,values:P,default:"button"},loading:Boolean,loadingIcon:{type:v.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:t=>t instanceof MouseEvent};function m(t,u=20){return t.mix("#141414",u).toString()}function G(t){const u=v.useFormDisabled(),r=p.useNamespace("button");return e.computed(()=>{let l={},c=t.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=t.dark?n.tint(20).toString():m(n,20);if(t.plain)l=r.cssVarBlock({"bg-color":t.dark?m(n,90):n.tint(90).toString(),"text-color":c,"border-color":t.dark?m(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")]=t.dark?m(n,90):n.tint(90).toString(),l[r.cssVarBlockName("disabled-text-color")]=t.dark?m(n,50):n.tint(50).toString(),l[r.cssVarBlockName("disabled-border-color")]=t.dark?m(n,80):n.tint(80).toString());else{const f=t.dark?m(n,30):n.tint(30).toString(),b=n.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(l=r.cssVarBlock({"bg-color":c,"text-color":b,"border-color":c,"hover-bg-color":f,"hover-text-color":b,"hover-border-color":f,"active-bg-color":d,"active-border-color":d}),u.value){const g=t.dark?m(n,50):n.tint(50).toString();l[r.cssVarBlockName("disabled-bg-color")]=g,l[r.cssVarBlockName("disabled-text-color")]=t.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(t,{expose:u,emit:r}){const l=t,c=G(l),a=p.useNamespace("button"),{_ref:n,_size:d,_type:f,_disabled:b,_props:g,_plain:y,_round:_,_text:B,shouldAddSpace:k,handleClick:C}=T(l,r),x=e.computed(()=>[a.b(),a.m(f.value),a.m(d.value),a.is("disabled",b.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:f,disabled:b,shouldAddSpace:k}),(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.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(()=>[o.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.loading?e.renderSlot(o.$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(o.loadingIcon)))]),_:1},8,["class"]))],64)):o.icon||o.$slots.icon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1},{default:e.withCtx(()=>[o.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{key:0})):e.renderSlot(o.$slots,"icon",{key:1})]),_:3})):e.createCommentVNode("v-if",!0),o.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({[e.unref(a).em("text","expand")]:e.unref(k)})},[e.renderSlot(o.$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(t){const u=t;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=$;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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-
|
|
2
|
+
import { l as W, E as G } from "./index-b07f58c9.js";
|
|
3
3
|
import { u as X } from "./index-2e331d74.js";
|
|
4
|
-
import { a as Y } from "./use-global-config-
|
|
5
|
-
import {
|
|
6
|
-
import { b as ot,
|
|
4
|
+
import { a as Y } from "./use-global-config-1923bb6f.js";
|
|
5
|
+
import { e as Z, a as tt, d as F, u as et, i as D } from "./el-scrollbar-09769d9e.js";
|
|
6
|
+
import { b as ot, d as nt, u as I, _ as K, w as lt, y as at } from "./base-f5b11441.js";
|
|
7
7
|
import { T as rt } from "./index-657047bb.js";
|
|
8
8
|
const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
9
9
|
X({
|
|
@@ -13,21 +13,21 @@ const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
13
13
|
scope: "props",
|
|
14
14
|
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
15
15
|
}, u(() => t.type === "text"));
|
|
16
|
-
const
|
|
16
|
+
const l = M(j, void 0), n = Y("button"), { form: s } = Z(), a = tt(u(() => l == null ? void 0 : l.size)), o = F(), b = O(), v = R(), p = u(() => {
|
|
17
17
|
var e;
|
|
18
|
-
return t.type || (
|
|
18
|
+
return t.type || (l == null ? void 0 : l.type) || ((e = n.value) == null ? void 0 : e.type) || "";
|
|
19
19
|
}), g = u(() => {
|
|
20
20
|
var e, r, i;
|
|
21
|
-
return (i = (r = t.autoInsertSpace) != null ? r : (e =
|
|
21
|
+
return (i = (r = t.autoInsertSpace) != null ? r : (e = n.value) == null ? void 0 : e.autoInsertSpace) != null ? i : !1;
|
|
22
22
|
}), h = u(() => {
|
|
23
23
|
var e, r, i;
|
|
24
|
-
return (i = (r = t.plain) != null ? r : (e =
|
|
24
|
+
return (i = (r = t.plain) != null ? r : (e = n.value) == null ? void 0 : e.plain) != null ? i : !1;
|
|
25
25
|
}), S = u(() => {
|
|
26
26
|
var e, r, i;
|
|
27
|
-
return (i = (r = t.round) != null ? r : (e =
|
|
27
|
+
return (i = (r = t.round) != null ? r : (e = n.value) == null ? void 0 : e.round) != null ? i : !1;
|
|
28
28
|
}), C = u(() => {
|
|
29
29
|
var e, r, i;
|
|
30
|
-
return (i = (r = t.text) != null ? r : (e =
|
|
30
|
+
return (i = (r = t.text) != null ? r : (e = n.value) == null ? void 0 : e.text) != null ? i : !1;
|
|
31
31
|
}), _ = u(() => t.tag === "button" ? {
|
|
32
32
|
ariaDisabled: o.value || t.loading,
|
|
33
33
|
disabled: o.value || t.loading,
|
|
@@ -116,7 +116,7 @@ const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
116
116
|
default: void 0
|
|
117
117
|
},
|
|
118
118
|
tag: {
|
|
119
|
-
type:
|
|
119
|
+
type: nt([String, Object]),
|
|
120
120
|
default: "button"
|
|
121
121
|
}
|
|
122
122
|
}), ut = {
|
|
@@ -126,28 +126,28 @@ function f(t, c = 20) {
|
|
|
126
126
|
return t.mix("#141414", c).toString();
|
|
127
127
|
}
|
|
128
128
|
function dt(t) {
|
|
129
|
-
const c = F(),
|
|
129
|
+
const c = F(), l = I("button");
|
|
130
130
|
return u(() => {
|
|
131
|
-
let
|
|
131
|
+
let n = {}, s = t.color;
|
|
132
132
|
if (s) {
|
|
133
133
|
const a = s.match(/var\((.*?)\)/);
|
|
134
134
|
a && (s = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
|
|
135
135
|
const o = new rt(s), b = t.dark ? o.tint(20).toString() : f(o, 20);
|
|
136
136
|
if (t.plain)
|
|
137
|
-
|
|
137
|
+
n = l.cssVarBlock({
|
|
138
138
|
"bg-color": t.dark ? f(o, 90) : o.tint(90).toString(),
|
|
139
139
|
"text-color": s,
|
|
140
140
|
"border-color": t.dark ? f(o, 50) : o.tint(50).toString(),
|
|
141
|
-
"hover-text-color": `var(${
|
|
141
|
+
"hover-text-color": `var(${l.cssVarName("color-white")})`,
|
|
142
142
|
"hover-bg-color": s,
|
|
143
143
|
"hover-border-color": s,
|
|
144
144
|
"active-bg-color": b,
|
|
145
|
-
"active-text-color": `var(${
|
|
145
|
+
"active-text-color": `var(${l.cssVarName("color-white")})`,
|
|
146
146
|
"active-border-color": b
|
|
147
|
-
}), c.value && (l
|
|
147
|
+
}), c.value && (n[l.cssVarBlockName("disabled-bg-color")] = t.dark ? f(o, 90) : o.tint(90).toString(), n[l.cssVarBlockName("disabled-text-color")] = t.dark ? f(o, 50) : o.tint(50).toString(), n[l.cssVarBlockName("disabled-border-color")] = t.dark ? f(o, 80) : o.tint(80).toString());
|
|
148
148
|
else {
|
|
149
|
-
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${
|
|
150
|
-
if (
|
|
149
|
+
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${l.cssVarName("color-white")})` : `var(${l.cssVarName("color-black")})`;
|
|
150
|
+
if (n = l.cssVarBlock({
|
|
151
151
|
"bg-color": s,
|
|
152
152
|
"text-color": p,
|
|
153
153
|
"border-color": s,
|
|
@@ -158,11 +158,11 @@ function dt(t) {
|
|
|
158
158
|
"active-border-color": b
|
|
159
159
|
}), c.value) {
|
|
160
160
|
const g = t.dark ? f(o, 50) : o.tint(50).toString();
|
|
161
|
-
l
|
|
161
|
+
n[l.cssVarBlockName("disabled-bg-color")] = g, n[l.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${l.cssVarName("color-white")})`, n[l.cssVarBlockName("disabled-border-color")] = g;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return n;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
const bt = B({
|
|
@@ -171,8 +171,8 @@ const bt = B({
|
|
|
171
171
|
...bt,
|
|
172
172
|
props: z,
|
|
173
173
|
emits: ut,
|
|
174
|
-
setup(t, { expose: c, emit:
|
|
175
|
-
const
|
|
174
|
+
setup(t, { expose: c, emit: l }) {
|
|
175
|
+
const n = t, s = dt(n), a = I("button"), {
|
|
176
176
|
_ref: o,
|
|
177
177
|
_size: b,
|
|
178
178
|
_type: v,
|
|
@@ -183,18 +183,18 @@ const bt = B({
|
|
|
183
183
|
_text: C,
|
|
184
184
|
shouldAddSpace: _,
|
|
185
185
|
handleClick: x
|
|
186
|
-
} = st(
|
|
186
|
+
} = st(n, l), E = u(() => [
|
|
187
187
|
a.b(),
|
|
188
188
|
a.m(v.value),
|
|
189
189
|
a.m(b.value),
|
|
190
190
|
a.is("disabled", p.value),
|
|
191
|
-
a.is("loading",
|
|
191
|
+
a.is("loading", n.loading),
|
|
192
192
|
a.is("plain", h.value),
|
|
193
193
|
a.is("round", S.value),
|
|
194
|
-
a.is("circle",
|
|
194
|
+
a.is("circle", n.circle),
|
|
195
195
|
a.is("text", C.value),
|
|
196
|
-
a.is("link",
|
|
197
|
-
a.is("has-bg",
|
|
196
|
+
a.is("link", n.link),
|
|
197
|
+
a.is("has-bg", n.bg)
|
|
198
198
|
]);
|
|
199
199
|
return c({
|
|
200
200
|
ref: o,
|
|
@@ -253,16 +253,16 @@ const mt = {
|
|
|
253
253
|
size: P(c, "size"),
|
|
254
254
|
type: P(c, "type")
|
|
255
255
|
}));
|
|
256
|
-
const
|
|
257
|
-
return (
|
|
258
|
-
class: w(d(
|
|
256
|
+
const l = I("button");
|
|
257
|
+
return (n, s) => (m(), $("div", {
|
|
258
|
+
class: w(d(l).b("group"))
|
|
259
259
|
}, [
|
|
260
|
-
k(
|
|
260
|
+
k(n.$slots, "default")
|
|
261
261
|
], 2));
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
var A = /* @__PURE__ */ K(gt, [["__file", "button-group.vue"]]);
|
|
265
|
-
const xt =
|
|
265
|
+
const xt = lt(ft, {
|
|
266
266
|
ButtonGroup: A
|
|
267
267
|
});
|
|
268
268
|
at(A);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as I, onMounted as _, watchEffect as J, onBeforeUnmount as
|
|
2
|
-
import {
|
|
3
|
-
import { F as fe,
|
|
4
|
-
import { E as pe } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as ye } from "./index-
|
|
1
|
+
import { ref as I, onMounted as _, watchEffect as J, onBeforeUnmount as G, defineComponent as A, inject as U, computed as L, openBlock as P, createElementBlock as B, unref as e, normalizeClass as h, normalizeStyle as K, createElementVNode as R, renderSlot as k, toDisplayString as Q, createVNode as S, withCtx as C, createBlock as N, resolveDynamicComponent as Z, createCommentVNode as j, useSlots as x, provide as ee, Transition as oe, mergeProps as q, withDirectives as se, createSlots as te, vShow as le } from "vue";
|
|
2
|
+
import { d as ae, a as ne, b as V, c as re, e as ie, u as de, E as ce, f as ue } from "./el-overlay-04659660.js";
|
|
3
|
+
import { F as fe, g as me, b as ve } from "./el-popper-ee1f8186.js";
|
|
4
|
+
import { E as pe } from "./index-b07f58c9.js";
|
|
5
|
+
import { j as H, c as ge, _ as W, u as he, w as Ce } from "./base-f5b11441.js";
|
|
6
|
+
import { C as be } from "./el-scrollbar-09769d9e.js";
|
|
7
|
+
import { u as ye } from "./index-cfeda35a.js";
|
|
8
8
|
import { u as Ee } from "./index-2e331d74.js";
|
|
9
9
|
const we = (r, d, l, $) => {
|
|
10
10
|
const a = {
|
|
@@ -38,7 +38,7 @@ const we = (r, d, l, $) => {
|
|
|
38
38
|
J(() => {
|
|
39
39
|
l.value ? t() : y();
|
|
40
40
|
});
|
|
41
|
-
}),
|
|
41
|
+
}), G(() => {
|
|
42
42
|
y();
|
|
43
43
|
}), {
|
|
44
44
|
isDragging: c,
|
|
@@ -54,7 +54,7 @@ const we = (r, d, l, $) => {
|
|
|
54
54
|
props: ae,
|
|
55
55
|
emits: ne,
|
|
56
56
|
setup(r, { expose: d }) {
|
|
57
|
-
const l = r, { t: $ } = ye(), { Close: a } = be, { dialogRef: c, headerRef: b, bodyId: v, ns: t, style: y } =
|
|
57
|
+
const l = r, { t: $ } = ye(), { Close: a } = be, { dialogRef: c, headerRef: b, bodyId: v, ns: t, style: y } = U(V), { focusTrapRef: D } = U(fe), E = ke(D, c), n = L(() => !!l.draggable), i = L(() => !!l.overflow), { resetPosition: p, updatePosition: g, isDragging: u } = we(c, b, n, i), f = L(() => [
|
|
58
58
|
t.b(),
|
|
59
59
|
t.is("fullscreen", l.fullscreen),
|
|
60
60
|
t.is("draggable", n.value),
|
|
@@ -81,7 +81,7 @@ const we = (r, d, l, $) => {
|
|
|
81
81
|
role: "heading",
|
|
82
82
|
"aria-level": s.ariaLevel,
|
|
83
83
|
class: h(e(t).e("title"))
|
|
84
|
-
},
|
|
84
|
+
}, Q(s.title), 11, ["aria-level"])
|
|
85
85
|
]),
|
|
86
86
|
s.showClose ? (P(), B("button", {
|
|
87
87
|
key: 0,
|
|
@@ -98,7 +98,7 @@ const we = (r, d, l, $) => {
|
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 8, ["class"])
|
|
101
|
-
], 10, ["aria-label", "onClick"])) :
|
|
101
|
+
], 10, ["aria-label", "onClick"])) : j("v-if", !0)
|
|
102
102
|
], 2),
|
|
103
103
|
R("div", {
|
|
104
104
|
id: e(v),
|
|
@@ -111,7 +111,7 @@ const we = (r, d, l, $) => {
|
|
|
111
111
|
class: h([e(t).e("footer"), s.footerClass])
|
|
112
112
|
}, [
|
|
113
113
|
k(s.$slots, "footer")
|
|
114
|
-
], 2)) :
|
|
114
|
+
], 2)) : j("v-if", !0)
|
|
115
115
|
], 6));
|
|
116
116
|
}
|
|
117
117
|
});
|
|
@@ -175,13 +175,13 @@ const Me = A({
|
|
|
175
175
|
default: C(() => [
|
|
176
176
|
S(oe, q(e(p), { persisted: "" }), {
|
|
177
177
|
default: C(() => {
|
|
178
|
-
var
|
|
178
|
+
var O;
|
|
179
179
|
return [
|
|
180
180
|
se(S(e(ce), {
|
|
181
181
|
"custom-mask-event": "",
|
|
182
182
|
mask: o.modal,
|
|
183
183
|
"overlay-class": [
|
|
184
|
-
(
|
|
184
|
+
(O = o.modalClass) != null ? O : "",
|
|
185
185
|
`${e(a).namespace.value}-modal-dialog`,
|
|
186
186
|
e(a).is("penetrable", e(X))
|
|
187
187
|
],
|
|
@@ -248,7 +248,7 @@ const Me = A({
|
|
|
248
248
|
k(o.$slots, "footer")
|
|
249
249
|
])
|
|
250
250
|
} : void 0
|
|
251
|
-
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) :
|
|
251
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : j("v-if", !0)
|
|
252
252
|
]),
|
|
253
253
|
_: 3
|
|
254
254
|
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
@@ -268,9 +268,9 @@ const Me = A({
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
var Le = /* @__PURE__ */ W(Te, [["__file", "dialog.vue"]]);
|
|
271
|
-
const
|
|
271
|
+
const je = Ce(Le);
|
|
272
272
|
export {
|
|
273
|
-
|
|
273
|
+
je as E,
|
|
274
274
|
ke as c,
|
|
275
275
|
we as u
|
|
276
276
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("./el-overlay-
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./el-overlay-ef92f51f.cjs"),T=require("./el-popper-c9e0136d.cjs"),F=require("./index-eab8a286.cjs"),E=require("./base-ef747d02.cjs"),R=require("./el-scrollbar-05815cf5.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}},I=(...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=I($,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(F.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=I;exports.useDraggable=N;
|