st-comp 0.0.91 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.d.ts +0 -12
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +5 -1
- package/es/Dialog.js +711 -45
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +1 -410
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +91 -92
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +9 -10
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +104 -106
- package/es/Table.cjs +20 -1
- package/es/Table.js +4254 -362
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +1 -2015
- package/es/VirtualTable.cjs +2 -2
- package/es/VirtualTable.js +254 -249
- package/es/base-8aa55db5.js +725 -0
- package/es/base-b187e78f.cjs +9 -0
- package/es/{el-button-93e0ac7c.js → el-button-9476b767.js} +69 -69
- package/es/{el-button-ec16f484.cjs → el-button-ed961332.cjs} +1 -1
- package/es/{el-empty-16ceef82.cjs → el-empty-7adcc7f0.cjs} +1 -1
- package/es/{el-empty-0c85d9b7.js → el-empty-f4c08c01.js} +3 -3
- package/es/{el-scrollbar-9473fd47.cjs → el-scrollbar-586be9bd.cjs} +1 -1
- package/es/{el-scrollbar-e17fad47.js → el-scrollbar-ffb7b9c1.js} +43 -43
- package/es/el-select-a6cf0236.js +1893 -0
- package/es/el-select-eaa79c54.cjs +9 -0
- package/es/el-tag-5a8b728a.cjs +1 -0
- package/es/{el-tag-9493bdff.js → el-tag-7549c103.js} +119 -126
- package/es/{focus-trap-1b2aef75.js → focus-trap-5fc152a0.js} +34 -35
- package/es/focus-trap-ea1e7a19.cjs +1 -0
- package/es/raf-3a2b250a.js +6 -0
- package/es/{raf-c437ab23.cjs → raf-c4bba516.cjs} +1 -1
- package/es/{scroll-a80e1458.cjs → scroll-38e17abc.cjs} +1 -1
- package/es/{scroll-a928a93e.js → scroll-c6e51ef8.js} +5 -5
- package/es/style.css +1 -1
- package/es/use-form-item-bd4b9eeb.js +531 -0
- package/es/use-form-item-c25c7251.cjs +3 -0
- package/es/use-global-config-2d21cd56.js +110 -0
- package/es/use-global-config-bce8cdd8.cjs +1 -0
- package/es/{vnode-85a610a2.cjs → vnode-40f9df3c.cjs} +1 -1
- package/es/{vnode-aa872900.js → vnode-f4b846cb.js} +1 -1
- package/es/zh-cn-a61d484e.cjs +1 -0
- package/es/{zh-cn-d29347f8.js → zh-cn-e36dfbf4.js} +45 -6
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +141 -141
- package/lib/{index-ee45a01a.js → index-4635557b.js} +10896 -10844
- package/lib/{python-1c6a2ac7.js → python-aa056c80.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +268 -202
- package/src/pages/FactorWarning/index.vue +852 -0
- package/es/base-1bc9f12c.js +0 -762
- package/es/base-315cbfab.cjs +0 -9
- package/es/castArray-f42865a2.js +0 -10
- package/es/castArray-f54f6f75.cjs +0 -1
- package/es/config-provider-17c85684.cjs +0 -1
- package/es/config-provider-c8d3957d.js +0 -46
- package/es/el-icon-0ea8fbf8.cjs +0 -1
- package/es/el-icon-4ed993c7.js +0 -1
- package/es/el-input-29806e42.js +0 -543
- package/es/el-input-a8791103.cjs +0 -9
- package/es/el-overlay-53eb27a5.js +0 -678
- package/es/el-overlay-6d0c5cc3.cjs +0 -5
- package/es/el-popover-1d087574.cjs +0 -1
- package/es/el-popover-dd66e2c8.js +0 -133
- package/es/el-radio-group-46e8f574.cjs +0 -12
- package/es/el-radio-group-caebab9d.js +0 -1743
- package/es/el-select-64511731.cjs +0 -1
- package/es/el-select-ac302f3c.js +0 -1360
- package/es/el-table-column-773986c7.cjs +0 -20
- package/es/el-table-column-b8e2141b.js +0 -3795
- package/es/el-tag-a6a4d4ef.cjs +0 -1
- package/es/focus-trap-ea177336.cjs +0 -1
- package/es/raf-6d7e80f4.js +0 -6
- package/es/use-form-item-7924b6c1.cjs +0 -3
- package/es/use-form-item-aeec8499.js +0 -669
- package/es/use-global-config-b07c467a.js +0 -110
- package/es/use-global-config-d02be80b.cjs +0 -1
- package/es/zh-cn-0024c96d.cjs +0 -1
package/es/el-select-ac302f3c.js
DELETED
|
@@ -1,1360 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, computed as p, openBlock as h, createElementBlock as P, normalizeClass as g, unref as b, normalizeStyle as J, createElementVNode as M, renderSlot as le, createBlock as z, withModifiers as j, withCtx as w, createVNode as x, createCommentVNode as K, Transition as bl, inject as qe, getCurrentInstance as gl, toRaw as We, watch as R, reactive as Fe, toRefs as yl, onBeforeUnmount as Ql, nextTick as A, withDirectives as Te, toDisplayString as _, vShow as Cl, ref as B, onMounted as Sl, shallowRef as Tl, triggerRef as we, provide as zl, resolveComponent as Z, resolveDirective as Gl, Fragment as Be, renderList as vl, withKeys as F, vModelText as Ul, createSlots as Jl, resolveDynamicComponent as Il } from "vue";
|
|
2
|
-
import { t as Xl, u as Kl, d as El } from "./el-scrollbar-e17fad47.js";
|
|
3
|
-
import { j as Yl, i as Ll, l as Zl, E as xl, C as _l, a as en, m as ln } from "./el-tag-9493bdff.js";
|
|
4
|
-
import { i as nn, E as tn } from "./el-input-29806e42.js";
|
|
5
|
-
import { z as on, c as Al, h as Bl, E as hl, A as kl, u as an, t as sn, V as rn, i as Ml, B as un, a as dn } from "./use-form-item-aeec8499.js";
|
|
6
|
-
import { b as cn, u as ae, _ as Ie, w as ql, J as N, g as Ol, j as pn, s as ie, o as fn, E as vn, k as mn, K as ml, e as $l, i as Wl, L as bn, f as Fl } from "./base-1bc9f12c.js";
|
|
7
|
-
import { E as Vl, U as ee, C as Nl } from "./focus-trap-1b2aef75.js";
|
|
8
|
-
import { s as hn } from "./scroll-a928a93e.js";
|
|
9
|
-
var Dl = 1 / 0, gn = 17976931348623157e292;
|
|
10
|
-
function yn(e) {
|
|
11
|
-
if (!e)
|
|
12
|
-
return e === 0 ? e : 0;
|
|
13
|
-
if (e = Xl(e), e === Dl || e === -Dl) {
|
|
14
|
-
var l = e < 0 ? -1 : 1;
|
|
15
|
-
return l * gn;
|
|
16
|
-
}
|
|
17
|
-
return e === e ? e : 0;
|
|
18
|
-
}
|
|
19
|
-
function Cn(e) {
|
|
20
|
-
var l = yn(e), a = l % 1;
|
|
21
|
-
return l === l ? a ? l - a : l : 0;
|
|
22
|
-
}
|
|
23
|
-
function Sn(e, l, a, v) {
|
|
24
|
-
for (var d = e.length, u = a + (v ? 1 : -1); v ? u-- : ++u < d; )
|
|
25
|
-
if (l(e[u], u, e))
|
|
26
|
-
return u;
|
|
27
|
-
return -1;
|
|
28
|
-
}
|
|
29
|
-
var On = Math.max, wn = Math.min;
|
|
30
|
-
function Tn(e, l, a) {
|
|
31
|
-
var v = e == null ? 0 : e.length;
|
|
32
|
-
if (!v)
|
|
33
|
-
return -1;
|
|
34
|
-
var d = v - 1;
|
|
35
|
-
return a !== void 0 && (d = Cn(a), d = a < 0 ? On(v + d, 0) : wn(d, v - 1)), Sn(e, Yl(l), d, !0);
|
|
36
|
-
}
|
|
37
|
-
const In = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), En = (e) => on[e || "default"], Ln = (e) => ["", ...Al].includes(e), Rl = cn({
|
|
38
|
-
type: {
|
|
39
|
-
type: String,
|
|
40
|
-
values: ["success", "info", "warning", "danger", ""],
|
|
41
|
-
default: ""
|
|
42
|
-
},
|
|
43
|
-
closable: Boolean,
|
|
44
|
-
disableTransitions: Boolean,
|
|
45
|
-
hit: Boolean,
|
|
46
|
-
color: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: ""
|
|
49
|
-
},
|
|
50
|
-
size: {
|
|
51
|
-
type: String,
|
|
52
|
-
values: Al,
|
|
53
|
-
default: ""
|
|
54
|
-
},
|
|
55
|
-
effect: {
|
|
56
|
-
type: String,
|
|
57
|
-
values: ["dark", "light", "plain"],
|
|
58
|
-
default: "light"
|
|
59
|
-
},
|
|
60
|
-
round: Boolean
|
|
61
|
-
}), kn = {
|
|
62
|
-
close: (e) => e instanceof MouseEvent,
|
|
63
|
-
click: (e) => e instanceof MouseEvent
|
|
64
|
-
}, Mn = se({
|
|
65
|
-
name: "ElTag"
|
|
66
|
-
}), $n = /* @__PURE__ */ se({
|
|
67
|
-
...Mn,
|
|
68
|
-
props: Rl,
|
|
69
|
-
emits: kn,
|
|
70
|
-
setup(e, { emit: l }) {
|
|
71
|
-
const a = e, v = Bl(), d = ae("tag"), u = p(() => {
|
|
72
|
-
const { type: s, hit: S, effect: C, closable: m, round: $ } = a;
|
|
73
|
-
return [
|
|
74
|
-
d.b(),
|
|
75
|
-
d.is("closable", m),
|
|
76
|
-
d.m(s),
|
|
77
|
-
d.m(v.value),
|
|
78
|
-
d.m(C),
|
|
79
|
-
d.is("hit", S),
|
|
80
|
-
d.is("round", $)
|
|
81
|
-
];
|
|
82
|
-
}), c = (s) => {
|
|
83
|
-
l("close", s);
|
|
84
|
-
}, f = (s) => {
|
|
85
|
-
l("click", s);
|
|
86
|
-
};
|
|
87
|
-
return (s, S) => s.disableTransitions ? (h(), P("span", {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: g(b(u)),
|
|
90
|
-
style: J({ backgroundColor: s.color }),
|
|
91
|
-
onClick: f
|
|
92
|
-
}, [
|
|
93
|
-
M("span", {
|
|
94
|
-
class: g(b(d).e("content"))
|
|
95
|
-
}, [
|
|
96
|
-
le(s.$slots, "default")
|
|
97
|
-
], 2),
|
|
98
|
-
s.closable ? (h(), z(b(hl), {
|
|
99
|
-
key: 0,
|
|
100
|
-
class: g(b(d).e("close")),
|
|
101
|
-
onClick: j(c, ["stop"])
|
|
102
|
-
}, {
|
|
103
|
-
default: w(() => [
|
|
104
|
-
x(b(kl))
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
}, 8, ["class", "onClick"])) : K("v-if", !0)
|
|
108
|
-
], 6)) : (h(), z(bl, {
|
|
109
|
-
key: 1,
|
|
110
|
-
name: `${b(d).namespace.value}-zoom-in-center`,
|
|
111
|
-
appear: ""
|
|
112
|
-
}, {
|
|
113
|
-
default: w(() => [
|
|
114
|
-
M("span", {
|
|
115
|
-
class: g(b(u)),
|
|
116
|
-
style: J({ backgroundColor: s.color }),
|
|
117
|
-
onClick: f
|
|
118
|
-
}, [
|
|
119
|
-
M("span", {
|
|
120
|
-
class: g(b(d).e("content"))
|
|
121
|
-
}, [
|
|
122
|
-
le(s.$slots, "default")
|
|
123
|
-
], 2),
|
|
124
|
-
s.closable ? (h(), z(b(hl), {
|
|
125
|
-
key: 0,
|
|
126
|
-
class: g(b(d).e("close")),
|
|
127
|
-
onClick: j(c, ["stop"])
|
|
128
|
-
}, {
|
|
129
|
-
default: w(() => [
|
|
130
|
-
x(b(kl))
|
|
131
|
-
]),
|
|
132
|
-
_: 1
|
|
133
|
-
}, 8, ["class", "onClick"])) : K("v-if", !0)
|
|
134
|
-
], 6)
|
|
135
|
-
]),
|
|
136
|
-
_: 3
|
|
137
|
-
}, 8, ["name"]));
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
var Vn = /* @__PURE__ */ Ie($n, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
|
|
141
|
-
const Dn = ql(Vn), Hl = Symbol("ElSelectGroup"), Ne = Symbol("ElSelect");
|
|
142
|
-
function Pn(e, l) {
|
|
143
|
-
const a = qe(Ne), v = qe(Hl, { disabled: !1 }), d = p(() => Object.prototype.toString.call(e.value).toLowerCase() === "[object object]"), u = p(() => a.props.multiple ? m(a.props.modelValue, e.value) : $(e.value, a.props.modelValue)), c = p(() => {
|
|
144
|
-
if (a.props.multiple) {
|
|
145
|
-
const o = a.props.modelValue || [];
|
|
146
|
-
return !u.value && o.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
|
|
147
|
-
} else
|
|
148
|
-
return !1;
|
|
149
|
-
}), f = p(() => e.label || (d.value ? "" : e.value)), s = p(() => e.value || e.label || ""), S = p(() => e.disabled || l.groupDisabled || c.value), C = gl(), m = (o = [], y) => {
|
|
150
|
-
if (d.value) {
|
|
151
|
-
const O = a.props.valueKey;
|
|
152
|
-
return o && o.some((E) => We(N(E, O)) === N(y, O));
|
|
153
|
-
} else
|
|
154
|
-
return o && o.includes(y);
|
|
155
|
-
}, $ = (o, y) => {
|
|
156
|
-
if (d.value) {
|
|
157
|
-
const { valueKey: O } = a.props;
|
|
158
|
-
return N(o, O) === N(y, O);
|
|
159
|
-
} else
|
|
160
|
-
return o === y;
|
|
161
|
-
}, T = () => {
|
|
162
|
-
!e.disabled && !v.disabled && (a.hoverIndex = a.optionsArray.indexOf(C.proxy));
|
|
163
|
-
};
|
|
164
|
-
R(() => f.value, () => {
|
|
165
|
-
!e.created && !a.props.remote && a.setSelected();
|
|
166
|
-
}), R(() => e.value, (o, y) => {
|
|
167
|
-
const { remote: O, valueKey: E } = a.props;
|
|
168
|
-
if (Object.is(o, y) || (a.onOptionDestroy(y, C.proxy), a.onOptionCreate(C.proxy)), !e.created && !O) {
|
|
169
|
-
if (E && typeof o == "object" && typeof y == "object" && o[E] === y[E])
|
|
170
|
-
return;
|
|
171
|
-
a.setSelected();
|
|
172
|
-
}
|
|
173
|
-
}), R(() => v.disabled, () => {
|
|
174
|
-
l.groupDisabled = v.disabled;
|
|
175
|
-
}, { immediate: !0 });
|
|
176
|
-
const { queryChange: I } = We(a);
|
|
177
|
-
return R(I, (o) => {
|
|
178
|
-
const { query: y } = b(o), O = new RegExp(In(y), "i");
|
|
179
|
-
l.visible = O.test(f.value) || e.created, l.visible || a.filteredOptionsCount--;
|
|
180
|
-
}, { immediate: !0 }), {
|
|
181
|
-
select: a,
|
|
182
|
-
currentLabel: f,
|
|
183
|
-
currentValue: s,
|
|
184
|
-
itemSelected: u,
|
|
185
|
-
isDisabled: S,
|
|
186
|
-
hoverItem: T
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
const zn = se({
|
|
190
|
-
name: "ElOption",
|
|
191
|
-
componentName: "ElOption",
|
|
192
|
-
props: {
|
|
193
|
-
value: {
|
|
194
|
-
required: !0,
|
|
195
|
-
type: [String, Number, Boolean, Object]
|
|
196
|
-
},
|
|
197
|
-
label: [String, Number],
|
|
198
|
-
created: Boolean,
|
|
199
|
-
disabled: Boolean
|
|
200
|
-
},
|
|
201
|
-
setup(e) {
|
|
202
|
-
const l = ae("select"), a = p(() => [
|
|
203
|
-
l.be("dropdown", "item"),
|
|
204
|
-
l.is("disabled", b(c)),
|
|
205
|
-
{
|
|
206
|
-
selected: b(u),
|
|
207
|
-
hover: b(C)
|
|
208
|
-
}
|
|
209
|
-
]), v = Fe({
|
|
210
|
-
index: -1,
|
|
211
|
-
groupDisabled: !1,
|
|
212
|
-
visible: !0,
|
|
213
|
-
hitState: !1,
|
|
214
|
-
hover: !1
|
|
215
|
-
}), { currentLabel: d, itemSelected: u, isDisabled: c, select: f, hoverItem: s } = Pn(e, v), { visible: S, hover: C } = yl(v), m = gl().proxy;
|
|
216
|
-
f.onOptionCreate(m), Ql(() => {
|
|
217
|
-
const T = m.value, { selected: I } = f, y = (f.props.multiple ? I : [I]).some((O) => O.value === m.value);
|
|
218
|
-
A(() => {
|
|
219
|
-
f.cachedOptions.get(T) === m && !y && f.cachedOptions.delete(T);
|
|
220
|
-
}), f.onOptionDestroy(T, m);
|
|
221
|
-
});
|
|
222
|
-
function $() {
|
|
223
|
-
e.disabled !== !0 && v.groupDisabled !== !0 && f.handleOptionSelect(m);
|
|
224
|
-
}
|
|
225
|
-
return {
|
|
226
|
-
ns: l,
|
|
227
|
-
containerKls: a,
|
|
228
|
-
currentLabel: d,
|
|
229
|
-
itemSelected: u,
|
|
230
|
-
isDisabled: c,
|
|
231
|
-
select: f,
|
|
232
|
-
hoverItem: s,
|
|
233
|
-
visible: S,
|
|
234
|
-
hover: C,
|
|
235
|
-
selectOptionClick: $,
|
|
236
|
-
states: v
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
function Kn(e, l, a, v, d, u) {
|
|
241
|
-
return Te((h(), P("li", {
|
|
242
|
-
class: g(e.containerKls),
|
|
243
|
-
onMouseenter: l[0] || (l[0] = (...c) => e.hoverItem && e.hoverItem(...c)),
|
|
244
|
-
onClick: l[1] || (l[1] = j((...c) => e.selectOptionClick && e.selectOptionClick(...c), ["stop"]))
|
|
245
|
-
}, [
|
|
246
|
-
le(e.$slots, "default", {}, () => [
|
|
247
|
-
M("span", null, _(e.currentLabel), 1)
|
|
248
|
-
])
|
|
249
|
-
], 34)), [
|
|
250
|
-
[Cl, e.visible]
|
|
251
|
-
]);
|
|
252
|
-
}
|
|
253
|
-
var wl = /* @__PURE__ */ Ie(zn, [["render", Kn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);
|
|
254
|
-
const An = se({
|
|
255
|
-
name: "ElSelectDropdown",
|
|
256
|
-
componentName: "ElSelectDropdown",
|
|
257
|
-
setup() {
|
|
258
|
-
const e = qe(Ne), l = ae("select"), a = p(() => e.props.popperClass), v = p(() => e.props.multiple), d = p(() => e.props.fitInputWidth), u = B("");
|
|
259
|
-
function c() {
|
|
260
|
-
var f;
|
|
261
|
-
u.value = `${(f = e.selectWrapper) == null ? void 0 : f.offsetWidth}px`;
|
|
262
|
-
}
|
|
263
|
-
return Sl(() => {
|
|
264
|
-
c(), Kl(e.selectWrapper, c);
|
|
265
|
-
}), {
|
|
266
|
-
ns: l,
|
|
267
|
-
minWidth: u,
|
|
268
|
-
popperClass: a,
|
|
269
|
-
isMultiple: v,
|
|
270
|
-
isFitInputWidth: d
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
function Bn(e, l, a, v, d, u) {
|
|
275
|
-
return h(), P("div", {
|
|
276
|
-
class: g([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
|
|
277
|
-
style: J({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
|
|
278
|
-
}, [
|
|
279
|
-
le(e.$slots, "default")
|
|
280
|
-
], 6);
|
|
281
|
-
}
|
|
282
|
-
var qn = /* @__PURE__ */ Ie(An, [["render", Bn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
|
|
283
|
-
function Wn(e) {
|
|
284
|
-
const { t: l } = Ol();
|
|
285
|
-
return Fe({
|
|
286
|
-
options: /* @__PURE__ */ new Map(),
|
|
287
|
-
cachedOptions: /* @__PURE__ */ new Map(),
|
|
288
|
-
disabledOptions: /* @__PURE__ */ new Map(),
|
|
289
|
-
createdLabel: null,
|
|
290
|
-
createdSelected: !1,
|
|
291
|
-
selected: e.multiple ? [] : {},
|
|
292
|
-
inputLength: 20,
|
|
293
|
-
inputWidth: 0,
|
|
294
|
-
optionsCount: 0,
|
|
295
|
-
filteredOptionsCount: 0,
|
|
296
|
-
visible: !1,
|
|
297
|
-
selectedLabel: "",
|
|
298
|
-
hoverIndex: -1,
|
|
299
|
-
query: "",
|
|
300
|
-
previousQuery: null,
|
|
301
|
-
inputHovering: !1,
|
|
302
|
-
cachedPlaceHolder: "",
|
|
303
|
-
currentPlaceholder: l("el.select.placeholder"),
|
|
304
|
-
menuVisibleOnFocus: !1,
|
|
305
|
-
isOnComposition: !1,
|
|
306
|
-
prefixWidth: 11,
|
|
307
|
-
mouseEnter: !1,
|
|
308
|
-
focused: !1
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
const Fn = (e, l, a) => {
|
|
312
|
-
const { t: v } = Ol(), d = ae("select");
|
|
313
|
-
an({
|
|
314
|
-
from: "suffixTransition",
|
|
315
|
-
replacement: "override style scheme",
|
|
316
|
-
version: "2.3.0",
|
|
317
|
-
scope: "props",
|
|
318
|
-
ref: "https://element-plus.org/en-US/component/select.html#select-attributes"
|
|
319
|
-
}, p(() => e.suffixTransition === !1));
|
|
320
|
-
const u = B(null), c = B(null), f = B(null), s = B(null), S = B(null), C = B(null), m = B(null), $ = B(null), T = B(-1), I = Tl({ query: "" }), o = Tl(""), y = B([]);
|
|
321
|
-
let O = 0;
|
|
322
|
-
const { form: E, formItem: Q } = sn(), Ee = p(() => !e.filterable || e.multiple || !l.visible), X = p(() => e.disabled || (E == null ? void 0 : E.disabled)), Re = p(() => {
|
|
323
|
-
const n = e.multiple ? Array.isArray(e.modelValue) && e.modelValue.length > 0 : e.modelValue !== void 0 && e.modelValue !== null && e.modelValue !== "";
|
|
324
|
-
return e.clearable && !X.value && l.inputHovering && n;
|
|
325
|
-
}), re = p(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), He = p(() => d.is("reverse", re.value && l.visible && e.suffixTransition)), je = p(() => (E == null ? void 0 : E.statusIcon) && (Q == null ? void 0 : Q.validateState) && rn[Q == null ? void 0 : Q.validateState]), Le = p(() => e.remote ? 300 : 0), pe = p(() => e.loading ? e.loadingText || v("el.select.loading") : e.remote && l.query === "" && l.options.size === 0 ? !1 : e.filterable && l.query && l.options.size > 0 && l.filteredOptionsCount === 0 ? e.noMatchText || v("el.select.noMatch") : l.options.size === 0 ? e.noDataText || v("el.select.noData") : null), V = p(() => {
|
|
326
|
-
const n = Array.from(l.options.values()), t = [];
|
|
327
|
-
return y.value.forEach((i) => {
|
|
328
|
-
const r = n.findIndex((L) => L.currentLabel === i);
|
|
329
|
-
r > -1 && t.push(n[r]);
|
|
330
|
-
}), t.length >= n.length ? t : n;
|
|
331
|
-
}), Qe = p(() => Array.from(l.cachedOptions.values())), Ge = p(() => {
|
|
332
|
-
const n = V.value.filter((t) => !t.created).some((t) => t.currentLabel === l.query);
|
|
333
|
-
return e.filterable && e.allowCreate && l.query !== "" && !n;
|
|
334
|
-
}), ne = Bl(), Ue = p(() => ["small"].includes(ne.value) ? "small" : "default"), Je = p({
|
|
335
|
-
get() {
|
|
336
|
-
return l.visible && pe.value !== !1;
|
|
337
|
-
},
|
|
338
|
-
set(n) {
|
|
339
|
-
l.visible = n;
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
R([() => X.value, () => ne.value, () => E == null ? void 0 : E.size], () => {
|
|
343
|
-
A(() => {
|
|
344
|
-
H();
|
|
345
|
-
});
|
|
346
|
-
}), R(() => e.placeholder, (n) => {
|
|
347
|
-
l.cachedPlaceHolder = l.currentPlaceholder = n, e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (l.currentPlaceholder = "");
|
|
348
|
-
}), R(() => e.modelValue, (n, t) => {
|
|
349
|
-
e.multiple && (H(), n && n.length > 0 || c.value && l.query !== "" ? l.currentPlaceholder = "" : l.currentPlaceholder = l.cachedPlaceHolder, e.filterable && !e.reserveKeyword && (l.query = "", Y(l.query))), fe(), e.filterable && !e.multiple && (l.inputLength = 20), !Ll(n, t) && e.validateEvent && (Q == null || Q.validate("change").catch((i) => pn(i)));
|
|
350
|
-
}, {
|
|
351
|
-
flush: "post",
|
|
352
|
-
deep: !0
|
|
353
|
-
}), R(() => l.visible, (n) => {
|
|
354
|
-
var t, i, r, L, D;
|
|
355
|
-
n ? ((i = (t = s.value) == null ? void 0 : t.updatePopper) == null || i.call(t), e.filterable && (l.filteredOptionsCount = l.optionsCount, l.query = e.remote ? "" : l.selectedLabel, (L = (r = f.value) == null ? void 0 : r.focus) == null || L.call(r), e.multiple ? (D = c.value) == null || D.focus() : l.selectedLabel && (l.currentPlaceholder = `${l.selectedLabel}`, l.selectedLabel = ""), Y(l.query), !e.multiple && !e.remote && (I.value.query = "", we(I), we(o)))) : (e.filterable && (ie(e.filterMethod) && e.filterMethod(""), ie(e.remoteMethod) && e.remoteMethod("")), l.query = "", l.previousQuery = null, l.selectedLabel = "", l.inputLength = 20, l.menuVisibleOnFocus = !1, Xe(), A(() => {
|
|
356
|
-
c.value && c.value.value === "" && l.selected.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
|
|
357
|
-
}), e.multiple || (l.selected && (e.filterable && e.allowCreate && l.createdSelected && l.createdLabel ? l.selectedLabel = l.createdLabel : l.selectedLabel = l.selected.currentLabel, e.filterable && (l.query = l.selectedLabel)), e.filterable && (l.currentPlaceholder = l.cachedPlaceHolder))), a.emit("visible-change", n);
|
|
358
|
-
}), R(() => l.options.entries(), () => {
|
|
359
|
-
var n, t, i;
|
|
360
|
-
if (!fn)
|
|
361
|
-
return;
|
|
362
|
-
(t = (n = s.value) == null ? void 0 : n.updatePopper) == null || t.call(n), e.multiple && H();
|
|
363
|
-
const r = ((i = m.value) == null ? void 0 : i.querySelectorAll("input")) || [];
|
|
364
|
-
(!e.filterable && !e.defaultFirstOption && !vn(e.modelValue) || !Array.from(r).includes(document.activeElement)) && fe(), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && Me();
|
|
365
|
-
}, {
|
|
366
|
-
flush: "post"
|
|
367
|
-
}), R(() => l.hoverIndex, (n) => {
|
|
368
|
-
mn(n) && n > -1 ? T.value = V.value[n] || {} : T.value = {}, V.value.forEach((t) => {
|
|
369
|
-
t.hover = T.value === t;
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
const H = () => {
|
|
373
|
-
A(() => {
|
|
374
|
-
var n, t;
|
|
375
|
-
if (!u.value)
|
|
376
|
-
return;
|
|
377
|
-
const i = u.value.$el.querySelector("input");
|
|
378
|
-
O = O || (i.clientHeight > 0 ? i.clientHeight + 2 : 0);
|
|
379
|
-
const r = C.value, L = En(ne.value || (E == null ? void 0 : E.size)), D = ne.value || L === O || O <= 0 ? L : O;
|
|
380
|
-
!(i.offsetParent === null) && (i.style.height = `${(l.selected.length === 0 ? D : Math.max(r ? r.clientHeight + (r.clientHeight > D ? 6 : 0) : 0, D)) - 2}px`), l.visible && pe.value !== !1 && ((t = (n = s.value) == null ? void 0 : n.updatePopper) == null || t.call(n));
|
|
381
|
-
});
|
|
382
|
-
}, Y = async (n) => {
|
|
383
|
-
if (!(l.previousQuery === n || l.isOnComposition)) {
|
|
384
|
-
if (l.previousQuery === null && (ie(e.filterMethod) || ie(e.remoteMethod))) {
|
|
385
|
-
l.previousQuery = n;
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
l.previousQuery = n, A(() => {
|
|
389
|
-
var t, i;
|
|
390
|
-
l.visible && ((i = (t = s.value) == null ? void 0 : t.updatePopper) == null || i.call(t));
|
|
391
|
-
}), l.hoverIndex = -1, e.multiple && e.filterable && A(() => {
|
|
392
|
-
if (!X.value) {
|
|
393
|
-
const t = c.value.value.length * 15 + 20;
|
|
394
|
-
l.inputLength = e.collapseTags ? Math.min(50, t) : t, ke();
|
|
395
|
-
}
|
|
396
|
-
H();
|
|
397
|
-
}), e.remote && ie(e.remoteMethod) ? (l.hoverIndex = -1, e.remoteMethod(n)) : ie(e.filterMethod) ? (e.filterMethod(n), we(o)) : (l.filteredOptionsCount = l.optionsCount, I.value.query = n, we(I), we(o)), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && (await A(), Me());
|
|
398
|
-
}
|
|
399
|
-
}, ke = () => {
|
|
400
|
-
l.currentPlaceholder !== "" && (l.currentPlaceholder = c.value.value ? "" : l.cachedPlaceHolder);
|
|
401
|
-
}, Me = () => {
|
|
402
|
-
const n = V.value.filter((r) => r.visible && !r.disabled && !r.states.groupDisabled), t = n.find((r) => r.created), i = n[0];
|
|
403
|
-
l.hoverIndex = Pe(V.value, t || i);
|
|
404
|
-
}, fe = () => {
|
|
405
|
-
var n;
|
|
406
|
-
if (e.multiple)
|
|
407
|
-
l.selectedLabel = "";
|
|
408
|
-
else {
|
|
409
|
-
const i = $e(e.modelValue);
|
|
410
|
-
(n = i.props) != null && n.created ? (l.createdLabel = i.props.value, l.createdSelected = !0) : l.createdSelected = !1, l.selectedLabel = i.currentLabel, l.selected = i, e.filterable && (l.query = l.selectedLabel);
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
const t = [];
|
|
414
|
-
Array.isArray(e.modelValue) && e.modelValue.forEach((i) => {
|
|
415
|
-
t.push($e(i));
|
|
416
|
-
}), l.selected = t, A(() => {
|
|
417
|
-
H();
|
|
418
|
-
});
|
|
419
|
-
}, $e = (n) => {
|
|
420
|
-
let t;
|
|
421
|
-
const i = ml(n).toLowerCase() === "object", r = ml(n).toLowerCase() === "null", L = ml(n).toLowerCase() === "undefined";
|
|
422
|
-
for (let U = l.cachedOptions.size - 1; U >= 0; U--) {
|
|
423
|
-
const W = Qe.value[U];
|
|
424
|
-
if (i ? N(W.value, e.valueKey) === N(n, e.valueKey) : W.value === n) {
|
|
425
|
-
t = {
|
|
426
|
-
value: n,
|
|
427
|
-
currentLabel: W.currentLabel,
|
|
428
|
-
isDisabled: W.isDisabled
|
|
429
|
-
};
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
if (t)
|
|
434
|
-
return t;
|
|
435
|
-
const D = i ? n.label : !r && !L ? n : "", G = {
|
|
436
|
-
value: n,
|
|
437
|
-
currentLabel: D
|
|
438
|
-
};
|
|
439
|
-
return e.multiple && (G.hitState = !1), G;
|
|
440
|
-
}, Xe = () => {
|
|
441
|
-
setTimeout(() => {
|
|
442
|
-
const n = e.valueKey;
|
|
443
|
-
e.multiple ? l.selected.length > 0 ? l.hoverIndex = Math.min.apply(null, l.selected.map((t) => V.value.findIndex((i) => N(i, n) === N(t, n)))) : l.hoverIndex = -1 : l.hoverIndex = V.value.findIndex((t) => Ce(t) === Ce(l.selected));
|
|
444
|
-
}, 300);
|
|
445
|
-
}, Ye = () => {
|
|
446
|
-
var n, t;
|
|
447
|
-
Ze(), (t = (n = s.value) == null ? void 0 : n.updatePopper) == null || t.call(n), e.multiple && H();
|
|
448
|
-
}, Ze = () => {
|
|
449
|
-
var n;
|
|
450
|
-
l.inputWidth = (n = u.value) == null ? void 0 : n.$el.offsetWidth;
|
|
451
|
-
}, xe = () => {
|
|
452
|
-
e.filterable && l.query !== l.selectedLabel && (l.query = l.selectedLabel, Y(l.query));
|
|
453
|
-
}, _e = El(() => {
|
|
454
|
-
xe();
|
|
455
|
-
}, Le.value), el = El((n) => {
|
|
456
|
-
Y(n.target.value);
|
|
457
|
-
}, Le.value), te = (n) => {
|
|
458
|
-
Ll(e.modelValue, n) || a.emit(Nl, n);
|
|
459
|
-
}, ue = (n) => Tn(n, (t) => !l.disabledOptions.has(t)), ll = (n) => {
|
|
460
|
-
if (n.code !== Vl.delete) {
|
|
461
|
-
if (n.target.value.length <= 0 && !be()) {
|
|
462
|
-
const t = e.modelValue.slice(), i = ue(t);
|
|
463
|
-
if (i < 0)
|
|
464
|
-
return;
|
|
465
|
-
t.splice(i, 1), a.emit(ee, t), te(t);
|
|
466
|
-
}
|
|
467
|
-
n.target.value.length === 1 && e.modelValue.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
|
|
468
|
-
}
|
|
469
|
-
}, Ve = (n, t) => {
|
|
470
|
-
const i = l.selected.indexOf(t);
|
|
471
|
-
if (i > -1 && !X.value) {
|
|
472
|
-
const r = e.modelValue.slice();
|
|
473
|
-
r.splice(i, 1), a.emit(ee, r), te(r), a.emit("remove-tag", t.value);
|
|
474
|
-
}
|
|
475
|
-
n.stopPropagation(), q();
|
|
476
|
-
}, ve = (n) => {
|
|
477
|
-
n.stopPropagation();
|
|
478
|
-
const t = e.multiple ? [] : "";
|
|
479
|
-
if (!Wl(t))
|
|
480
|
-
for (const i of l.selected)
|
|
481
|
-
i.isDisabled && t.push(i.value);
|
|
482
|
-
a.emit(ee, t), te(t), l.hoverIndex = -1, l.visible = !1, a.emit("clear"), q();
|
|
483
|
-
}, De = (n) => {
|
|
484
|
-
var t;
|
|
485
|
-
if (e.multiple) {
|
|
486
|
-
const i = (e.modelValue || []).slice(), r = Pe(i, n.value);
|
|
487
|
-
r > -1 ? i.splice(r, 1) : (e.multipleLimit <= 0 || i.length < e.multipleLimit) && i.push(n.value), a.emit(ee, i), te(i), n.created && (l.query = "", Y(""), l.inputLength = 20), e.filterable && ((t = c.value) == null || t.focus());
|
|
488
|
-
} else
|
|
489
|
-
a.emit(ee, n.value), te(n.value), l.visible = !1;
|
|
490
|
-
me(), !l.visible && A(() => {
|
|
491
|
-
de(n);
|
|
492
|
-
});
|
|
493
|
-
}, Pe = (n = [], t) => {
|
|
494
|
-
if (!$l(t))
|
|
495
|
-
return n.indexOf(t);
|
|
496
|
-
const i = e.valueKey;
|
|
497
|
-
let r = -1;
|
|
498
|
-
return n.some((L, D) => We(N(L, i)) === N(t, i) ? (r = D, !0) : !1), r;
|
|
499
|
-
}, me = () => {
|
|
500
|
-
const n = c.value || u.value;
|
|
501
|
-
n && (n == null || n.focus());
|
|
502
|
-
}, de = (n) => {
|
|
503
|
-
var t, i, r, L, D;
|
|
504
|
-
const G = Array.isArray(n) ? n[0] : n;
|
|
505
|
-
let U = null;
|
|
506
|
-
if (G != null && G.value) {
|
|
507
|
-
const W = V.value.filter((k) => k.value === G.value);
|
|
508
|
-
W.length > 0 && (U = W[0].$el);
|
|
509
|
-
}
|
|
510
|
-
if (s.value && U) {
|
|
511
|
-
const W = (L = (r = (i = (t = s.value) == null ? void 0 : t.popperRef) == null ? void 0 : i.contentRef) == null ? void 0 : r.querySelector) == null ? void 0 : L.call(r, `.${d.be("dropdown", "wrap")}`);
|
|
512
|
-
W && hn(W, U);
|
|
513
|
-
}
|
|
514
|
-
(D = $.value) == null || D.handleScroll();
|
|
515
|
-
}, nl = (n) => {
|
|
516
|
-
l.optionsCount++, l.filteredOptionsCount++, l.options.set(n.value, n), l.cachedOptions.set(n.value, n), n.disabled && l.disabledOptions.set(n.value, n);
|
|
517
|
-
}, tl = (n, t) => {
|
|
518
|
-
l.options.get(n) === t && (l.optionsCount--, l.filteredOptionsCount--, l.options.delete(n));
|
|
519
|
-
}, ol = (n) => {
|
|
520
|
-
n.code !== Vl.backspace && be(!1), l.inputLength = c.value.value.length * 15 + 20, H();
|
|
521
|
-
}, be = (n) => {
|
|
522
|
-
if (!Array.isArray(l.selected))
|
|
523
|
-
return;
|
|
524
|
-
const t = ue(l.selected.map((r) => r.value)), i = l.selected[t];
|
|
525
|
-
if (i)
|
|
526
|
-
return n === !0 || n === !1 ? (i.hitState = n, n) : (i.hitState = !i.hitState, i.hitState);
|
|
527
|
-
}, il = (n) => {
|
|
528
|
-
const t = n.target.value;
|
|
529
|
-
if (n.type === "compositionend")
|
|
530
|
-
l.isOnComposition = !1, A(() => Y(t));
|
|
531
|
-
else {
|
|
532
|
-
const i = t[t.length - 1] || "";
|
|
533
|
-
l.isOnComposition = !nn(i);
|
|
534
|
-
}
|
|
535
|
-
}, al = () => {
|
|
536
|
-
A(() => de(l.selected));
|
|
537
|
-
}, sl = (n) => {
|
|
538
|
-
l.focused || ((e.automaticDropdown || e.filterable) && (e.filterable && !l.visible && (l.menuVisibleOnFocus = !0), l.visible = !0), l.focused = !0, a.emit("focus", n));
|
|
539
|
-
}, q = () => {
|
|
540
|
-
var n, t;
|
|
541
|
-
l.visible ? (n = c.value || u.value) == null || n.focus() : (t = u.value) == null || t.focus();
|
|
542
|
-
}, he = () => {
|
|
543
|
-
var n, t, i;
|
|
544
|
-
l.visible = !1, (n = u.value) == null || n.blur(), (i = (t = f.value) == null ? void 0 : t.blur) == null || i.call(t);
|
|
545
|
-
}, ze = (n) => {
|
|
546
|
-
var t, i, r;
|
|
547
|
-
(t = s.value) != null && t.isFocusInsideContent(n) || (i = S.value) != null && i.isFocusInsideContent(n) || (r = m.value) != null && r.contains(n.relatedTarget) || (l.visible && Ke(), l.focused = !1, a.emit("blur", n));
|
|
548
|
-
}, ge = (n) => {
|
|
549
|
-
ve(n);
|
|
550
|
-
}, Ke = () => {
|
|
551
|
-
l.visible = !1;
|
|
552
|
-
}, rl = (n) => {
|
|
553
|
-
l.visible && (n.preventDefault(), n.stopPropagation(), l.visible = !1);
|
|
554
|
-
}, ye = (n) => {
|
|
555
|
-
n && !l.mouseEnter || X.value || (l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : (!s.value || !s.value.isFocusInsideContent()) && (l.visible = !l.visible), q());
|
|
556
|
-
}, Ae = () => {
|
|
557
|
-
l.visible ? V.value[l.hoverIndex] && De(V.value[l.hoverIndex]) : ye();
|
|
558
|
-
}, Ce = (n) => $l(n.value) ? N(n.value, e.valueKey) : n.value, Se = p(() => V.value.filter((n) => n.visible).every((n) => n.disabled)), ul = p(() => e.multiple ? l.selected.slice(0, e.maxCollapseTags) : []), dl = p(() => e.multiple ? l.selected.slice(e.maxCollapseTags) : []), Oe = (n) => {
|
|
559
|
-
if (!l.visible) {
|
|
560
|
-
l.visible = !0;
|
|
561
|
-
return;
|
|
562
|
-
}
|
|
563
|
-
if (!(l.options.size === 0 || l.filteredOptionsCount === 0) && !l.isOnComposition && !Se.value) {
|
|
564
|
-
n === "next" ? (l.hoverIndex++, l.hoverIndex === l.options.size && (l.hoverIndex = 0)) : n === "prev" && (l.hoverIndex--, l.hoverIndex < 0 && (l.hoverIndex = l.options.size - 1));
|
|
565
|
-
const t = V.value[l.hoverIndex];
|
|
566
|
-
(t.disabled === !0 || t.states.groupDisabled === !0 || !t.visible) && Oe(n), A(() => de(T.value));
|
|
567
|
-
}
|
|
568
|
-
}, cl = () => {
|
|
569
|
-
l.mouseEnter = !0;
|
|
570
|
-
}, pl = () => {
|
|
571
|
-
l.mouseEnter = !1;
|
|
572
|
-
}, ce = (n, t) => {
|
|
573
|
-
var i, r;
|
|
574
|
-
Ve(n, t), (r = (i = S.value) == null ? void 0 : i.updatePopper) == null || r.call(i);
|
|
575
|
-
}, fl = p(() => ({
|
|
576
|
-
maxWidth: `${b(l.inputWidth) - 32 - (je.value ? 22 : 0)}px`,
|
|
577
|
-
width: "100%"
|
|
578
|
-
}));
|
|
579
|
-
return {
|
|
580
|
-
optionList: y,
|
|
581
|
-
optionsArray: V,
|
|
582
|
-
selectSize: ne,
|
|
583
|
-
handleResize: Ye,
|
|
584
|
-
debouncedOnInputChange: _e,
|
|
585
|
-
debouncedQueryChange: el,
|
|
586
|
-
deletePrevTag: ll,
|
|
587
|
-
deleteTag: Ve,
|
|
588
|
-
deleteSelected: ve,
|
|
589
|
-
handleOptionSelect: De,
|
|
590
|
-
scrollToOption: de,
|
|
591
|
-
readonly: Ee,
|
|
592
|
-
resetInputHeight: H,
|
|
593
|
-
showClose: Re,
|
|
594
|
-
iconComponent: re,
|
|
595
|
-
iconReverse: He,
|
|
596
|
-
showNewOption: Ge,
|
|
597
|
-
collapseTagSize: Ue,
|
|
598
|
-
setSelected: fe,
|
|
599
|
-
managePlaceholder: ke,
|
|
600
|
-
selectDisabled: X,
|
|
601
|
-
emptyText: pe,
|
|
602
|
-
toggleLastOptionHitState: be,
|
|
603
|
-
resetInputState: ol,
|
|
604
|
-
handleComposition: il,
|
|
605
|
-
onOptionCreate: nl,
|
|
606
|
-
onOptionDestroy: tl,
|
|
607
|
-
handleMenuEnter: al,
|
|
608
|
-
handleFocus: sl,
|
|
609
|
-
focus: q,
|
|
610
|
-
blur: he,
|
|
611
|
-
handleBlur: ze,
|
|
612
|
-
handleClearClick: ge,
|
|
613
|
-
handleClose: Ke,
|
|
614
|
-
handleKeydownEscape: rl,
|
|
615
|
-
toggleMenu: ye,
|
|
616
|
-
selectOption: Ae,
|
|
617
|
-
getValueKey: Ce,
|
|
618
|
-
navigateOptions: Oe,
|
|
619
|
-
handleDeleteTooltipTag: ce,
|
|
620
|
-
dropMenuVisible: Je,
|
|
621
|
-
queryChange: I,
|
|
622
|
-
groupQueryChange: o,
|
|
623
|
-
showTagList: ul,
|
|
624
|
-
collapseTagList: dl,
|
|
625
|
-
selectTagsStyle: fl,
|
|
626
|
-
reference: u,
|
|
627
|
-
input: c,
|
|
628
|
-
iOSInput: f,
|
|
629
|
-
tooltipRef: s,
|
|
630
|
-
tagTooltipRef: S,
|
|
631
|
-
tags: C,
|
|
632
|
-
selectWrapper: m,
|
|
633
|
-
scrollbar: $,
|
|
634
|
-
handleMouseEnter: cl,
|
|
635
|
-
handleMouseLeave: pl
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
var Nn = se({
|
|
639
|
-
name: "ElOptions",
|
|
640
|
-
emits: ["update-options"],
|
|
641
|
-
setup(e, { slots: l, emit: a }) {
|
|
642
|
-
let v = [];
|
|
643
|
-
function d(u, c) {
|
|
644
|
-
if (u.length !== c.length)
|
|
645
|
-
return !1;
|
|
646
|
-
for (const [f] of u.entries())
|
|
647
|
-
if (u[f] != c[f])
|
|
648
|
-
return !1;
|
|
649
|
-
return !0;
|
|
650
|
-
}
|
|
651
|
-
return () => {
|
|
652
|
-
var u, c;
|
|
653
|
-
const f = (u = l.default) == null ? void 0 : u.call(l), s = [];
|
|
654
|
-
function S(C) {
|
|
655
|
-
Array.isArray(C) && C.forEach((m) => {
|
|
656
|
-
var $, T, I, o;
|
|
657
|
-
const y = ($ = (m == null ? void 0 : m.type) || {}) == null ? void 0 : $.name;
|
|
658
|
-
y === "ElOptionGroup" ? S(!Wl(m.children) && !Array.isArray(m.children) && ie((T = m.children) == null ? void 0 : T.default) ? (I = m.children) == null ? void 0 : I.default() : m.children) : y === "ElOption" ? s.push((o = m.props) == null ? void 0 : o.label) : Array.isArray(m.children) && S(m.children);
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
return f.length && S((c = f[0]) == null ? void 0 : c.children), d(s, v) || (v = s, a("update-options", s)), f;
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
const Pl = "ElSelect", Rn = se({
|
|
666
|
-
name: Pl,
|
|
667
|
-
componentName: Pl,
|
|
668
|
-
components: {
|
|
669
|
-
ElInput: tn,
|
|
670
|
-
ElSelectMenu: qn,
|
|
671
|
-
ElOption: wl,
|
|
672
|
-
ElOptions: Nn,
|
|
673
|
-
ElTag: Dn,
|
|
674
|
-
ElScrollbar: Zl,
|
|
675
|
-
ElTooltip: xl,
|
|
676
|
-
ElIcon: hl
|
|
677
|
-
},
|
|
678
|
-
directives: { ClickOutside: _l },
|
|
679
|
-
props: {
|
|
680
|
-
name: String,
|
|
681
|
-
id: String,
|
|
682
|
-
modelValue: {
|
|
683
|
-
type: [Array, String, Number, Boolean, Object],
|
|
684
|
-
default: void 0
|
|
685
|
-
},
|
|
686
|
-
autocomplete: {
|
|
687
|
-
type: String,
|
|
688
|
-
default: "off"
|
|
689
|
-
},
|
|
690
|
-
automaticDropdown: Boolean,
|
|
691
|
-
size: {
|
|
692
|
-
type: String,
|
|
693
|
-
validator: Ln
|
|
694
|
-
},
|
|
695
|
-
effect: {
|
|
696
|
-
type: String,
|
|
697
|
-
default: "light"
|
|
698
|
-
},
|
|
699
|
-
disabled: Boolean,
|
|
700
|
-
clearable: Boolean,
|
|
701
|
-
filterable: Boolean,
|
|
702
|
-
allowCreate: Boolean,
|
|
703
|
-
loading: Boolean,
|
|
704
|
-
popperClass: {
|
|
705
|
-
type: String,
|
|
706
|
-
default: ""
|
|
707
|
-
},
|
|
708
|
-
popperOptions: {
|
|
709
|
-
type: Object,
|
|
710
|
-
default: () => ({})
|
|
711
|
-
},
|
|
712
|
-
remote: Boolean,
|
|
713
|
-
loadingText: String,
|
|
714
|
-
noMatchText: String,
|
|
715
|
-
noDataText: String,
|
|
716
|
-
remoteMethod: Function,
|
|
717
|
-
filterMethod: Function,
|
|
718
|
-
multiple: Boolean,
|
|
719
|
-
multipleLimit: {
|
|
720
|
-
type: Number,
|
|
721
|
-
default: 0
|
|
722
|
-
},
|
|
723
|
-
placeholder: {
|
|
724
|
-
type: String
|
|
725
|
-
},
|
|
726
|
-
defaultFirstOption: Boolean,
|
|
727
|
-
reserveKeyword: {
|
|
728
|
-
type: Boolean,
|
|
729
|
-
default: !0
|
|
730
|
-
},
|
|
731
|
-
valueKey: {
|
|
732
|
-
type: String,
|
|
733
|
-
default: "value"
|
|
734
|
-
},
|
|
735
|
-
collapseTags: Boolean,
|
|
736
|
-
collapseTagsTooltip: Boolean,
|
|
737
|
-
maxCollapseTags: {
|
|
738
|
-
type: Number,
|
|
739
|
-
default: 1
|
|
740
|
-
},
|
|
741
|
-
teleported: en.teleported,
|
|
742
|
-
persistent: {
|
|
743
|
-
type: Boolean,
|
|
744
|
-
default: !0
|
|
745
|
-
},
|
|
746
|
-
clearIcon: {
|
|
747
|
-
type: Ml,
|
|
748
|
-
default: un
|
|
749
|
-
},
|
|
750
|
-
fitInputWidth: Boolean,
|
|
751
|
-
suffixIcon: {
|
|
752
|
-
type: Ml,
|
|
753
|
-
default: dn
|
|
754
|
-
},
|
|
755
|
-
tagType: { ...Rl.type, default: "info" },
|
|
756
|
-
validateEvent: {
|
|
757
|
-
type: Boolean,
|
|
758
|
-
default: !0
|
|
759
|
-
},
|
|
760
|
-
remoteShowSuffix: Boolean,
|
|
761
|
-
suffixTransition: {
|
|
762
|
-
type: Boolean,
|
|
763
|
-
default: !0
|
|
764
|
-
},
|
|
765
|
-
placement: {
|
|
766
|
-
type: String,
|
|
767
|
-
values: ln,
|
|
768
|
-
default: "bottom-start"
|
|
769
|
-
},
|
|
770
|
-
ariaLabel: {
|
|
771
|
-
type: String,
|
|
772
|
-
default: void 0
|
|
773
|
-
}
|
|
774
|
-
},
|
|
775
|
-
emits: [
|
|
776
|
-
ee,
|
|
777
|
-
Nl,
|
|
778
|
-
"remove-tag",
|
|
779
|
-
"clear",
|
|
780
|
-
"visible-change",
|
|
781
|
-
"focus",
|
|
782
|
-
"blur"
|
|
783
|
-
],
|
|
784
|
-
setup(e, l) {
|
|
785
|
-
const a = ae("select"), v = ae("input"), { t: d } = Ol(), u = Wn(e), {
|
|
786
|
-
optionList: c,
|
|
787
|
-
optionsArray: f,
|
|
788
|
-
selectSize: s,
|
|
789
|
-
readonly: S,
|
|
790
|
-
handleResize: C,
|
|
791
|
-
collapseTagSize: m,
|
|
792
|
-
debouncedOnInputChange: $,
|
|
793
|
-
debouncedQueryChange: T,
|
|
794
|
-
deletePrevTag: I,
|
|
795
|
-
deleteTag: o,
|
|
796
|
-
deleteSelected: y,
|
|
797
|
-
handleOptionSelect: O,
|
|
798
|
-
scrollToOption: E,
|
|
799
|
-
setSelected: Q,
|
|
800
|
-
resetInputHeight: Ee,
|
|
801
|
-
managePlaceholder: X,
|
|
802
|
-
showClose: Re,
|
|
803
|
-
selectDisabled: re,
|
|
804
|
-
iconComponent: He,
|
|
805
|
-
iconReverse: je,
|
|
806
|
-
showNewOption: Le,
|
|
807
|
-
emptyText: pe,
|
|
808
|
-
toggleLastOptionHitState: V,
|
|
809
|
-
resetInputState: Qe,
|
|
810
|
-
handleComposition: Ge,
|
|
811
|
-
onOptionCreate: ne,
|
|
812
|
-
onOptionDestroy: Ue,
|
|
813
|
-
handleMenuEnter: Je,
|
|
814
|
-
handleFocus: H,
|
|
815
|
-
focus: Y,
|
|
816
|
-
blur: ke,
|
|
817
|
-
handleBlur: Me,
|
|
818
|
-
handleClearClick: fe,
|
|
819
|
-
handleClose: $e,
|
|
820
|
-
handleKeydownEscape: Xe,
|
|
821
|
-
toggleMenu: Ye,
|
|
822
|
-
selectOption: Ze,
|
|
823
|
-
getValueKey: xe,
|
|
824
|
-
navigateOptions: _e,
|
|
825
|
-
handleDeleteTooltipTag: el,
|
|
826
|
-
dropMenuVisible: te,
|
|
827
|
-
reference: ue,
|
|
828
|
-
input: ll,
|
|
829
|
-
iOSInput: Ve,
|
|
830
|
-
tooltipRef: ve,
|
|
831
|
-
tagTooltipRef: De,
|
|
832
|
-
tags: Pe,
|
|
833
|
-
selectWrapper: me,
|
|
834
|
-
scrollbar: de,
|
|
835
|
-
queryChange: nl,
|
|
836
|
-
groupQueryChange: tl,
|
|
837
|
-
handleMouseEnter: ol,
|
|
838
|
-
handleMouseLeave: be,
|
|
839
|
-
showTagList: il,
|
|
840
|
-
collapseTagList: al,
|
|
841
|
-
selectTagsStyle: sl
|
|
842
|
-
} = Fn(e, u, l), {
|
|
843
|
-
inputWidth: q,
|
|
844
|
-
selected: he,
|
|
845
|
-
inputLength: ze,
|
|
846
|
-
filteredOptionsCount: ge,
|
|
847
|
-
visible: Ke,
|
|
848
|
-
selectedLabel: rl,
|
|
849
|
-
hoverIndex: ye,
|
|
850
|
-
query: Ae,
|
|
851
|
-
inputHovering: Ce,
|
|
852
|
-
currentPlaceholder: Se,
|
|
853
|
-
menuVisibleOnFocus: ul,
|
|
854
|
-
isOnComposition: dl,
|
|
855
|
-
options: Oe,
|
|
856
|
-
cachedOptions: cl,
|
|
857
|
-
optionsCount: pl,
|
|
858
|
-
prefixWidth: ce
|
|
859
|
-
} = yl(u), fl = p(() => {
|
|
860
|
-
const k = [a.b()], oe = b(s);
|
|
861
|
-
return oe && k.push(a.m(oe)), e.disabled && k.push(a.m("disabled")), k;
|
|
862
|
-
}), n = p(() => [
|
|
863
|
-
a.e("tags"),
|
|
864
|
-
a.is("disabled", b(re))
|
|
865
|
-
]), t = p(() => [
|
|
866
|
-
a.b("tags-wrapper"),
|
|
867
|
-
{ "has-prefix": b(ce) && b(he).length }
|
|
868
|
-
]), i = p(() => [
|
|
869
|
-
a.e("input"),
|
|
870
|
-
a.is(b(s)),
|
|
871
|
-
a.is("disabled", b(re))
|
|
872
|
-
]), r = p(() => [
|
|
873
|
-
a.e("input"),
|
|
874
|
-
a.is(b(s)),
|
|
875
|
-
a.em("input", "iOS")
|
|
876
|
-
]), L = p(() => [
|
|
877
|
-
a.is("empty", !e.allowCreate && !!b(Ae) && b(ge) === 0)
|
|
878
|
-
]), D = p(() => ({ maxWidth: `${b(q) > 123 ? b(q) - 123 : b(q) - 75}px` })), G = p(() => ({
|
|
879
|
-
marginLeft: `${b(ce)}px`,
|
|
880
|
-
flexGrow: 1,
|
|
881
|
-
width: `${b(ze) / (b(q) - 32)}%`,
|
|
882
|
-
maxWidth: `${b(q) - 42}px`
|
|
883
|
-
}));
|
|
884
|
-
zl(Ne, Fe({
|
|
885
|
-
props: e,
|
|
886
|
-
options: Oe,
|
|
887
|
-
optionsArray: f,
|
|
888
|
-
cachedOptions: cl,
|
|
889
|
-
optionsCount: pl,
|
|
890
|
-
filteredOptionsCount: ge,
|
|
891
|
-
hoverIndex: ye,
|
|
892
|
-
handleOptionSelect: O,
|
|
893
|
-
onOptionCreate: ne,
|
|
894
|
-
onOptionDestroy: Ue,
|
|
895
|
-
selectWrapper: me,
|
|
896
|
-
selected: he,
|
|
897
|
-
setSelected: Q,
|
|
898
|
-
queryChange: nl,
|
|
899
|
-
groupQueryChange: tl
|
|
900
|
-
})), Sl(() => {
|
|
901
|
-
u.cachedPlaceHolder = Se.value = e.placeholder || (() => d("el.select.placeholder")), e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (Se.value = ""), Kl(me, C), e.remote && e.multiple && Ee(), A(() => {
|
|
902
|
-
const k = ue.value && ue.value.$el;
|
|
903
|
-
if (k && (q.value = k.getBoundingClientRect().width, l.slots.prefix)) {
|
|
904
|
-
const oe = k.querySelector(`.${v.e("prefix")}`);
|
|
905
|
-
ce.value = Math.max(oe.getBoundingClientRect().width + 11, 30);
|
|
906
|
-
}
|
|
907
|
-
}), Q();
|
|
908
|
-
}), e.multiple && !Array.isArray(e.modelValue) && l.emit(ee, []), !e.multiple && Array.isArray(e.modelValue) && l.emit(ee, "");
|
|
909
|
-
const U = p(() => {
|
|
910
|
-
var k, oe;
|
|
911
|
-
return (oe = (k = ve.value) == null ? void 0 : k.popperRef) == null ? void 0 : oe.contentRef;
|
|
912
|
-
});
|
|
913
|
-
return {
|
|
914
|
-
isIOS: bn,
|
|
915
|
-
onOptionsRendered: (k) => {
|
|
916
|
-
c.value = k;
|
|
917
|
-
},
|
|
918
|
-
prefixWidth: ce,
|
|
919
|
-
selectSize: s,
|
|
920
|
-
readonly: S,
|
|
921
|
-
handleResize: C,
|
|
922
|
-
collapseTagSize: m,
|
|
923
|
-
debouncedOnInputChange: $,
|
|
924
|
-
debouncedQueryChange: T,
|
|
925
|
-
deletePrevTag: I,
|
|
926
|
-
deleteTag: o,
|
|
927
|
-
handleDeleteTooltipTag: el,
|
|
928
|
-
deleteSelected: y,
|
|
929
|
-
handleOptionSelect: O,
|
|
930
|
-
scrollToOption: E,
|
|
931
|
-
inputWidth: q,
|
|
932
|
-
selected: he,
|
|
933
|
-
inputLength: ze,
|
|
934
|
-
filteredOptionsCount: ge,
|
|
935
|
-
visible: Ke,
|
|
936
|
-
selectedLabel: rl,
|
|
937
|
-
hoverIndex: ye,
|
|
938
|
-
query: Ae,
|
|
939
|
-
inputHovering: Ce,
|
|
940
|
-
currentPlaceholder: Se,
|
|
941
|
-
menuVisibleOnFocus: ul,
|
|
942
|
-
isOnComposition: dl,
|
|
943
|
-
options: Oe,
|
|
944
|
-
resetInputHeight: Ee,
|
|
945
|
-
managePlaceholder: X,
|
|
946
|
-
showClose: Re,
|
|
947
|
-
selectDisabled: re,
|
|
948
|
-
iconComponent: He,
|
|
949
|
-
iconReverse: je,
|
|
950
|
-
showNewOption: Le,
|
|
951
|
-
emptyText: pe,
|
|
952
|
-
toggleLastOptionHitState: V,
|
|
953
|
-
resetInputState: Qe,
|
|
954
|
-
handleComposition: Ge,
|
|
955
|
-
handleMenuEnter: Je,
|
|
956
|
-
handleFocus: H,
|
|
957
|
-
focus: Y,
|
|
958
|
-
blur: ke,
|
|
959
|
-
handleBlur: Me,
|
|
960
|
-
handleClearClick: fe,
|
|
961
|
-
handleClose: $e,
|
|
962
|
-
handleKeydownEscape: Xe,
|
|
963
|
-
toggleMenu: Ye,
|
|
964
|
-
selectOption: Ze,
|
|
965
|
-
getValueKey: xe,
|
|
966
|
-
navigateOptions: _e,
|
|
967
|
-
dropMenuVisible: te,
|
|
968
|
-
reference: ue,
|
|
969
|
-
input: ll,
|
|
970
|
-
iOSInput: Ve,
|
|
971
|
-
tooltipRef: ve,
|
|
972
|
-
popperPaneRef: U,
|
|
973
|
-
tags: Pe,
|
|
974
|
-
selectWrapper: me,
|
|
975
|
-
scrollbar: de,
|
|
976
|
-
wrapperKls: fl,
|
|
977
|
-
tagsKls: n,
|
|
978
|
-
tagWrapperKls: t,
|
|
979
|
-
inputKls: i,
|
|
980
|
-
iOSInputKls: r,
|
|
981
|
-
scrollbarKls: L,
|
|
982
|
-
selectTagsStyle: sl,
|
|
983
|
-
nsSelect: a,
|
|
984
|
-
tagTextStyle: D,
|
|
985
|
-
inputStyle: G,
|
|
986
|
-
handleMouseEnter: ol,
|
|
987
|
-
handleMouseLeave: be,
|
|
988
|
-
showTagList: il,
|
|
989
|
-
collapseTagList: al,
|
|
990
|
-
tagTooltipRef: De
|
|
991
|
-
};
|
|
992
|
-
}
|
|
993
|
-
}), Hn = ["disabled", "autocomplete", "aria-label"], jn = ["disabled"], Qn = { style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" } };
|
|
994
|
-
function Gn(e, l, a, v, d, u) {
|
|
995
|
-
const c = Z("el-tag"), f = Z("el-tooltip"), s = Z("el-icon"), S = Z("el-input"), C = Z("el-option"), m = Z("el-options"), $ = Z("el-scrollbar"), T = Z("el-select-menu"), I = Gl("click-outside");
|
|
996
|
-
return Te((h(), P("div", {
|
|
997
|
-
ref: "selectWrapper",
|
|
998
|
-
class: g(e.wrapperKls),
|
|
999
|
-
onMouseenter: l[22] || (l[22] = (...o) => e.handleMouseEnter && e.handleMouseEnter(...o)),
|
|
1000
|
-
onMouseleave: l[23] || (l[23] = (...o) => e.handleMouseLeave && e.handleMouseLeave(...o)),
|
|
1001
|
-
onClick: l[24] || (l[24] = j((...o) => e.toggleMenu && e.toggleMenu(...o), ["stop"]))
|
|
1002
|
-
}, [
|
|
1003
|
-
x(f, {
|
|
1004
|
-
ref: "tooltipRef",
|
|
1005
|
-
visible: e.dropMenuVisible,
|
|
1006
|
-
placement: e.placement,
|
|
1007
|
-
teleported: e.teleported,
|
|
1008
|
-
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
1009
|
-
"popper-options": e.popperOptions,
|
|
1010
|
-
"fallback-placements": ["bottom-start", "top-start", "right", "left"],
|
|
1011
|
-
effect: e.effect,
|
|
1012
|
-
pure: "",
|
|
1013
|
-
trigger: "click",
|
|
1014
|
-
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
1015
|
-
"stop-popper-mouse-event": !1,
|
|
1016
|
-
"gpu-acceleration": !1,
|
|
1017
|
-
persistent: e.persistent,
|
|
1018
|
-
onShow: e.handleMenuEnter
|
|
1019
|
-
}, {
|
|
1020
|
-
default: w(() => [
|
|
1021
|
-
M("div", {
|
|
1022
|
-
class: "select-trigger",
|
|
1023
|
-
onMouseenter: l[20] || (l[20] = (o) => e.inputHovering = !0),
|
|
1024
|
-
onMouseleave: l[21] || (l[21] = (o) => e.inputHovering = !1)
|
|
1025
|
-
}, [
|
|
1026
|
-
e.multiple ? (h(), P("div", {
|
|
1027
|
-
key: 0,
|
|
1028
|
-
ref: "tags",
|
|
1029
|
-
tabindex: "-1",
|
|
1030
|
-
class: g(e.tagsKls),
|
|
1031
|
-
style: J(e.selectTagsStyle),
|
|
1032
|
-
onClick: l[15] || (l[15] = (...o) => e.focus && e.focus(...o))
|
|
1033
|
-
}, [
|
|
1034
|
-
e.collapseTags && e.selected.length ? (h(), z(bl, {
|
|
1035
|
-
key: 0,
|
|
1036
|
-
onAfterLeave: e.resetInputHeight
|
|
1037
|
-
}, {
|
|
1038
|
-
default: w(() => [
|
|
1039
|
-
M("span", {
|
|
1040
|
-
class: g(e.tagWrapperKls)
|
|
1041
|
-
}, [
|
|
1042
|
-
(h(!0), P(Be, null, vl(e.showTagList, (o) => (h(), z(c, {
|
|
1043
|
-
key: e.getValueKey(o),
|
|
1044
|
-
closable: !e.selectDisabled && !o.isDisabled,
|
|
1045
|
-
size: e.collapseTagSize,
|
|
1046
|
-
hit: o.hitState,
|
|
1047
|
-
type: e.tagType,
|
|
1048
|
-
"disable-transitions": "",
|
|
1049
|
-
onClose: (y) => e.deleteTag(y, o)
|
|
1050
|
-
}, {
|
|
1051
|
-
default: w(() => [
|
|
1052
|
-
M("span", {
|
|
1053
|
-
class: g(e.nsSelect.e("tags-text")),
|
|
1054
|
-
style: J(e.tagTextStyle)
|
|
1055
|
-
}, _(o.currentLabel), 7)
|
|
1056
|
-
]),
|
|
1057
|
-
_: 2
|
|
1058
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128)),
|
|
1059
|
-
e.selected.length > e.maxCollapseTags ? (h(), z(c, {
|
|
1060
|
-
key: 0,
|
|
1061
|
-
closable: !1,
|
|
1062
|
-
size: e.collapseTagSize,
|
|
1063
|
-
type: e.tagType,
|
|
1064
|
-
"disable-transitions": ""
|
|
1065
|
-
}, {
|
|
1066
|
-
default: w(() => [
|
|
1067
|
-
e.collapseTagsTooltip ? (h(), z(f, {
|
|
1068
|
-
key: 0,
|
|
1069
|
-
ref: "tagTooltipRef",
|
|
1070
|
-
disabled: e.dropMenuVisible,
|
|
1071
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
1072
|
-
effect: e.effect,
|
|
1073
|
-
placement: "bottom",
|
|
1074
|
-
teleported: e.teleported
|
|
1075
|
-
}, {
|
|
1076
|
-
default: w(() => [
|
|
1077
|
-
M("span", {
|
|
1078
|
-
class: g(e.nsSelect.e("tags-text"))
|
|
1079
|
-
}, "+ " + _(e.selected.length - e.maxCollapseTags), 3)
|
|
1080
|
-
]),
|
|
1081
|
-
content: w(() => [
|
|
1082
|
-
M("div", {
|
|
1083
|
-
class: g(e.nsSelect.e("collapse-tags"))
|
|
1084
|
-
}, [
|
|
1085
|
-
(h(!0), P(Be, null, vl(e.collapseTagList, (o) => (h(), P("div", {
|
|
1086
|
-
key: e.getValueKey(o),
|
|
1087
|
-
class: g(e.nsSelect.e("collapse-tag"))
|
|
1088
|
-
}, [
|
|
1089
|
-
x(c, {
|
|
1090
|
-
class: "in-tooltip",
|
|
1091
|
-
closable: !e.selectDisabled && !o.isDisabled,
|
|
1092
|
-
size: e.collapseTagSize,
|
|
1093
|
-
hit: o.hitState,
|
|
1094
|
-
type: e.tagType,
|
|
1095
|
-
"disable-transitions": "",
|
|
1096
|
-
style: { margin: "2px" },
|
|
1097
|
-
onClose: (y) => e.handleDeleteTooltipTag(y, o)
|
|
1098
|
-
}, {
|
|
1099
|
-
default: w(() => [
|
|
1100
|
-
M("span", {
|
|
1101
|
-
class: g(e.nsSelect.e("tags-text")),
|
|
1102
|
-
style: J({
|
|
1103
|
-
maxWidth: e.inputWidth - 75 + "px"
|
|
1104
|
-
})
|
|
1105
|
-
}, _(o.currentLabel), 7)
|
|
1106
|
-
]),
|
|
1107
|
-
_: 2
|
|
1108
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"])
|
|
1109
|
-
], 2))), 128))
|
|
1110
|
-
], 2)
|
|
1111
|
-
]),
|
|
1112
|
-
_: 1
|
|
1113
|
-
}, 8, ["disabled", "effect", "teleported"])) : (h(), P("span", {
|
|
1114
|
-
key: 1,
|
|
1115
|
-
class: g(e.nsSelect.e("tags-text"))
|
|
1116
|
-
}, "+ " + _(e.selected.length - e.maxCollapseTags), 3))
|
|
1117
|
-
]),
|
|
1118
|
-
_: 1
|
|
1119
|
-
}, 8, ["size", "type"])) : K("v-if", !0)
|
|
1120
|
-
], 2)
|
|
1121
|
-
]),
|
|
1122
|
-
_: 1
|
|
1123
|
-
}, 8, ["onAfterLeave"])) : K("v-if", !0),
|
|
1124
|
-
e.collapseTags ? K("v-if", !0) : (h(), z(bl, {
|
|
1125
|
-
key: 1,
|
|
1126
|
-
onAfterLeave: e.resetInputHeight
|
|
1127
|
-
}, {
|
|
1128
|
-
default: w(() => [
|
|
1129
|
-
M("span", {
|
|
1130
|
-
class: g(e.tagWrapperKls),
|
|
1131
|
-
style: J(e.prefixWidth && e.selected.length ? { marginLeft: `${e.prefixWidth}px` } : "")
|
|
1132
|
-
}, [
|
|
1133
|
-
(h(!0), P(Be, null, vl(e.selected, (o) => (h(), z(c, {
|
|
1134
|
-
key: e.getValueKey(o),
|
|
1135
|
-
closable: !e.selectDisabled && !o.isDisabled,
|
|
1136
|
-
size: e.collapseTagSize,
|
|
1137
|
-
hit: o.hitState,
|
|
1138
|
-
type: e.tagType,
|
|
1139
|
-
"disable-transitions": "",
|
|
1140
|
-
onClose: (y) => e.deleteTag(y, o)
|
|
1141
|
-
}, {
|
|
1142
|
-
default: w(() => [
|
|
1143
|
-
M("span", {
|
|
1144
|
-
class: g(e.nsSelect.e("tags-text")),
|
|
1145
|
-
style: J({ maxWidth: e.inputWidth - 75 + "px" })
|
|
1146
|
-
}, _(o.currentLabel), 7)
|
|
1147
|
-
]),
|
|
1148
|
-
_: 2
|
|
1149
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128))
|
|
1150
|
-
], 6)
|
|
1151
|
-
]),
|
|
1152
|
-
_: 1
|
|
1153
|
-
}, 8, ["onAfterLeave"])),
|
|
1154
|
-
e.filterable && !e.selectDisabled ? Te((h(), P("input", {
|
|
1155
|
-
key: 2,
|
|
1156
|
-
ref: "input",
|
|
1157
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) => e.query = o),
|
|
1158
|
-
type: "text",
|
|
1159
|
-
class: g(e.inputKls),
|
|
1160
|
-
disabled: e.selectDisabled,
|
|
1161
|
-
autocomplete: e.autocomplete,
|
|
1162
|
-
style: J(e.inputStyle),
|
|
1163
|
-
"aria-label": e.ariaLabel,
|
|
1164
|
-
onFocus: l[1] || (l[1] = (...o) => e.handleFocus && e.handleFocus(...o)),
|
|
1165
|
-
onBlur: l[2] || (l[2] = (...o) => e.handleBlur && e.handleBlur(...o)),
|
|
1166
|
-
onKeyup: l[3] || (l[3] = (...o) => e.managePlaceholder && e.managePlaceholder(...o)),
|
|
1167
|
-
onKeydown: [
|
|
1168
|
-
l[4] || (l[4] = (...o) => e.resetInputState && e.resetInputState(...o)),
|
|
1169
|
-
l[5] || (l[5] = F(j((o) => e.navigateOptions("next"), ["prevent"]), ["down"])),
|
|
1170
|
-
l[6] || (l[6] = F(j((o) => e.navigateOptions("prev"), ["prevent"]), ["up"])),
|
|
1171
|
-
l[7] || (l[7] = F((...o) => e.handleKeydownEscape && e.handleKeydownEscape(...o), ["esc"])),
|
|
1172
|
-
l[8] || (l[8] = F(j((...o) => e.selectOption && e.selectOption(...o), ["stop", "prevent"]), ["enter"])),
|
|
1173
|
-
l[9] || (l[9] = F((...o) => e.deletePrevTag && e.deletePrevTag(...o), ["delete"])),
|
|
1174
|
-
l[10] || (l[10] = F((o) => e.visible = !1, ["tab"]))
|
|
1175
|
-
],
|
|
1176
|
-
onCompositionstart: l[11] || (l[11] = (...o) => e.handleComposition && e.handleComposition(...o)),
|
|
1177
|
-
onCompositionupdate: l[12] || (l[12] = (...o) => e.handleComposition && e.handleComposition(...o)),
|
|
1178
|
-
onCompositionend: l[13] || (l[13] = (...o) => e.handleComposition && e.handleComposition(...o)),
|
|
1179
|
-
onInput: l[14] || (l[14] = (...o) => e.debouncedQueryChange && e.debouncedQueryChange(...o))
|
|
1180
|
-
}, null, 46, Hn)), [
|
|
1181
|
-
[Ul, e.query]
|
|
1182
|
-
]) : K("v-if", !0)
|
|
1183
|
-
], 6)) : K("v-if", !0),
|
|
1184
|
-
K(" fix: https://github.com/element-plus/element-plus/issues/11415 "),
|
|
1185
|
-
e.isIOS && !e.multiple && e.filterable && e.readonly ? (h(), P("input", {
|
|
1186
|
-
key: 1,
|
|
1187
|
-
ref: "iOSInput",
|
|
1188
|
-
class: g(e.iOSInputKls),
|
|
1189
|
-
disabled: e.selectDisabled,
|
|
1190
|
-
type: "text"
|
|
1191
|
-
}, null, 10, jn)) : K("v-if", !0),
|
|
1192
|
-
x(S, {
|
|
1193
|
-
id: e.id,
|
|
1194
|
-
ref: "reference",
|
|
1195
|
-
modelValue: e.selectedLabel,
|
|
1196
|
-
"onUpdate:modelValue": l[16] || (l[16] = (o) => e.selectedLabel = o),
|
|
1197
|
-
type: "text",
|
|
1198
|
-
placeholder: typeof e.currentPlaceholder == "function" ? e.currentPlaceholder() : e.currentPlaceholder,
|
|
1199
|
-
name: e.name,
|
|
1200
|
-
autocomplete: e.autocomplete,
|
|
1201
|
-
size: e.selectSize,
|
|
1202
|
-
disabled: e.selectDisabled,
|
|
1203
|
-
readonly: e.readonly,
|
|
1204
|
-
"validate-event": !1,
|
|
1205
|
-
class: g([e.nsSelect.is("focus", e.visible)]),
|
|
1206
|
-
tabindex: e.multiple && e.filterable ? -1 : void 0,
|
|
1207
|
-
label: e.ariaLabel,
|
|
1208
|
-
onFocus: e.handleFocus,
|
|
1209
|
-
onBlur: e.handleBlur,
|
|
1210
|
-
onInput: e.debouncedOnInputChange,
|
|
1211
|
-
onPaste: e.debouncedOnInputChange,
|
|
1212
|
-
onCompositionstart: e.handleComposition,
|
|
1213
|
-
onCompositionupdate: e.handleComposition,
|
|
1214
|
-
onCompositionend: e.handleComposition,
|
|
1215
|
-
onKeydown: [
|
|
1216
|
-
l[17] || (l[17] = F(j((o) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
|
|
1217
|
-
l[18] || (l[18] = F(j((o) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
|
|
1218
|
-
F(j(e.selectOption, ["stop", "prevent"]), ["enter"]),
|
|
1219
|
-
F(e.handleKeydownEscape, ["esc"]),
|
|
1220
|
-
l[19] || (l[19] = F((o) => e.visible = !1, ["tab"]))
|
|
1221
|
-
]
|
|
1222
|
-
}, Jl({
|
|
1223
|
-
suffix: w(() => [
|
|
1224
|
-
e.iconComponent && !e.showClose ? (h(), z(s, {
|
|
1225
|
-
key: 0,
|
|
1226
|
-
class: g([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
|
|
1227
|
-
}, {
|
|
1228
|
-
default: w(() => [
|
|
1229
|
-
(h(), z(Il(e.iconComponent)))
|
|
1230
|
-
]),
|
|
1231
|
-
_: 1
|
|
1232
|
-
}, 8, ["class"])) : K("v-if", !0),
|
|
1233
|
-
e.showClose && e.clearIcon ? (h(), z(s, {
|
|
1234
|
-
key: 1,
|
|
1235
|
-
class: g([e.nsSelect.e("caret"), e.nsSelect.e("icon")]),
|
|
1236
|
-
onClick: e.handleClearClick
|
|
1237
|
-
}, {
|
|
1238
|
-
default: w(() => [
|
|
1239
|
-
(h(), z(Il(e.clearIcon)))
|
|
1240
|
-
]),
|
|
1241
|
-
_: 1
|
|
1242
|
-
}, 8, ["class", "onClick"])) : K("v-if", !0)
|
|
1243
|
-
]),
|
|
1244
|
-
_: 2
|
|
1245
|
-
}, [
|
|
1246
|
-
e.$slots.prefix ? {
|
|
1247
|
-
name: "prefix",
|
|
1248
|
-
fn: w(() => [
|
|
1249
|
-
M("div", Qn, [
|
|
1250
|
-
le(e.$slots, "prefix")
|
|
1251
|
-
])
|
|
1252
|
-
])
|
|
1253
|
-
} : void 0
|
|
1254
|
-
]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "label", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"])
|
|
1255
|
-
], 32)
|
|
1256
|
-
]),
|
|
1257
|
-
content: w(() => [
|
|
1258
|
-
x(T, null, {
|
|
1259
|
-
default: w(() => [
|
|
1260
|
-
Te(x($, {
|
|
1261
|
-
ref: "scrollbar",
|
|
1262
|
-
tag: "ul",
|
|
1263
|
-
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
|
|
1264
|
-
"view-class": e.nsSelect.be("dropdown", "list"),
|
|
1265
|
-
class: g(e.scrollbarKls)
|
|
1266
|
-
}, {
|
|
1267
|
-
default: w(() => [
|
|
1268
|
-
e.showNewOption ? (h(), z(C, {
|
|
1269
|
-
key: 0,
|
|
1270
|
-
value: e.query,
|
|
1271
|
-
created: !0
|
|
1272
|
-
}, null, 8, ["value"])) : K("v-if", !0),
|
|
1273
|
-
x(m, { onUpdateOptions: e.onOptionsRendered }, {
|
|
1274
|
-
default: w(() => [
|
|
1275
|
-
le(e.$slots, "default")
|
|
1276
|
-
]),
|
|
1277
|
-
_: 3
|
|
1278
|
-
}, 8, ["onUpdateOptions"])
|
|
1279
|
-
]),
|
|
1280
|
-
_: 3
|
|
1281
|
-
}, 8, ["wrap-class", "view-class", "class"]), [
|
|
1282
|
-
[Cl, e.options.size > 0 && !e.loading]
|
|
1283
|
-
]),
|
|
1284
|
-
e.emptyText && (!e.allowCreate || e.loading || e.allowCreate && e.options.size === 0) ? (h(), P(Be, { key: 0 }, [
|
|
1285
|
-
e.$slots.empty ? le(e.$slots, "empty", { key: 0 }) : (h(), P("p", {
|
|
1286
|
-
key: 1,
|
|
1287
|
-
class: g(e.nsSelect.be("dropdown", "empty"))
|
|
1288
|
-
}, _(e.emptyText), 3))
|
|
1289
|
-
], 64)) : K("v-if", !0)
|
|
1290
|
-
]),
|
|
1291
|
-
_: 3
|
|
1292
|
-
})
|
|
1293
|
-
]),
|
|
1294
|
-
_: 3
|
|
1295
|
-
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "effect", "transition", "persistent", "onShow"])
|
|
1296
|
-
], 34)), [
|
|
1297
|
-
[I, e.handleClose, e.popperPaneRef]
|
|
1298
|
-
]);
|
|
1299
|
-
}
|
|
1300
|
-
var Un = /* @__PURE__ */ Ie(Rn, [["render", Gn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);
|
|
1301
|
-
const Jn = se({
|
|
1302
|
-
name: "ElOptionGroup",
|
|
1303
|
-
componentName: "ElOptionGroup",
|
|
1304
|
-
props: {
|
|
1305
|
-
label: String,
|
|
1306
|
-
disabled: Boolean
|
|
1307
|
-
},
|
|
1308
|
-
setup(e) {
|
|
1309
|
-
const l = ae("select"), a = B(!0), v = gl(), d = B([]);
|
|
1310
|
-
zl(Hl, Fe({
|
|
1311
|
-
...yl(e)
|
|
1312
|
-
}));
|
|
1313
|
-
const u = qe(Ne);
|
|
1314
|
-
Sl(() => {
|
|
1315
|
-
d.value = c(v.subTree);
|
|
1316
|
-
});
|
|
1317
|
-
const c = (s) => {
|
|
1318
|
-
const S = [];
|
|
1319
|
-
return Array.isArray(s.children) && s.children.forEach((C) => {
|
|
1320
|
-
var m;
|
|
1321
|
-
C.type && C.type.name === "ElOption" && C.component && C.component.proxy ? S.push(C.component.proxy) : (m = C.children) != null && m.length && S.push(...c(C));
|
|
1322
|
-
}), S;
|
|
1323
|
-
}, { groupQueryChange: f } = We(u);
|
|
1324
|
-
return R(f, () => {
|
|
1325
|
-
a.value = d.value.some((s) => s.visible === !0);
|
|
1326
|
-
}, { flush: "post" }), {
|
|
1327
|
-
visible: a,
|
|
1328
|
-
ns: l
|
|
1329
|
-
};
|
|
1330
|
-
}
|
|
1331
|
-
});
|
|
1332
|
-
function Xn(e, l, a, v, d, u) {
|
|
1333
|
-
return Te((h(), P("ul", {
|
|
1334
|
-
class: g(e.ns.be("group", "wrap"))
|
|
1335
|
-
}, [
|
|
1336
|
-
M("li", {
|
|
1337
|
-
class: g(e.ns.be("group", "title"))
|
|
1338
|
-
}, _(e.label), 3),
|
|
1339
|
-
M("li", null, [
|
|
1340
|
-
M("ul", {
|
|
1341
|
-
class: g(e.ns.b("group"))
|
|
1342
|
-
}, [
|
|
1343
|
-
le(e.$slots, "default")
|
|
1344
|
-
], 2)
|
|
1345
|
-
])
|
|
1346
|
-
], 2)), [
|
|
1347
|
-
[Cl, e.visible]
|
|
1348
|
-
]);
|
|
1349
|
-
}
|
|
1350
|
-
var jl = /* @__PURE__ */ Ie(Jn, [["render", Xn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);
|
|
1351
|
-
const ot = ql(Un, {
|
|
1352
|
-
Option: wl,
|
|
1353
|
-
OptionGroup: jl
|
|
1354
|
-
}), it = Fl(wl);
|
|
1355
|
-
Fl(jl);
|
|
1356
|
-
export {
|
|
1357
|
-
it as E,
|
|
1358
|
-
ot as a,
|
|
1359
|
-
Dn as b
|
|
1360
|
-
};
|