@layers.digital/layers-design-system-vue3 1.0.3 → 1.0.4
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/dist/components/LSwitch/LSwitch.vue.d.ts +357 -0
- package/dist/index.d.ts +1 -1
- package/dist/layers-design-system-vue3.cjs +1 -1
- package/dist/layers-design-system-vue3.js +14 -15
- package/dist/layers-design-system-vue310.cjs +1 -1
- package/dist/layers-design-system-vue310.js +44 -2
- package/dist/layers-design-system-vue311.cjs +1 -1
- package/dist/layers-design-system-vue311.js +2 -44
- package/dist/layers-design-system-vue312.cjs +1 -1
- package/dist/layers-design-system-vue312.js +7 -2
- package/dist/layers-design-system-vue313.cjs +1 -1
- package/dist/layers-design-system-vue313.js +40 -7
- package/dist/layers-design-system-vue314.cjs +1 -1
- package/dist/layers-design-system-vue314.js +2 -40
- package/dist/layers-design-system-vue315.cjs +1 -1
- package/dist/layers-design-system-vue315.js +46 -2
- package/dist/layers-design-system-vue316.cjs +1 -1
- package/dist/layers-design-system-vue316.js +2 -46
- package/dist/layers-design-system-vue317.cjs +1 -1
- package/dist/layers-design-system-vue317.js +2 -2
- package/dist/layers-design-system-vue318.cjs +1 -1
- package/dist/layers-design-system-vue318.js +1 -1
- package/dist/layers-design-system-vue319.cjs +1 -1
- package/dist/layers-design-system-vue319.js +24 -2
- package/dist/layers-design-system-vue32.cjs +1 -1
- package/dist/layers-design-system-vue32.js +3 -3
- package/dist/layers-design-system-vue320.cjs +1 -1
- package/dist/layers-design-system-vue320.js +2 -24
- package/dist/layers-design-system-vue321.cjs +1 -1
- package/dist/layers-design-system-vue321.js +2 -2
- package/dist/layers-design-system-vue322.cjs +1 -1
- package/dist/layers-design-system-vue322.js +25 -2
- package/dist/layers-design-system-vue323.cjs +1 -1
- package/dist/layers-design-system-vue323.js +2 -3
- package/dist/layers-design-system-vue326.cjs +3 -3
- package/dist/layers-design-system-vue326.js +98 -99
- package/dist/layers-design-system-vue327.cjs +1 -1
- package/dist/layers-design-system-vue327.js +209 -793
- package/dist/layers-design-system-vue328.cjs +12 -1
- package/dist/layers-design-system-vue328.js +1091 -2015
- package/dist/layers-design-system-vue329.cjs +13 -9
- package/dist/layers-design-system-vue329.js +1971 -526
- package/dist/layers-design-system-vue33.cjs +1 -1
- package/dist/layers-design-system-vue33.js +3 -3
- package/dist/layers-design-system-vue330.cjs +1 -12
- package/dist/layers-design-system-vue330.js +8 -1172
- package/dist/layers-design-system-vue331.cjs +1 -5
- package/dist/layers-design-system-vue331.js +1706 -979
- package/dist/layers-design-system-vue332.cjs +1 -13
- package/dist/layers-design-system-vue332.js +1994 -1878
- package/dist/layers-design-system-vue333.cjs +9 -1
- package/dist/layers-design-system-vue333.js +536 -2
- package/dist/layers-design-system-vue334.cjs +5 -1
- package/dist/layers-design-system-vue334.js +1010 -2
- package/dist/layers-design-system-vue335.cjs +1 -1
- package/dist/layers-design-system-vue335.js +2 -2
- package/dist/layers-design-system-vue338.cjs +1 -1
- package/dist/layers-design-system-vue338.js +2 -9
- package/dist/layers-design-system-vue339.cjs +1 -1
- package/dist/layers-design-system-vue339.js +2 -1737
- package/dist/layers-design-system-vue34.cjs +1 -1
- package/dist/layers-design-system-vue34.js +3 -3
- package/dist/layers-design-system-vue340.cjs +1 -1
- package/dist/layers-design-system-vue340.js +2 -2
- package/dist/layers-design-system-vue341.cjs +1 -1
- package/dist/layers-design-system-vue341.js +2 -2
- package/dist/layers-design-system-vue342.cjs +1 -1
- package/dist/layers-design-system-vue342.js +824 -2
- package/dist/layers-design-system-vue343.js +2 -2
- package/dist/layers-design-system-vue344.cjs +1 -1
- package/dist/layers-design-system-vue344.js +2 -2
- package/dist/layers-design-system-vue345.cjs +1 -1
- package/dist/layers-design-system-vue345.js +2 -113
- package/dist/layers-design-system-vue346.cjs +1 -1
- package/dist/layers-design-system-vue346.js +113 -2
- package/dist/layers-design-system-vue347.cjs +1 -1
- package/dist/layers-design-system-vue347.js +2 -240
- package/dist/layers-design-system-vue348.cjs +1 -1
- package/dist/layers-design-system-vue348.js +2 -2
- package/dist/layers-design-system-vue35.cjs +1 -1
- package/dist/layers-design-system-vue35.js +9 -9
- package/dist/layers-design-system-vue350.cjs +1 -0
- package/dist/layers-design-system-vue350.js +4 -0
- package/dist/layers-design-system-vue36.cjs +1 -1
- package/dist/layers-design-system-vue36.js +8 -8
- package/dist/layers-design-system-vue37.cjs +1 -1
- package/dist/layers-design-system-vue37.js +3 -3
- package/dist/layers-design-system-vue38.cjs +1 -1
- package/dist/layers-design-system-vue38.js +2 -2
- package/dist/layers-design-system-vue39.cjs +1 -1
- package/dist/layers-design-system-vue39.js +5 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/LLinearProgress/LLinearProgress.vue.d.ts +0 -29
|
@@ -1,1739 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ElInput as rt, isKorean as st } from "./layers-design-system-vue329.js";
|
|
3
|
-
import { useFormSize as Yl, UPDATE_MODEL_EVENT as fe, CHANGE_EVENT as Xl, componentSizes as Jl, useFormItem as ut, componentSizeMap as dt } from "./layers-design-system-vue330.js";
|
|
4
|
-
import { ElIcon as El, close_default as Dl, iconPropType as Kl, circle_close_default as ct, arrow_down_default as ft, ValidateComponentsMap as pt } from "./layers-design-system-vue331.js";
|
|
5
|
-
import { isClient as be, buildProps as Je, useNamespace as ie, addUnit as Rl, useResizeObserver as Ml, useEventListener as Ll, withInstall as Pl, isIOS as vt, withNoopInstall as Zl, _export_sfc as pe, definePropType as mt, isNumber as Oe, isObject as kl, get_default as Y, escapeStringRegexp as ht, isEqual_default as Wl, debugWarn as gt, isFunction as ge, toRawType as Ol, debounce_default as Nl, isString as xl, getStyle as bt, isElement as yt, throwError as St } from "./layers-design-system-vue332.js";
|
|
6
|
-
import { defineComponent as X, ref as O, computed as m, watch as W, nextTick as K, provide as Vl, reactive as $e, onMounted as Ze, onUpdated as Ct, openBlock as y, createElementBlock as H, normalizeClass as S, unref as h, createElementVNode as B, normalizeStyle as Q, createBlock as $, resolveDynamicComponent as Il, withCtx as M, renderSlot as oe, createCommentVNode as R, withModifiers as _, createVNode as ee, Transition as Ye, toRefs as Bl, getCurrentInstance as Hl, onBeforeUnmount as _l, inject as He, toRaw as Xe, shallowRef as ql, triggerRef as Ve, Fragment as Be, withDirectives as Ee, toDisplayString as ce, vShow as xe, resolveComponent as ue, resolveDirective as wt, renderList as Tl, withKeys as G, vModelText as Ot, createSlots as Tt, toRef as Fl } from "vue";
|
|
7
|
-
var Et = (e, l) => {
|
|
8
|
-
if (!be)
|
|
9
|
-
return !1;
|
|
10
|
-
const n = {
|
|
11
|
-
undefined: "overflow",
|
|
12
|
-
true: "overflow-y",
|
|
13
|
-
false: "overflow-x"
|
|
14
|
-
}[String(l)], s = bt(e, n);
|
|
15
|
-
return ["scroll", "auto", "overlay"].some((u) => s.includes(u));
|
|
16
|
-
}, Cn = (e, l) => {
|
|
17
|
-
if (!be)
|
|
18
|
-
return;
|
|
19
|
-
let n = e;
|
|
20
|
-
for (; n; ) {
|
|
21
|
-
if ([window, document, document.documentElement].includes(n))
|
|
22
|
-
return window;
|
|
23
|
-
if (Et(n, l))
|
|
24
|
-
return n;
|
|
25
|
-
n = n.parentNode;
|
|
26
|
-
}
|
|
27
|
-
return n;
|
|
28
|
-
}, Ge, wn = (e) => {
|
|
29
|
-
var l;
|
|
30
|
-
if (!be)
|
|
31
|
-
return 0;
|
|
32
|
-
if (Ge !== void 0)
|
|
33
|
-
return Ge;
|
|
34
|
-
const n = document.createElement("div");
|
|
35
|
-
n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
|
|
36
|
-
const s = n.offsetWidth;
|
|
37
|
-
n.style.overflow = "scroll";
|
|
38
|
-
const u = document.createElement("div");
|
|
39
|
-
u.style.width = "100%", n.appendChild(u);
|
|
40
|
-
const c = u.offsetWidth;
|
|
41
|
-
return (l = n.parentNode) == null || l.removeChild(n), Ge = s - c, Ge;
|
|
42
|
-
};
|
|
43
|
-
function Lt(e, l) {
|
|
44
|
-
if (!be)
|
|
45
|
-
return;
|
|
46
|
-
if (!l) {
|
|
47
|
-
e.scrollTop = 0;
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const n = [];
|
|
51
|
-
let s = l.offsetParent;
|
|
52
|
-
for (; s !== null && e !== s && e.contains(s); )
|
|
53
|
-
n.push(s), s = s.offsetParent;
|
|
54
|
-
const u = l.offsetTop + n.reduce((a, C) => a + C.offsetTop, 0), c = u + l.offsetHeight, r = e.scrollTop, p = r + e.clientHeight;
|
|
55
|
-
u < r ? e.scrollTop = u : c > p && (e.scrollTop = c - e.clientHeight);
|
|
56
|
-
}
|
|
57
|
-
var On = [
|
|
58
|
-
"year",
|
|
59
|
-
"month",
|
|
60
|
-
"date",
|
|
61
|
-
"dates",
|
|
62
|
-
"week",
|
|
63
|
-
"datetime",
|
|
64
|
-
"datetimerange",
|
|
65
|
-
"daterange",
|
|
66
|
-
"monthrange"
|
|
67
|
-
], Tn = [
|
|
68
|
-
"sun",
|
|
69
|
-
"mon",
|
|
70
|
-
"tue",
|
|
71
|
-
"wed",
|
|
72
|
-
"thu",
|
|
73
|
-
"fri",
|
|
74
|
-
"sat"
|
|
75
|
-
], kt = (e) => dt[e || "default"], It = (e) => ["", ...Jl].includes(e), de = /* @__PURE__ */ new Map(), jl;
|
|
76
|
-
be && (document.addEventListener("mousedown", (e) => jl = e), document.addEventListener("mouseup", (e) => {
|
|
77
|
-
for (const l of de.values())
|
|
78
|
-
for (const { documentHandler: n } of l)
|
|
79
|
-
n(e, jl);
|
|
80
|
-
}));
|
|
81
|
-
function Ql(e, l) {
|
|
82
|
-
let n = [];
|
|
83
|
-
return Array.isArray(l.arg) ? n = l.arg : yt(l.arg) && n.push(l.arg), function(s, u) {
|
|
84
|
-
const c = l.instance.popperRef, r = s.target, p = u == null ? void 0 : u.target, a = !l || !l.instance, C = !r || !p, b = e.contains(r) || e.contains(p), f = e === r, I = n.length && n.some((L) => L == null ? void 0 : L.contains(r)) || n.length && n.includes(p), E = c && (c.contains(r) || c.contains(p));
|
|
85
|
-
a || C || b || f || I || E || l.value(s, u);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
var zt = {
|
|
89
|
-
beforeMount(e, l) {
|
|
90
|
-
de.has(e) || de.set(e, []), de.get(e).push({
|
|
91
|
-
documentHandler: Ql(e, l),
|
|
92
|
-
bindingFn: l.value
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
updated(e, l) {
|
|
96
|
-
de.has(e) || de.set(e, []);
|
|
97
|
-
const n = de.get(e), s = n.findIndex((c) => c.bindingFn === l.oldValue), u = {
|
|
98
|
-
documentHandler: Ql(e, l),
|
|
99
|
-
bindingFn: l.value
|
|
100
|
-
};
|
|
101
|
-
s >= 0 ? n.splice(s, 1, u) : n.push(u);
|
|
102
|
-
},
|
|
103
|
-
unmounted(e) {
|
|
104
|
-
de.delete(e);
|
|
105
|
-
}
|
|
106
|
-
}, Mt = ({ from: e, replacement: l, scope: n, version: s, ref: u, type: c = "API" }, r) => {
|
|
107
|
-
W(() => h(r), (p) => {
|
|
108
|
-
}, {
|
|
109
|
-
immediate: !0
|
|
110
|
-
});
|
|
111
|
-
}, Te = 4, Pt = {
|
|
112
|
-
vertical: {
|
|
113
|
-
offset: "offsetHeight",
|
|
114
|
-
scroll: "scrollTop",
|
|
115
|
-
scrollSize: "scrollHeight",
|
|
116
|
-
size: "height",
|
|
117
|
-
key: "vertical",
|
|
118
|
-
axis: "Y",
|
|
119
|
-
client: "clientY",
|
|
120
|
-
direction: "top"
|
|
121
|
-
},
|
|
122
|
-
horizontal: {
|
|
123
|
-
offset: "offsetWidth",
|
|
124
|
-
scroll: "scrollLeft",
|
|
125
|
-
scrollSize: "scrollWidth",
|
|
126
|
-
size: "width",
|
|
127
|
-
key: "horizontal",
|
|
128
|
-
axis: "X",
|
|
129
|
-
client: "clientX",
|
|
130
|
-
direction: "left"
|
|
131
|
-
}
|
|
132
|
-
}, Vt = ({
|
|
133
|
-
move: e,
|
|
134
|
-
size: l,
|
|
135
|
-
bar: n
|
|
136
|
-
}) => ({
|
|
137
|
-
[n.size]: l,
|
|
138
|
-
transform: `translate${n.axis}(${e}%)`
|
|
139
|
-
}), et = Symbol("scrollbarContextKey"), Bt = Je({
|
|
140
|
-
vertical: Boolean,
|
|
141
|
-
size: String,
|
|
142
|
-
move: Number,
|
|
143
|
-
ratio: {
|
|
144
|
-
type: Number,
|
|
145
|
-
required: !0
|
|
146
|
-
},
|
|
147
|
-
always: Boolean
|
|
148
|
-
}), Ht = "Thumb", $t = /* @__PURE__ */ X({
|
|
149
|
-
__name: "thumb",
|
|
150
|
-
props: Bt,
|
|
151
|
-
setup(e) {
|
|
152
|
-
const l = e, n = He(et), s = ie("scrollbar");
|
|
153
|
-
n || St(Ht, "can not inject scrollbar context");
|
|
154
|
-
const u = O(), c = O(), r = O({}), p = O(!1);
|
|
155
|
-
let a = !1, C = !1, b = be ? document.onselectstart : null;
|
|
156
|
-
const f = m(() => Pt[l.vertical ? "vertical" : "horizontal"]), I = m(() => Vt({
|
|
157
|
-
size: l.size,
|
|
158
|
-
move: l.move,
|
|
159
|
-
bar: f.value
|
|
160
|
-
})), E = m(() => u.value[f.value.offset] ** 2 / n.wrapElement[f.value.scrollSize] / l.ratio / c.value[f.value.offset]), L = (T) => {
|
|
161
|
-
var v;
|
|
162
|
-
if (T.stopPropagation(), T.ctrlKey || [1, 2].includes(T.button))
|
|
163
|
-
return;
|
|
164
|
-
(v = window.getSelection()) == null || v.removeAllRanges(), w(T);
|
|
165
|
-
const P = T.currentTarget;
|
|
166
|
-
P && (r.value[f.value.axis] = P[f.value.offset] - (T[f.value.client] - P.getBoundingClientRect()[f.value.direction]));
|
|
167
|
-
}, i = (T) => {
|
|
168
|
-
if (!c.value || !u.value || !n.wrapElement)
|
|
169
|
-
return;
|
|
170
|
-
const v = Math.abs(T.target.getBoundingClientRect()[f.value.direction] - T[f.value.client]), P = c.value[f.value.offset] / 2, U = (v - P) * 100 * E.value / u.value[f.value.offset];
|
|
171
|
-
n.wrapElement[f.value.scroll] = U * n.wrapElement[f.value.scrollSize] / 100;
|
|
172
|
-
}, w = (T) => {
|
|
173
|
-
T.stopImmediatePropagation(), a = !0, document.addEventListener("mousemove", k), document.addEventListener("mouseup", z), b = document.onselectstart, document.onselectstart = () => !1;
|
|
174
|
-
}, k = (T) => {
|
|
175
|
-
if (!u.value || !c.value || a === !1)
|
|
176
|
-
return;
|
|
177
|
-
const v = r.value[f.value.axis];
|
|
178
|
-
if (!v)
|
|
179
|
-
return;
|
|
180
|
-
const P = (u.value.getBoundingClientRect()[f.value.direction] - T[f.value.client]) * -1, U = c.value[f.value.offset] - v, J = (P - U) * 100 * E.value / u.value[f.value.offset];
|
|
181
|
-
n.wrapElement[f.value.scroll] = J * n.wrapElement[f.value.scrollSize] / 100;
|
|
182
|
-
}, z = () => {
|
|
183
|
-
a = !1, r.value[f.value.axis] = 0, document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", z), F(), C && (p.value = !1);
|
|
184
|
-
}, N = () => {
|
|
185
|
-
C = !1, p.value = !!l.size;
|
|
186
|
-
}, ae = () => {
|
|
187
|
-
C = !0, p.value = a;
|
|
188
|
-
};
|
|
189
|
-
_l(() => {
|
|
190
|
-
F(), document.removeEventListener("mouseup", z);
|
|
191
|
-
});
|
|
192
|
-
const F = () => {
|
|
193
|
-
document.onselectstart !== b && (document.onselectstart = b);
|
|
194
|
-
};
|
|
195
|
-
return Ll(Fl(n, "scrollbarElement"), "mousemove", N), Ll(Fl(n, "scrollbarElement"), "mouseleave", ae), (T, v) => (y(), $(Ye, {
|
|
196
|
-
name: h(s).b("fade"),
|
|
197
|
-
persisted: ""
|
|
198
|
-
}, {
|
|
199
|
-
default: M(() => [
|
|
200
|
-
Ee(B("div", {
|
|
201
|
-
ref_key: "instance",
|
|
202
|
-
ref: u,
|
|
203
|
-
class: S([h(s).e("bar"), h(s).is(h(f).key)]),
|
|
204
|
-
onMousedown: i
|
|
205
|
-
}, [
|
|
206
|
-
B("div", {
|
|
207
|
-
ref_key: "thumb",
|
|
208
|
-
ref: c,
|
|
209
|
-
class: S(h(s).e("thumb")),
|
|
210
|
-
style: Q(h(I)),
|
|
211
|
-
onMousedown: L
|
|
212
|
-
}, null, 38)
|
|
213
|
-
], 34), [
|
|
214
|
-
[xe, T.always || p.value]
|
|
215
|
-
])
|
|
216
|
-
]),
|
|
217
|
-
_: 1
|
|
218
|
-
}, 8, ["name"]));
|
|
219
|
-
}
|
|
220
|
-
}), Ul = /* @__PURE__ */ pe($t, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]), At = Je({
|
|
221
|
-
always: {
|
|
222
|
-
type: Boolean,
|
|
223
|
-
default: !0
|
|
224
|
-
},
|
|
225
|
-
width: String,
|
|
226
|
-
height: String,
|
|
227
|
-
ratioX: {
|
|
228
|
-
type: Number,
|
|
229
|
-
default: 1
|
|
230
|
-
},
|
|
231
|
-
ratioY: {
|
|
232
|
-
type: Number,
|
|
233
|
-
default: 1
|
|
234
|
-
}
|
|
235
|
-
}), Dt = /* @__PURE__ */ X({
|
|
236
|
-
__name: "bar",
|
|
237
|
-
props: At,
|
|
238
|
-
setup(e, { expose: l }) {
|
|
239
|
-
const n = e, s = O(0), u = O(0);
|
|
240
|
-
return l({
|
|
241
|
-
handleScroll: (r) => {
|
|
242
|
-
if (r) {
|
|
243
|
-
const p = r.offsetHeight - Te, a = r.offsetWidth - Te;
|
|
244
|
-
u.value = r.scrollTop * 100 / p * n.ratioY, s.value = r.scrollLeft * 100 / a * n.ratioX;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}), (r, p) => (y(), H(Be, null, [
|
|
248
|
-
ee(Ul, {
|
|
249
|
-
move: s.value,
|
|
250
|
-
ratio: r.ratioX,
|
|
251
|
-
size: r.width,
|
|
252
|
-
always: r.always
|
|
253
|
-
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
254
|
-
ee(Ul, {
|
|
255
|
-
move: u.value,
|
|
256
|
-
ratio: r.ratioY,
|
|
257
|
-
size: r.height,
|
|
258
|
-
vertical: "",
|
|
259
|
-
always: r.always
|
|
260
|
-
}, null, 8, ["move", "ratio", "size", "always"])
|
|
261
|
-
], 64));
|
|
262
|
-
}
|
|
263
|
-
}), Kt = /* @__PURE__ */ pe(Dt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]), Rt = Je({
|
|
264
|
-
height: {
|
|
265
|
-
type: [String, Number],
|
|
266
|
-
default: ""
|
|
267
|
-
},
|
|
268
|
-
maxHeight: {
|
|
269
|
-
type: [String, Number],
|
|
270
|
-
default: ""
|
|
271
|
-
},
|
|
272
|
-
native: {
|
|
273
|
-
type: Boolean,
|
|
274
|
-
default: !1
|
|
275
|
-
},
|
|
276
|
-
wrapStyle: {
|
|
277
|
-
type: mt([String, Object, Array]),
|
|
278
|
-
default: ""
|
|
279
|
-
},
|
|
280
|
-
wrapClass: {
|
|
281
|
-
type: [String, Array],
|
|
282
|
-
default: ""
|
|
283
|
-
},
|
|
284
|
-
viewClass: {
|
|
285
|
-
type: [String, Array],
|
|
286
|
-
default: ""
|
|
287
|
-
},
|
|
288
|
-
viewStyle: {
|
|
289
|
-
type: [String, Array, Object],
|
|
290
|
-
default: ""
|
|
291
|
-
},
|
|
292
|
-
noresize: Boolean,
|
|
293
|
-
tag: {
|
|
294
|
-
type: String,
|
|
295
|
-
default: "div"
|
|
296
|
-
},
|
|
297
|
-
always: Boolean,
|
|
298
|
-
minSize: {
|
|
299
|
-
type: Number,
|
|
300
|
-
default: 20
|
|
301
|
-
}
|
|
302
|
-
}), Wt = {
|
|
303
|
-
scroll: ({
|
|
304
|
-
scrollTop: e,
|
|
305
|
-
scrollLeft: l
|
|
306
|
-
}) => [e, l].every(Oe)
|
|
307
|
-
}, Nt = "ElScrollbar", qt = X({
|
|
308
|
-
name: Nt
|
|
309
|
-
}), Ft = /* @__PURE__ */ X({
|
|
310
|
-
...qt,
|
|
311
|
-
props: Rt,
|
|
312
|
-
emits: Wt,
|
|
313
|
-
setup(e, { expose: l, emit: n }) {
|
|
314
|
-
const s = e, u = ie("scrollbar");
|
|
315
|
-
let c, r;
|
|
316
|
-
const p = O(), a = O(), C = O(), b = O("0"), f = O("0"), I = O(), E = O(1), L = O(1), i = m(() => {
|
|
317
|
-
const v = {};
|
|
318
|
-
return s.height && (v.height = Rl(s.height)), s.maxHeight && (v.maxHeight = Rl(s.maxHeight)), [s.wrapStyle, v];
|
|
319
|
-
}), w = m(() => [
|
|
320
|
-
s.wrapClass,
|
|
321
|
-
u.e("wrap"),
|
|
322
|
-
{ [u.em("wrap", "hidden-default")]: !s.native }
|
|
323
|
-
]), k = m(() => [u.e("view"), s.viewClass]), z = () => {
|
|
324
|
-
var v;
|
|
325
|
-
a.value && ((v = I.value) == null || v.handleScroll(a.value), n("scroll", {
|
|
326
|
-
scrollTop: a.value.scrollTop,
|
|
327
|
-
scrollLeft: a.value.scrollLeft
|
|
328
|
-
}));
|
|
329
|
-
};
|
|
330
|
-
function N(v, P) {
|
|
331
|
-
kl(v) ? a.value.scrollTo(v) : Oe(v) && Oe(P) && a.value.scrollTo(v, P);
|
|
332
|
-
}
|
|
333
|
-
const ae = (v) => {
|
|
334
|
-
Oe(v) && (a.value.scrollTop = v);
|
|
335
|
-
}, F = (v) => {
|
|
336
|
-
Oe(v) && (a.value.scrollLeft = v);
|
|
337
|
-
}, T = () => {
|
|
338
|
-
if (!a.value)
|
|
339
|
-
return;
|
|
340
|
-
const v = a.value.offsetHeight - Te, P = a.value.offsetWidth - Te, U = v ** 2 / a.value.scrollHeight, J = P ** 2 / a.value.scrollWidth, Z = Math.max(U, s.minSize), V = Math.max(J, s.minSize);
|
|
341
|
-
E.value = U / (v - U) / (Z / (v - Z)), L.value = J / (P - J) / (V / (P - V)), f.value = Z + Te < v ? `${Z}px` : "", b.value = V + Te < P ? `${V}px` : "";
|
|
342
|
-
};
|
|
343
|
-
return W(() => s.noresize, (v) => {
|
|
344
|
-
v ? (c == null || c(), r == null || r()) : ({ stop: c } = Ml(C, T), r = Ll("resize", T));
|
|
345
|
-
}, { immediate: !0 }), W(() => [s.maxHeight, s.height], () => {
|
|
346
|
-
s.native || K(() => {
|
|
347
|
-
var v;
|
|
348
|
-
T(), a.value && ((v = I.value) == null || v.handleScroll(a.value));
|
|
349
|
-
});
|
|
350
|
-
}), Vl(et, $e({
|
|
351
|
-
scrollbarElement: p,
|
|
352
|
-
wrapElement: a
|
|
353
|
-
})), Ze(() => {
|
|
354
|
-
s.native || K(() => {
|
|
355
|
-
T();
|
|
356
|
-
});
|
|
357
|
-
}), Ct(() => T()), l({
|
|
358
|
-
wrapRef: a,
|
|
359
|
-
update: T,
|
|
360
|
-
scrollTo: N,
|
|
361
|
-
setScrollTop: ae,
|
|
362
|
-
setScrollLeft: F,
|
|
363
|
-
handleScroll: z
|
|
364
|
-
}), (v, P) => (y(), H("div", {
|
|
365
|
-
ref_key: "scrollbarRef",
|
|
366
|
-
ref: p,
|
|
367
|
-
class: S(h(u).b())
|
|
368
|
-
}, [
|
|
369
|
-
B("div", {
|
|
370
|
-
ref_key: "wrapRef",
|
|
371
|
-
ref: a,
|
|
372
|
-
class: S(h(w)),
|
|
373
|
-
style: Q(h(i)),
|
|
374
|
-
onScroll: z
|
|
375
|
-
}, [
|
|
376
|
-
(y(), $(Il(v.tag), {
|
|
377
|
-
ref_key: "resizeRef",
|
|
378
|
-
ref: C,
|
|
379
|
-
class: S(h(k)),
|
|
380
|
-
style: Q(v.viewStyle)
|
|
381
|
-
}, {
|
|
382
|
-
default: M(() => [
|
|
383
|
-
oe(v.$slots, "default")
|
|
384
|
-
]),
|
|
385
|
-
_: 3
|
|
386
|
-
}, 8, ["class", "style"]))
|
|
387
|
-
], 38),
|
|
388
|
-
v.native ? R("v-if", !0) : (y(), $(Kt, {
|
|
389
|
-
key: 0,
|
|
390
|
-
ref_key: "barRef",
|
|
391
|
-
ref: I,
|
|
392
|
-
height: f.value,
|
|
393
|
-
width: b.value,
|
|
394
|
-
always: v.always,
|
|
395
|
-
"ratio-x": L.value,
|
|
396
|
-
"ratio-y": E.value
|
|
397
|
-
}, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"]))
|
|
398
|
-
], 2));
|
|
399
|
-
}
|
|
400
|
-
}), jt = /* @__PURE__ */ pe(Ft, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]), Qt = Pl(jt), lt = Je({
|
|
401
|
-
type: {
|
|
402
|
-
type: String,
|
|
403
|
-
values: ["success", "info", "warning", "danger", ""],
|
|
404
|
-
default: ""
|
|
405
|
-
},
|
|
406
|
-
closable: Boolean,
|
|
407
|
-
disableTransitions: Boolean,
|
|
408
|
-
hit: Boolean,
|
|
409
|
-
color: {
|
|
410
|
-
type: String,
|
|
411
|
-
default: ""
|
|
412
|
-
},
|
|
413
|
-
size: {
|
|
414
|
-
type: String,
|
|
415
|
-
values: Jl,
|
|
416
|
-
default: ""
|
|
417
|
-
},
|
|
418
|
-
effect: {
|
|
419
|
-
type: String,
|
|
420
|
-
values: ["dark", "light", "plain"],
|
|
421
|
-
default: "light"
|
|
422
|
-
},
|
|
423
|
-
round: Boolean
|
|
424
|
-
}), Ut = {
|
|
425
|
-
close: (e) => e instanceof MouseEvent,
|
|
426
|
-
click: (e) => e instanceof MouseEvent
|
|
427
|
-
}, Gt = X({
|
|
428
|
-
name: "ElTag"
|
|
429
|
-
}), Yt = /* @__PURE__ */ X({
|
|
430
|
-
...Gt,
|
|
431
|
-
props: lt,
|
|
432
|
-
emits: Ut,
|
|
433
|
-
setup(e, { emit: l }) {
|
|
434
|
-
const n = e, s = Yl(), u = ie("tag"), c = m(() => {
|
|
435
|
-
const { type: a, hit: C, effect: b, closable: f, round: I } = n;
|
|
436
|
-
return [
|
|
437
|
-
u.b(),
|
|
438
|
-
u.is("closable", f),
|
|
439
|
-
u.m(a),
|
|
440
|
-
u.m(s.value),
|
|
441
|
-
u.m(b),
|
|
442
|
-
u.is("hit", C),
|
|
443
|
-
u.is("round", I)
|
|
444
|
-
];
|
|
445
|
-
}), r = (a) => {
|
|
446
|
-
l("close", a);
|
|
447
|
-
}, p = (a) => {
|
|
448
|
-
l("click", a);
|
|
449
|
-
};
|
|
450
|
-
return (a, C) => a.disableTransitions ? (y(), H("span", {
|
|
451
|
-
key: 0,
|
|
452
|
-
class: S(h(c)),
|
|
453
|
-
style: Q({ backgroundColor: a.color }),
|
|
454
|
-
onClick: p
|
|
455
|
-
}, [
|
|
456
|
-
B("span", {
|
|
457
|
-
class: S(h(u).e("content"))
|
|
458
|
-
}, [
|
|
459
|
-
oe(a.$slots, "default")
|
|
460
|
-
], 2),
|
|
461
|
-
a.closable ? (y(), $(h(El), {
|
|
462
|
-
key: 0,
|
|
463
|
-
class: S(h(u).e("close")),
|
|
464
|
-
onClick: _(r, ["stop"])
|
|
465
|
-
}, {
|
|
466
|
-
default: M(() => [
|
|
467
|
-
ee(h(Dl))
|
|
468
|
-
]),
|
|
469
|
-
_: 1
|
|
470
|
-
}, 8, ["class", "onClick"])) : R("v-if", !0)
|
|
471
|
-
], 6)) : (y(), $(Ye, {
|
|
472
|
-
key: 1,
|
|
473
|
-
name: `${h(u).namespace.value}-zoom-in-center`,
|
|
474
|
-
appear: ""
|
|
475
|
-
}, {
|
|
476
|
-
default: M(() => [
|
|
477
|
-
B("span", {
|
|
478
|
-
class: S(h(c)),
|
|
479
|
-
style: Q({ backgroundColor: a.color }),
|
|
480
|
-
onClick: p
|
|
481
|
-
}, [
|
|
482
|
-
B("span", {
|
|
483
|
-
class: S(h(u).e("content"))
|
|
484
|
-
}, [
|
|
485
|
-
oe(a.$slots, "default")
|
|
486
|
-
], 2),
|
|
487
|
-
a.closable ? (y(), $(h(El), {
|
|
488
|
-
key: 0,
|
|
489
|
-
class: S(h(u).e("close")),
|
|
490
|
-
onClick: _(r, ["stop"])
|
|
491
|
-
}, {
|
|
492
|
-
default: M(() => [
|
|
493
|
-
ee(h(Dl))
|
|
494
|
-
]),
|
|
495
|
-
_: 1
|
|
496
|
-
}, 8, ["class", "onClick"])) : R("v-if", !0)
|
|
497
|
-
], 6)
|
|
498
|
-
]),
|
|
499
|
-
_: 3
|
|
500
|
-
}, 8, ["name"]));
|
|
501
|
-
}
|
|
502
|
-
}), Xt = /* @__PURE__ */ pe(Yt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]), Jt = Pl(Xt), tt = Symbol("ElSelectGroup"), _e = Symbol("ElSelect");
|
|
503
|
-
function Zt(e, l) {
|
|
504
|
-
const n = He(_e), s = He(tt, { disabled: !1 }), u = m(() => Object.prototype.toString.call(e.value).toLowerCase() === "[object object]"), c = m(() => n.props.multiple ? f(n.props.modelValue, e.value) : I(e.value, n.props.modelValue)), r = m(() => {
|
|
505
|
-
if (n.props.multiple) {
|
|
506
|
-
const i = n.props.modelValue || [];
|
|
507
|
-
return !c.value && i.length >= n.props.multipleLimit && n.props.multipleLimit > 0;
|
|
508
|
-
} else
|
|
509
|
-
return !1;
|
|
510
|
-
}), p = m(() => e.label || (u.value ? "" : e.value)), a = m(() => e.value || e.label || ""), C = m(() => e.disabled || l.groupDisabled || r.value), b = Hl(), f = (i = [], w) => {
|
|
511
|
-
if (u.value) {
|
|
512
|
-
const k = n.props.valueKey;
|
|
513
|
-
return i && i.some((z) => Xe(Y(z, k)) === Y(w, k));
|
|
514
|
-
} else
|
|
515
|
-
return i && i.includes(w);
|
|
516
|
-
}, I = (i, w) => {
|
|
517
|
-
if (u.value) {
|
|
518
|
-
const { valueKey: k } = n.props;
|
|
519
|
-
return Y(i, k) === Y(w, k);
|
|
520
|
-
} else
|
|
521
|
-
return i === w;
|
|
522
|
-
}, E = () => {
|
|
523
|
-
!e.disabled && !s.disabled && (n.hoverIndex = n.optionsArray.indexOf(b.proxy));
|
|
524
|
-
};
|
|
525
|
-
W(() => p.value, () => {
|
|
526
|
-
!e.created && !n.props.remote && n.setSelected();
|
|
527
|
-
}), W(() => e.value, (i, w) => {
|
|
528
|
-
const { remote: k, valueKey: z } = n.props;
|
|
529
|
-
if (Object.is(i, w) || (n.onOptionDestroy(w, b.proxy), n.onOptionCreate(b.proxy)), !e.created && !k) {
|
|
530
|
-
if (z && typeof i == "object" && typeof w == "object" && i[z] === w[z])
|
|
531
|
-
return;
|
|
532
|
-
n.setSelected();
|
|
533
|
-
}
|
|
534
|
-
}), W(() => s.disabled, () => {
|
|
535
|
-
l.groupDisabled = s.disabled;
|
|
536
|
-
}, { immediate: !0 });
|
|
537
|
-
const { queryChange: L } = Xe(n);
|
|
538
|
-
return W(L, (i) => {
|
|
539
|
-
const { query: w } = h(i), k = new RegExp(ht(w), "i");
|
|
540
|
-
l.visible = k.test(p.value) || e.created, l.visible || n.filteredOptionsCount--;
|
|
541
|
-
}, { immediate: !0 }), {
|
|
542
|
-
select: n,
|
|
543
|
-
currentLabel: p,
|
|
544
|
-
currentValue: a,
|
|
545
|
-
itemSelected: c,
|
|
546
|
-
isDisabled: C,
|
|
547
|
-
hoverItem: E
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
var xt = X({
|
|
551
|
-
name: "ElOption",
|
|
552
|
-
componentName: "ElOption",
|
|
553
|
-
props: {
|
|
554
|
-
value: {
|
|
555
|
-
required: !0,
|
|
556
|
-
type: [String, Number, Boolean, Object]
|
|
557
|
-
},
|
|
558
|
-
label: [String, Number],
|
|
559
|
-
created: Boolean,
|
|
560
|
-
disabled: {
|
|
561
|
-
type: Boolean,
|
|
562
|
-
default: !1
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
|
-
setup(e) {
|
|
566
|
-
const l = ie("select"), n = m(() => [
|
|
567
|
-
l.be("dropdown", "item"),
|
|
568
|
-
l.is("disabled", h(r)),
|
|
569
|
-
{
|
|
570
|
-
selected: h(c),
|
|
571
|
-
hover: h(b)
|
|
572
|
-
}
|
|
573
|
-
]), s = $e({
|
|
574
|
-
index: -1,
|
|
575
|
-
groupDisabled: !1,
|
|
576
|
-
visible: !0,
|
|
577
|
-
hitState: !1,
|
|
578
|
-
hover: !1
|
|
579
|
-
}), { currentLabel: u, itemSelected: c, isDisabled: r, select: p, hoverItem: a } = Zt(e, s), { visible: C, hover: b } = Bl(s), f = Hl().proxy;
|
|
580
|
-
p.onOptionCreate(f), _l(() => {
|
|
581
|
-
const E = f.value, { selected: L } = p, w = (p.props.multiple ? L : [L]).some((k) => k.value === f.value);
|
|
582
|
-
K(() => {
|
|
583
|
-
p.cachedOptions.get(E) === f && !w && p.cachedOptions.delete(E);
|
|
584
|
-
}), p.onOptionDestroy(E, f);
|
|
585
|
-
});
|
|
586
|
-
function I() {
|
|
587
|
-
e.disabled !== !0 && s.groupDisabled !== !0 && p.handleOptionSelect(f);
|
|
588
|
-
}
|
|
589
|
-
return {
|
|
590
|
-
ns: l,
|
|
591
|
-
containerKls: n,
|
|
592
|
-
currentLabel: u,
|
|
593
|
-
itemSelected: c,
|
|
594
|
-
isDisabled: r,
|
|
595
|
-
select: p,
|
|
596
|
-
hoverItem: a,
|
|
597
|
-
visible: C,
|
|
598
|
-
hover: b,
|
|
599
|
-
selectOptionClick: I,
|
|
600
|
-
states: s
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
function _t(e, l, n, s, u, c) {
|
|
605
|
-
return Ee((y(), H("li", {
|
|
606
|
-
class: S(e.containerKls),
|
|
607
|
-
onMouseenter: l[0] || (l[0] = (...r) => e.hoverItem && e.hoverItem(...r)),
|
|
608
|
-
onClick: l[1] || (l[1] = _((...r) => e.selectOptionClick && e.selectOptionClick(...r), ["stop"]))
|
|
609
|
-
}, [
|
|
610
|
-
oe(e.$slots, "default", {}, () => [
|
|
611
|
-
B("span", null, ce(e.currentLabel), 1)
|
|
612
|
-
])
|
|
613
|
-
], 34)), [
|
|
614
|
-
[xe, e.visible]
|
|
615
|
-
]);
|
|
616
|
-
}
|
|
617
|
-
var $l = /* @__PURE__ */ pe(xt, [["render", _t], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]), en = X({
|
|
618
|
-
name: "ElSelectDropdown",
|
|
619
|
-
componentName: "ElSelectDropdown",
|
|
620
|
-
setup() {
|
|
621
|
-
const e = He(_e), l = ie("select"), n = m(() => e.props.popperClass), s = m(() => e.props.multiple), u = m(() => e.props.fitInputWidth), c = O("");
|
|
622
|
-
function r() {
|
|
623
|
-
var p;
|
|
624
|
-
c.value = `${(p = e.selectWrapper) == null ? void 0 : p.offsetWidth}px`;
|
|
625
|
-
}
|
|
626
|
-
return Ze(() => {
|
|
627
|
-
r(), Ml(e.selectWrapper, r);
|
|
628
|
-
}), {
|
|
629
|
-
ns: l,
|
|
630
|
-
minWidth: c,
|
|
631
|
-
popperClass: n,
|
|
632
|
-
isMultiple: s,
|
|
633
|
-
isFitInputWidth: u
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
});
|
|
637
|
-
function ln(e, l, n, s, u, c) {
|
|
638
|
-
return y(), H("div", {
|
|
639
|
-
class: S([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
|
|
640
|
-
style: Q({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
|
|
641
|
-
}, [
|
|
642
|
-
oe(e.$slots, "default")
|
|
643
|
-
], 6);
|
|
644
|
-
}
|
|
645
|
-
var tn = /* @__PURE__ */ pe(en, [["render", ln], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
|
|
646
|
-
function nn(e) {
|
|
647
|
-
const { t: l } = zl();
|
|
648
|
-
return $e({
|
|
649
|
-
options: /* @__PURE__ */ new Map(),
|
|
650
|
-
cachedOptions: /* @__PURE__ */ new Map(),
|
|
651
|
-
createdLabel: null,
|
|
652
|
-
createdSelected: !1,
|
|
653
|
-
selected: e.multiple ? [] : {},
|
|
654
|
-
inputLength: 20,
|
|
655
|
-
inputWidth: 0,
|
|
656
|
-
optionsCount: 0,
|
|
657
|
-
filteredOptionsCount: 0,
|
|
658
|
-
visible: !1,
|
|
659
|
-
selectedLabel: "",
|
|
660
|
-
hoverIndex: -1,
|
|
661
|
-
query: "",
|
|
662
|
-
previousQuery: null,
|
|
663
|
-
inputHovering: !1,
|
|
664
|
-
cachedPlaceHolder: "",
|
|
665
|
-
currentPlaceholder: l("el.select.placeholder"),
|
|
666
|
-
menuVisibleOnFocus: !1,
|
|
667
|
-
isOnComposition: !1,
|
|
668
|
-
prefixWidth: 11,
|
|
669
|
-
mouseEnter: !1,
|
|
670
|
-
focused: !1
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
var on = (e, l, n) => {
|
|
674
|
-
const { t: s } = zl(), u = ie("select");
|
|
675
|
-
Mt({
|
|
676
|
-
from: "suffixTransition",
|
|
677
|
-
replacement: "override style scheme",
|
|
678
|
-
version: "2.3.0",
|
|
679
|
-
scope: "props",
|
|
680
|
-
ref: "https://element-plus.org/en-US/component/select.html#select-attributes"
|
|
681
|
-
}, m(() => e.suffixTransition === !1));
|
|
682
|
-
const c = O(null), r = O(null), p = O(null), a = O(null), C = O(null), b = O(null), f = O(null), I = O(null), E = O(-1), L = ql({ query: "" }), i = ql(""), w = O([]);
|
|
683
|
-
let k = 0;
|
|
684
|
-
const { form: z, formItem: N } = ut(), ae = m(() => !e.filterable || e.multiple || !l.visible), F = m(() => e.disabled || (z == null ? void 0 : z.disabled)), T = m(() => {
|
|
685
|
-
const t = e.multiple ? Array.isArray(e.modelValue) && e.modelValue.length > 0 : e.modelValue !== void 0 && e.modelValue !== null && e.modelValue !== "";
|
|
686
|
-
return e.clearable && !F.value && l.inputHovering && t;
|
|
687
|
-
}), v = m(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), P = m(() => u.is("reverse", v.value && l.visible && e.suffixTransition)), U = m(() => (z == null ? void 0 : z.statusIcon) && (N == null ? void 0 : N.validateState) && pt[N == null ? void 0 : N.validateState]), J = m(() => e.remote ? 300 : 0), Z = m(() => e.loading ? e.loadingText || s("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 || s("el.select.noMatch") : l.options.size === 0 ? e.noDataText || s("el.select.noData") : null), V = m(() => {
|
|
688
|
-
const t = Array.from(l.options.values()), o = [];
|
|
689
|
-
return w.value.forEach((d) => {
|
|
690
|
-
const g = t.findIndex((A) => A.currentLabel === d);
|
|
691
|
-
g > -1 && o.push(t[g]);
|
|
692
|
-
}), o.length ? o : t;
|
|
693
|
-
}), el = m(() => Array.from(l.cachedOptions.values())), ll = m(() => {
|
|
694
|
-
const t = V.value.filter((o) => !o.created).some((o) => o.currentLabel === l.query);
|
|
695
|
-
return e.filterable && e.allowCreate && l.query !== "" && !t;
|
|
696
|
-
}), ve = Yl(), tl = m(() => ["small"].includes(ve.value) ? "small" : "default"), nl = m({
|
|
697
|
-
get() {
|
|
698
|
-
return l.visible && Z.value !== !1;
|
|
699
|
-
},
|
|
700
|
-
set(t) {
|
|
701
|
-
l.visible = t;
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
W([() => F.value, () => ve.value, () => z == null ? void 0 : z.size], () => {
|
|
705
|
-
K(() => {
|
|
706
|
-
x();
|
|
707
|
-
});
|
|
708
|
-
}), W(() => e.placeholder, (t) => {
|
|
709
|
-
l.cachedPlaceHolder = l.currentPlaceholder = t, e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (l.currentPlaceholder = "");
|
|
710
|
-
}), W(() => e.modelValue, (t, o) => {
|
|
711
|
-
e.multiple && (x(), t && t.length > 0 || r.value && l.query !== "" ? l.currentPlaceholder = "" : l.currentPlaceholder = l.cachedPlaceHolder, e.filterable && !e.reserveKeyword && (l.query = "", re(l.query))), Le(), e.filterable && !e.multiple && (l.inputLength = 20), !Wl(t, o) && e.validateEvent && (N == null || N.validate("change").catch((d) => gt()));
|
|
712
|
-
}, {
|
|
713
|
-
flush: "post",
|
|
714
|
-
deep: !0
|
|
715
|
-
}), W(() => l.visible, (t) => {
|
|
716
|
-
var o, d, g, A, D;
|
|
717
|
-
t ? ((d = (o = a.value) == null ? void 0 : o.updatePopper) == null || d.call(o), e.filterable && (l.filteredOptionsCount = l.optionsCount, l.query = e.remote ? "" : l.selectedLabel, (A = (g = p.value) == null ? void 0 : g.focus) == null || A.call(g), e.multiple ? (D = r.value) == null || D.focus() : l.selectedLabel && (l.currentPlaceholder = `${l.selectedLabel}`, l.selectedLabel = ""), re(l.query), !e.multiple && !e.remote && (L.value.query = "", Ve(L), Ve(i)))) : (e.filterable && (ge(e.filterMethod) && e.filterMethod(""), ge(e.remoteMethod) && e.remoteMethod("")), l.query = "", l.previousQuery = null, l.selectedLabel = "", l.inputLength = 20, l.menuVisibleOnFocus = !1, ol(), K(() => {
|
|
718
|
-
r.value && r.value.value === "" && l.selected.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
|
|
719
|
-
}), 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))), n.emit("visible-change", t);
|
|
720
|
-
}), W(() => l.options.entries(), () => {
|
|
721
|
-
var t, o, d;
|
|
722
|
-
if (!be)
|
|
723
|
-
return;
|
|
724
|
-
(o = (t = a.value) == null ? void 0 : t.updatePopper) == null || o.call(t), e.multiple && x();
|
|
725
|
-
const g = ((d = f.value) == null ? void 0 : d.querySelectorAll("input")) || [];
|
|
726
|
-
Array.from(g).includes(document.activeElement) || Le(), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && De();
|
|
727
|
-
}, {
|
|
728
|
-
flush: "post"
|
|
729
|
-
}), W(() => l.hoverIndex, (t) => {
|
|
730
|
-
Oe(t) && t > -1 ? E.value = V.value[t] || {} : E.value = {}, V.value.forEach((o) => {
|
|
731
|
-
o.hover = E.value === o;
|
|
732
|
-
});
|
|
733
|
-
});
|
|
734
|
-
const x = () => {
|
|
735
|
-
K(() => {
|
|
736
|
-
var t, o;
|
|
737
|
-
if (!c.value)
|
|
738
|
-
return;
|
|
739
|
-
const d = c.value.$el.querySelector("input");
|
|
740
|
-
k = k || (d.clientHeight > 0 ? d.clientHeight + 2 : 0);
|
|
741
|
-
const g = b.value, A = kt(ve.value || (z == null ? void 0 : z.size)), D = ve.value || A === k || k <= 0 ? A : k;
|
|
742
|
-
!(d.offsetParent === null) && (d.style.height = `${(l.selected.length === 0 ? D : Math.max(g ? g.clientHeight + (g.clientHeight > D ? 6 : 0) : 0, D)) - 2}px`), l.visible && Z.value !== !1 && ((o = (t = a.value) == null ? void 0 : t.updatePopper) == null || o.call(t));
|
|
743
|
-
});
|
|
744
|
-
}, re = async (t) => {
|
|
745
|
-
if (!(l.previousQuery === t || l.isOnComposition)) {
|
|
746
|
-
if (l.previousQuery === null && (ge(e.filterMethod) || ge(e.remoteMethod))) {
|
|
747
|
-
l.previousQuery = t;
|
|
748
|
-
return;
|
|
749
|
-
}
|
|
750
|
-
l.previousQuery = t, K(() => {
|
|
751
|
-
var o, d;
|
|
752
|
-
l.visible && ((d = (o = a.value) == null ? void 0 : o.updatePopper) == null || d.call(o));
|
|
753
|
-
}), l.hoverIndex = -1, e.multiple && e.filterable && K(() => {
|
|
754
|
-
const o = r.value.value.length * 15 + 20;
|
|
755
|
-
l.inputLength = e.collapseTags ? Math.min(50, o) : o, Ae(), x();
|
|
756
|
-
}), e.remote && ge(e.remoteMethod) ? (l.hoverIndex = -1, e.remoteMethod(t)) : ge(e.filterMethod) ? (e.filterMethod(t), Ve(i)) : (l.filteredOptionsCount = l.optionsCount, L.value.query = t, Ve(L), Ve(i)), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && (await K(), De());
|
|
757
|
-
}
|
|
758
|
-
}, Ae = () => {
|
|
759
|
-
l.currentPlaceholder !== "" && (l.currentPlaceholder = r.value.value ? "" : l.cachedPlaceHolder);
|
|
760
|
-
}, De = () => {
|
|
761
|
-
const t = V.value.filter((g) => g.visible && !g.disabled && !g.states.groupDisabled), o = t.find((g) => g.created), d = t[0];
|
|
762
|
-
l.hoverIndex = Ne(V.value, o || d);
|
|
763
|
-
}, Le = () => {
|
|
764
|
-
var t;
|
|
765
|
-
if (e.multiple)
|
|
766
|
-
l.selectedLabel = "";
|
|
767
|
-
else {
|
|
768
|
-
const d = Ke(e.modelValue);
|
|
769
|
-
(t = d.props) != null && t.created ? (l.createdLabel = d.props.value, l.createdSelected = !0) : l.createdSelected = !1, l.selectedLabel = d.currentLabel, l.selected = d, e.filterable && (l.query = l.selectedLabel);
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
const o = [];
|
|
773
|
-
Array.isArray(e.modelValue) && e.modelValue.forEach((d) => {
|
|
774
|
-
o.push(Ke(d));
|
|
775
|
-
}), l.selected = o, K(() => {
|
|
776
|
-
x();
|
|
777
|
-
});
|
|
778
|
-
}, Ke = (t) => {
|
|
779
|
-
let o;
|
|
780
|
-
const d = Ol(t).toLowerCase() === "object", g = Ol(t).toLowerCase() === "null", A = Ol(t).toLowerCase() === "undefined";
|
|
781
|
-
for (let ne = l.cachedOptions.size - 1; ne >= 0; ne--) {
|
|
782
|
-
const j = el.value[ne];
|
|
783
|
-
if (d ? Y(j.value, e.valueKey) === Y(t, e.valueKey) : j.value === t) {
|
|
784
|
-
o = {
|
|
785
|
-
value: t,
|
|
786
|
-
currentLabel: j.currentLabel,
|
|
787
|
-
isDisabled: j.isDisabled
|
|
788
|
-
};
|
|
789
|
-
break;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
if (o)
|
|
793
|
-
return o;
|
|
794
|
-
const D = d ? t.label : !g && !A ? t : "", te = {
|
|
795
|
-
value: t,
|
|
796
|
-
currentLabel: D
|
|
797
|
-
};
|
|
798
|
-
return e.multiple && (te.hitState = !1), te;
|
|
799
|
-
}, ol = () => {
|
|
800
|
-
setTimeout(() => {
|
|
801
|
-
const t = e.valueKey;
|
|
802
|
-
e.multiple ? l.selected.length > 0 ? l.hoverIndex = Math.min.apply(null, l.selected.map((o) => V.value.findIndex((d) => Y(d, t) === Y(o, t)))) : l.hoverIndex = -1 : l.hoverIndex = V.value.findIndex((o) => Ce(o) === Ce(l.selected));
|
|
803
|
-
}, 300);
|
|
804
|
-
}, il = () => {
|
|
805
|
-
var t, o;
|
|
806
|
-
al(), (o = (t = a.value) == null ? void 0 : t.updatePopper) == null || o.call(t), e.multiple && x();
|
|
807
|
-
}, al = () => {
|
|
808
|
-
var t;
|
|
809
|
-
l.inputWidth = (t = c.value) == null ? void 0 : t.$el.offsetWidth;
|
|
810
|
-
}, rl = () => {
|
|
811
|
-
e.filterable && l.query !== l.selectedLabel && (l.query = l.selectedLabel, re(l.query));
|
|
812
|
-
}, sl = Nl(() => {
|
|
813
|
-
rl();
|
|
814
|
-
}, J.value), ul = Nl((t) => {
|
|
815
|
-
re(t.target.value);
|
|
816
|
-
}, J.value), me = (t) => {
|
|
817
|
-
Wl(e.modelValue, t) || n.emit(Xl, t);
|
|
818
|
-
}, ke = (t) => {
|
|
819
|
-
if (t.code !== Al.delete) {
|
|
820
|
-
if (t.target.value.length <= 0 && !ze()) {
|
|
821
|
-
const o = e.modelValue.slice();
|
|
822
|
-
o.pop(), n.emit(fe, o), me(o);
|
|
823
|
-
}
|
|
824
|
-
t.target.value.length === 1 && e.modelValue.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
|
|
825
|
-
}
|
|
826
|
-
}, Re = (t, o) => {
|
|
827
|
-
const d = l.selected.indexOf(o);
|
|
828
|
-
if (d > -1 && !F.value) {
|
|
829
|
-
const g = e.modelValue.slice();
|
|
830
|
-
g.splice(d, 1), n.emit(fe, g), me(g), n.emit("remove-tag", o.value);
|
|
831
|
-
}
|
|
832
|
-
t.stopPropagation(), ye();
|
|
833
|
-
}, We = (t) => {
|
|
834
|
-
t.stopPropagation();
|
|
835
|
-
const o = e.multiple ? [] : "";
|
|
836
|
-
if (!xl(o))
|
|
837
|
-
for (const d of l.selected)
|
|
838
|
-
d.isDisabled && o.push(d.value);
|
|
839
|
-
n.emit(fe, o), me(o), l.hoverIndex = -1, l.visible = !1, n.emit("clear"), ye();
|
|
840
|
-
}, Ie = (t) => {
|
|
841
|
-
var o;
|
|
842
|
-
if (e.multiple) {
|
|
843
|
-
const d = (e.modelValue || []).slice(), g = Ne(d, t.value);
|
|
844
|
-
g > -1 ? d.splice(g, 1) : (e.multipleLimit <= 0 || d.length < e.multipleLimit) && d.push(t.value), n.emit(fe, d), me(d), t.created && (l.query = "", re(""), l.inputLength = 20), e.filterable && ((o = r.value) == null || o.focus());
|
|
845
|
-
} else
|
|
846
|
-
n.emit(fe, t.value), me(t.value), l.visible = !1;
|
|
847
|
-
dl(), !l.visible && K(() => {
|
|
848
|
-
se(t);
|
|
849
|
-
});
|
|
850
|
-
}, Ne = (t = [], o) => {
|
|
851
|
-
if (!kl(o))
|
|
852
|
-
return t.indexOf(o);
|
|
853
|
-
const d = e.valueKey;
|
|
854
|
-
let g = -1;
|
|
855
|
-
return t.some((A, D) => Xe(Y(A, d)) === Y(o, d) ? (g = D, !0) : !1), g;
|
|
856
|
-
}, dl = () => {
|
|
857
|
-
const t = r.value || c.value;
|
|
858
|
-
t && (t == null || t.focus());
|
|
859
|
-
}, se = (t) => {
|
|
860
|
-
var o, d, g, A, D;
|
|
861
|
-
const te = Array.isArray(t) ? t[0] : t;
|
|
862
|
-
let ne = null;
|
|
863
|
-
if (te != null && te.value) {
|
|
864
|
-
const j = V.value.filter((wl) => wl.value === te.value);
|
|
865
|
-
j.length > 0 && (ne = j[0].$el);
|
|
866
|
-
}
|
|
867
|
-
if (a.value && ne) {
|
|
868
|
-
const j = (A = (g = (d = (o = a.value) == null ? void 0 : o.popperRef) == null ? void 0 : d.contentRef) == null ? void 0 : g.querySelector) == null ? void 0 : A.call(g, `.${u.be("dropdown", "wrap")}`);
|
|
869
|
-
j && Lt(j, ne);
|
|
870
|
-
}
|
|
871
|
-
(D = I.value) == null || D.handleScroll();
|
|
872
|
-
}, cl = (t) => {
|
|
873
|
-
l.optionsCount++, l.filteredOptionsCount++, l.options.set(t.value, t), l.cachedOptions.set(t.value, t);
|
|
874
|
-
}, fl = (t, o) => {
|
|
875
|
-
l.options.get(t) === o && (l.optionsCount--, l.filteredOptionsCount--, l.options.delete(t));
|
|
876
|
-
}, pl = (t) => {
|
|
877
|
-
t.code !== Al.backspace && ze(!1), l.inputLength = r.value.value.length * 15 + 20, x();
|
|
878
|
-
}, ze = (t) => {
|
|
879
|
-
if (!Array.isArray(l.selected))
|
|
880
|
-
return;
|
|
881
|
-
const o = l.selected[l.selected.length - 1];
|
|
882
|
-
if (o)
|
|
883
|
-
return t === !0 || t === !1 ? (o.hitState = t, t) : (o.hitState = !o.hitState, o.hitState);
|
|
884
|
-
}, vl = (t) => {
|
|
885
|
-
const o = t.target.value;
|
|
886
|
-
if (t.type === "compositionend")
|
|
887
|
-
l.isOnComposition = !1, K(() => re(o));
|
|
888
|
-
else {
|
|
889
|
-
const d = o[o.length - 1] || "";
|
|
890
|
-
l.isOnComposition = !st(d);
|
|
891
|
-
}
|
|
892
|
-
}, ml = () => {
|
|
893
|
-
K(() => se(l.selected));
|
|
894
|
-
}, hl = (t) => {
|
|
895
|
-
l.focused || ((e.automaticDropdown || e.filterable) && (e.filterable && !l.visible && (l.menuVisibleOnFocus = !0), l.visible = !0), l.focused = !0, n.emit("focus", t));
|
|
896
|
-
}, ye = () => {
|
|
897
|
-
var t, o;
|
|
898
|
-
l.visible ? (t = r.value || c.value) == null || t.focus() : (o = c.value) == null || o.focus();
|
|
899
|
-
}, le = () => {
|
|
900
|
-
var t, o, d;
|
|
901
|
-
l.visible = !1, (t = c.value) == null || t.blur(), (d = (o = p.value) == null ? void 0 : o.blur) == null || d.call(o);
|
|
902
|
-
}, Me = (t) => {
|
|
903
|
-
var o, d, g;
|
|
904
|
-
(o = a.value) != null && o.isFocusInsideContent(t) || (d = C.value) != null && d.isFocusInsideContent(t) || (g = f.value) != null && g.contains(t.relatedTarget) || (l.visible && Se(), l.focused = !1, n.emit("blur", t));
|
|
905
|
-
}, qe = (t) => {
|
|
906
|
-
We(t);
|
|
907
|
-
}, Se = () => {
|
|
908
|
-
l.visible = !1;
|
|
909
|
-
}, gl = (t) => {
|
|
910
|
-
l.visible && (t.preventDefault(), t.stopPropagation(), l.visible = !1);
|
|
911
|
-
}, Fe = (t) => {
|
|
912
|
-
t && !l.mouseEnter || F.value || (l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : (!a.value || !a.value.isFocusInsideContent()) && (l.visible = !l.visible), ye());
|
|
913
|
-
}, je = () => {
|
|
914
|
-
l.visible ? V.value[l.hoverIndex] && Ie(V.value[l.hoverIndex]) : Fe();
|
|
915
|
-
}, Ce = (t) => kl(t.value) ? Y(t.value, e.valueKey) : t.value, bl = m(() => V.value.filter((t) => t.visible).every((t) => t.disabled)), Pe = m(() => l.selected.slice(0, e.maxCollapseTags)), yl = m(() => l.selected.slice(e.maxCollapseTags)), Qe = (t) => {
|
|
916
|
-
if (!l.visible) {
|
|
917
|
-
l.visible = !0;
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
|
-
if (!(l.options.size === 0 || l.filteredOptionsCount === 0) && !l.isOnComposition && !bl.value) {
|
|
921
|
-
t === "next" ? (l.hoverIndex++, l.hoverIndex === l.options.size && (l.hoverIndex = 0)) : t === "prev" && (l.hoverIndex--, l.hoverIndex < 0 && (l.hoverIndex = l.options.size - 1));
|
|
922
|
-
const o = V.value[l.hoverIndex];
|
|
923
|
-
(o.disabled === !0 || o.states.groupDisabled === !0 || !o.visible) && Qe(t), K(() => se(E.value));
|
|
924
|
-
}
|
|
925
|
-
}, Ue = () => {
|
|
926
|
-
l.mouseEnter = !0;
|
|
927
|
-
}, Sl = () => {
|
|
928
|
-
l.mouseEnter = !1;
|
|
929
|
-
}, Cl = (t, o) => {
|
|
930
|
-
var d, g;
|
|
931
|
-
Re(t, o), (g = (d = C.value) == null ? void 0 : d.updatePopper) == null || g.call(d);
|
|
932
|
-
}, we = m(() => ({
|
|
933
|
-
maxWidth: `${h(l.inputWidth) - 32 - (U.value ? 22 : 0)}px`,
|
|
934
|
-
width: "100%"
|
|
935
|
-
}));
|
|
936
|
-
return {
|
|
937
|
-
optionList: w,
|
|
938
|
-
optionsArray: V,
|
|
939
|
-
selectSize: ve,
|
|
940
|
-
handleResize: il,
|
|
941
|
-
debouncedOnInputChange: sl,
|
|
942
|
-
debouncedQueryChange: ul,
|
|
943
|
-
deletePrevTag: ke,
|
|
944
|
-
deleteTag: Re,
|
|
945
|
-
deleteSelected: We,
|
|
946
|
-
handleOptionSelect: Ie,
|
|
947
|
-
scrollToOption: se,
|
|
948
|
-
readonly: ae,
|
|
949
|
-
resetInputHeight: x,
|
|
950
|
-
showClose: T,
|
|
951
|
-
iconComponent: v,
|
|
952
|
-
iconReverse: P,
|
|
953
|
-
showNewOption: ll,
|
|
954
|
-
collapseTagSize: tl,
|
|
955
|
-
setSelected: Le,
|
|
956
|
-
managePlaceholder: Ae,
|
|
957
|
-
selectDisabled: F,
|
|
958
|
-
emptyText: Z,
|
|
959
|
-
toggleLastOptionHitState: ze,
|
|
960
|
-
resetInputState: pl,
|
|
961
|
-
handleComposition: vl,
|
|
962
|
-
onOptionCreate: cl,
|
|
963
|
-
onOptionDestroy: fl,
|
|
964
|
-
handleMenuEnter: ml,
|
|
965
|
-
handleFocus: hl,
|
|
966
|
-
focus: ye,
|
|
967
|
-
blur: le,
|
|
968
|
-
handleBlur: Me,
|
|
969
|
-
handleClearClick: qe,
|
|
970
|
-
handleClose: Se,
|
|
971
|
-
handleKeydownEscape: gl,
|
|
972
|
-
toggleMenu: Fe,
|
|
973
|
-
selectOption: je,
|
|
974
|
-
getValueKey: Ce,
|
|
975
|
-
navigateOptions: Qe,
|
|
976
|
-
handleDeleteTooltipTag: Cl,
|
|
977
|
-
dropMenuVisible: nl,
|
|
978
|
-
queryChange: L,
|
|
979
|
-
groupQueryChange: i,
|
|
980
|
-
showTagList: Pe,
|
|
981
|
-
collapseTagList: yl,
|
|
982
|
-
selectTagsStyle: we,
|
|
983
|
-
reference: c,
|
|
984
|
-
input: r,
|
|
985
|
-
iOSInput: p,
|
|
986
|
-
tooltipRef: a,
|
|
987
|
-
tagTooltipRef: C,
|
|
988
|
-
tags: b,
|
|
989
|
-
selectWrapper: f,
|
|
990
|
-
scrollbar: I,
|
|
991
|
-
handleMouseEnter: Ue,
|
|
992
|
-
handleMouseLeave: Sl
|
|
993
|
-
};
|
|
994
|
-
}, an = X({
|
|
995
|
-
name: "ElOptions",
|
|
996
|
-
emits: ["update-options"],
|
|
997
|
-
setup(e, { slots: l, emit: n }) {
|
|
998
|
-
let s = [];
|
|
999
|
-
function u(c, r) {
|
|
1000
|
-
if (c.length !== r.length)
|
|
1001
|
-
return !1;
|
|
1002
|
-
for (const [p] of c.entries())
|
|
1003
|
-
if (c[p] != r[p])
|
|
1004
|
-
return !1;
|
|
1005
|
-
return !0;
|
|
1006
|
-
}
|
|
1007
|
-
return () => {
|
|
1008
|
-
var c, r;
|
|
1009
|
-
const p = (c = l.default) == null ? void 0 : c.call(l), a = [];
|
|
1010
|
-
function C(b) {
|
|
1011
|
-
Array.isArray(b) && b.forEach((f) => {
|
|
1012
|
-
var I, E, L, i;
|
|
1013
|
-
const w = (I = (f == null ? void 0 : f.type) || {}) == null ? void 0 : I.name;
|
|
1014
|
-
w === "ElOptionGroup" ? C(!xl(f.children) && !Array.isArray(f.children) && ge((E = f.children) == null ? void 0 : E.default) ? (L = f.children) == null ? void 0 : L.default() : f.children) : w === "ElOption" ? a.push((i = f.props) == null ? void 0 : i.label) : Array.isArray(f.children) && C(f.children);
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
return p.length && C((r = p[0]) == null ? void 0 : r.children), u(a, s) || (s = a, n("update-options", a)), p;
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
}), Gl = "ElSelect", rn = X({
|
|
1021
|
-
name: Gl,
|
|
1022
|
-
componentName: Gl,
|
|
1023
|
-
components: {
|
|
1024
|
-
ElInput: rt,
|
|
1025
|
-
ElSelectMenu: tn,
|
|
1026
|
-
ElOption: $l,
|
|
1027
|
-
ElOptions: an,
|
|
1028
|
-
ElTag: Jt,
|
|
1029
|
-
ElScrollbar: Qt,
|
|
1030
|
-
ElTooltip: ot,
|
|
1031
|
-
ElIcon: El
|
|
1032
|
-
},
|
|
1033
|
-
directives: { ClickOutside: zt },
|
|
1034
|
-
props: {
|
|
1035
|
-
name: String,
|
|
1036
|
-
id: String,
|
|
1037
|
-
modelValue: {
|
|
1038
|
-
type: [Array, String, Number, Boolean, Object],
|
|
1039
|
-
default: void 0
|
|
1040
|
-
},
|
|
1041
|
-
autocomplete: {
|
|
1042
|
-
type: String,
|
|
1043
|
-
default: "off"
|
|
1044
|
-
},
|
|
1045
|
-
automaticDropdown: Boolean,
|
|
1046
|
-
size: {
|
|
1047
|
-
type: String,
|
|
1048
|
-
validator: It
|
|
1049
|
-
},
|
|
1050
|
-
effect: {
|
|
1051
|
-
type: String,
|
|
1052
|
-
default: "light"
|
|
1053
|
-
},
|
|
1054
|
-
disabled: Boolean,
|
|
1055
|
-
clearable: Boolean,
|
|
1056
|
-
filterable: Boolean,
|
|
1057
|
-
allowCreate: Boolean,
|
|
1058
|
-
loading: Boolean,
|
|
1059
|
-
popperClass: {
|
|
1060
|
-
type: String,
|
|
1061
|
-
default: ""
|
|
1062
|
-
},
|
|
1063
|
-
popperOptions: {
|
|
1064
|
-
type: Object,
|
|
1065
|
-
default: () => ({})
|
|
1066
|
-
},
|
|
1067
|
-
remote: Boolean,
|
|
1068
|
-
loadingText: String,
|
|
1069
|
-
noMatchText: String,
|
|
1070
|
-
noDataText: String,
|
|
1071
|
-
remoteMethod: Function,
|
|
1072
|
-
filterMethod: Function,
|
|
1073
|
-
multiple: Boolean,
|
|
1074
|
-
multipleLimit: {
|
|
1075
|
-
type: Number,
|
|
1076
|
-
default: 0
|
|
1077
|
-
},
|
|
1078
|
-
placeholder: {
|
|
1079
|
-
type: String
|
|
1080
|
-
},
|
|
1081
|
-
defaultFirstOption: Boolean,
|
|
1082
|
-
reserveKeyword: {
|
|
1083
|
-
type: Boolean,
|
|
1084
|
-
default: !0
|
|
1085
|
-
},
|
|
1086
|
-
valueKey: {
|
|
1087
|
-
type: String,
|
|
1088
|
-
default: "value"
|
|
1089
|
-
},
|
|
1090
|
-
collapseTags: Boolean,
|
|
1091
|
-
collapseTagsTooltip: {
|
|
1092
|
-
type: Boolean,
|
|
1093
|
-
default: !1
|
|
1094
|
-
},
|
|
1095
|
-
maxCollapseTags: {
|
|
1096
|
-
type: Number,
|
|
1097
|
-
default: 1
|
|
1098
|
-
},
|
|
1099
|
-
teleported: it.teleported,
|
|
1100
|
-
persistent: {
|
|
1101
|
-
type: Boolean,
|
|
1102
|
-
default: !0
|
|
1103
|
-
},
|
|
1104
|
-
clearIcon: {
|
|
1105
|
-
type: Kl,
|
|
1106
|
-
default: ct
|
|
1107
|
-
},
|
|
1108
|
-
fitInputWidth: {
|
|
1109
|
-
type: Boolean,
|
|
1110
|
-
default: !1
|
|
1111
|
-
},
|
|
1112
|
-
suffixIcon: {
|
|
1113
|
-
type: Kl,
|
|
1114
|
-
default: ft
|
|
1115
|
-
},
|
|
1116
|
-
tagType: { ...lt.type, default: "info" },
|
|
1117
|
-
validateEvent: {
|
|
1118
|
-
type: Boolean,
|
|
1119
|
-
default: !0
|
|
1120
|
-
},
|
|
1121
|
-
remoteShowSuffix: {
|
|
1122
|
-
type: Boolean,
|
|
1123
|
-
default: !1
|
|
1124
|
-
},
|
|
1125
|
-
suffixTransition: {
|
|
1126
|
-
type: Boolean,
|
|
1127
|
-
default: !0
|
|
1128
|
-
},
|
|
1129
|
-
placement: {
|
|
1130
|
-
type: String,
|
|
1131
|
-
values: at,
|
|
1132
|
-
default: "bottom-start"
|
|
1133
|
-
}
|
|
1134
|
-
},
|
|
1135
|
-
emits: [
|
|
1136
|
-
fe,
|
|
1137
|
-
Xl,
|
|
1138
|
-
"remove-tag",
|
|
1139
|
-
"clear",
|
|
1140
|
-
"visible-change",
|
|
1141
|
-
"focus",
|
|
1142
|
-
"blur"
|
|
1143
|
-
],
|
|
1144
|
-
setup(e, l) {
|
|
1145
|
-
const n = ie("select"), s = ie("input"), { t: u } = zl(), c = nn(e), {
|
|
1146
|
-
optionList: r,
|
|
1147
|
-
optionsArray: p,
|
|
1148
|
-
selectSize: a,
|
|
1149
|
-
readonly: C,
|
|
1150
|
-
handleResize: b,
|
|
1151
|
-
collapseTagSize: f,
|
|
1152
|
-
debouncedOnInputChange: I,
|
|
1153
|
-
debouncedQueryChange: E,
|
|
1154
|
-
deletePrevTag: L,
|
|
1155
|
-
deleteTag: i,
|
|
1156
|
-
deleteSelected: w,
|
|
1157
|
-
handleOptionSelect: k,
|
|
1158
|
-
scrollToOption: z,
|
|
1159
|
-
setSelected: N,
|
|
1160
|
-
resetInputHeight: ae,
|
|
1161
|
-
managePlaceholder: F,
|
|
1162
|
-
showClose: T,
|
|
1163
|
-
selectDisabled: v,
|
|
1164
|
-
iconComponent: P,
|
|
1165
|
-
iconReverse: U,
|
|
1166
|
-
showNewOption: J,
|
|
1167
|
-
emptyText: Z,
|
|
1168
|
-
toggleLastOptionHitState: V,
|
|
1169
|
-
resetInputState: el,
|
|
1170
|
-
handleComposition: ll,
|
|
1171
|
-
onOptionCreate: ve,
|
|
1172
|
-
onOptionDestroy: tl,
|
|
1173
|
-
handleMenuEnter: nl,
|
|
1174
|
-
handleFocus: x,
|
|
1175
|
-
focus: re,
|
|
1176
|
-
blur: Ae,
|
|
1177
|
-
handleBlur: De,
|
|
1178
|
-
handleClearClick: Le,
|
|
1179
|
-
handleClose: Ke,
|
|
1180
|
-
handleKeydownEscape: ol,
|
|
1181
|
-
toggleMenu: il,
|
|
1182
|
-
selectOption: al,
|
|
1183
|
-
getValueKey: rl,
|
|
1184
|
-
navigateOptions: sl,
|
|
1185
|
-
handleDeleteTooltipTag: ul,
|
|
1186
|
-
dropMenuVisible: me,
|
|
1187
|
-
reference: ke,
|
|
1188
|
-
input: Re,
|
|
1189
|
-
iOSInput: We,
|
|
1190
|
-
tooltipRef: Ie,
|
|
1191
|
-
tagTooltipRef: Ne,
|
|
1192
|
-
tags: dl,
|
|
1193
|
-
selectWrapper: se,
|
|
1194
|
-
scrollbar: cl,
|
|
1195
|
-
queryChange: fl,
|
|
1196
|
-
groupQueryChange: pl,
|
|
1197
|
-
handleMouseEnter: ze,
|
|
1198
|
-
handleMouseLeave: vl,
|
|
1199
|
-
showTagList: ml,
|
|
1200
|
-
collapseTagList: hl,
|
|
1201
|
-
selectTagsStyle: ye
|
|
1202
|
-
} = on(e, c, l), {
|
|
1203
|
-
inputWidth: le,
|
|
1204
|
-
selected: Me,
|
|
1205
|
-
inputLength: qe,
|
|
1206
|
-
filteredOptionsCount: Se,
|
|
1207
|
-
visible: gl,
|
|
1208
|
-
selectedLabel: Fe,
|
|
1209
|
-
hoverIndex: je,
|
|
1210
|
-
query: Ce,
|
|
1211
|
-
inputHovering: bl,
|
|
1212
|
-
currentPlaceholder: Pe,
|
|
1213
|
-
menuVisibleOnFocus: yl,
|
|
1214
|
-
isOnComposition: Qe,
|
|
1215
|
-
options: Ue,
|
|
1216
|
-
cachedOptions: Sl,
|
|
1217
|
-
optionsCount: Cl,
|
|
1218
|
-
prefixWidth: we
|
|
1219
|
-
} = Bl(c), t = m(() => {
|
|
1220
|
-
const q = [n.b()], he = h(a);
|
|
1221
|
-
return he && q.push(n.m(he)), e.disabled && q.push(n.m("disabled")), q;
|
|
1222
|
-
}), o = m(() => [
|
|
1223
|
-
n.e("tags"),
|
|
1224
|
-
n.is("disabled", h(v))
|
|
1225
|
-
]), d = m(() => [
|
|
1226
|
-
n.b("tags-wrapper"),
|
|
1227
|
-
{ "has-prefix": h(we) && h(Me).length }
|
|
1228
|
-
]), g = m(() => [
|
|
1229
|
-
n.e("input"),
|
|
1230
|
-
n.is(h(a)),
|
|
1231
|
-
n.is("disabled", h(v))
|
|
1232
|
-
]), A = m(() => [
|
|
1233
|
-
n.e("input"),
|
|
1234
|
-
n.is(h(a)),
|
|
1235
|
-
n.em("input", "iOS")
|
|
1236
|
-
]), D = m(() => [
|
|
1237
|
-
n.is("empty", !e.allowCreate && !!h(Ce) && h(Se) === 0)
|
|
1238
|
-
]), te = m(() => ({ maxWidth: `${h(le) > 123 ? h(le) - 123 : h(le) - 75}px` })), ne = m(() => ({
|
|
1239
|
-
marginLeft: `${h(we)}px`,
|
|
1240
|
-
flexGrow: 1,
|
|
1241
|
-
width: `${h(qe) / (h(le) - 32)}%`,
|
|
1242
|
-
maxWidth: `${h(le) - 42}px`
|
|
1243
|
-
}));
|
|
1244
|
-
Vl(_e, $e({
|
|
1245
|
-
props: e,
|
|
1246
|
-
options: Ue,
|
|
1247
|
-
optionsArray: p,
|
|
1248
|
-
cachedOptions: Sl,
|
|
1249
|
-
optionsCount: Cl,
|
|
1250
|
-
filteredOptionsCount: Se,
|
|
1251
|
-
hoverIndex: je,
|
|
1252
|
-
handleOptionSelect: k,
|
|
1253
|
-
onOptionCreate: ve,
|
|
1254
|
-
onOptionDestroy: tl,
|
|
1255
|
-
selectWrapper: se,
|
|
1256
|
-
selected: Me,
|
|
1257
|
-
setSelected: N,
|
|
1258
|
-
queryChange: fl,
|
|
1259
|
-
groupQueryChange: pl
|
|
1260
|
-
})), Ze(() => {
|
|
1261
|
-
c.cachedPlaceHolder = Pe.value = e.placeholder || (() => u("el.select.placeholder")), e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (Pe.value = ""), Ml(se, b), e.remote && e.multiple && ae(), K(() => {
|
|
1262
|
-
const q = ke.value && ke.value.$el;
|
|
1263
|
-
if (q && (le.value = q.getBoundingClientRect().width, l.slots.prefix)) {
|
|
1264
|
-
const he = q.querySelector(`.${s.e("prefix")}`);
|
|
1265
|
-
we.value = Math.max(he.getBoundingClientRect().width + 11, 30);
|
|
1266
|
-
}
|
|
1267
|
-
}), N();
|
|
1268
|
-
}), e.multiple && !Array.isArray(e.modelValue) && l.emit(fe, []), !e.multiple && Array.isArray(e.modelValue) && l.emit(fe, "");
|
|
1269
|
-
const j = m(() => {
|
|
1270
|
-
var q, he;
|
|
1271
|
-
return (he = (q = Ie.value) == null ? void 0 : q.popperRef) == null ? void 0 : he.contentRef;
|
|
1272
|
-
});
|
|
1273
|
-
return {
|
|
1274
|
-
isIOS: vt,
|
|
1275
|
-
onOptionsRendered: (q) => {
|
|
1276
|
-
r.value = q;
|
|
1277
|
-
},
|
|
1278
|
-
prefixWidth: we,
|
|
1279
|
-
selectSize: a,
|
|
1280
|
-
readonly: C,
|
|
1281
|
-
handleResize: b,
|
|
1282
|
-
collapseTagSize: f,
|
|
1283
|
-
debouncedOnInputChange: I,
|
|
1284
|
-
debouncedQueryChange: E,
|
|
1285
|
-
deletePrevTag: L,
|
|
1286
|
-
deleteTag: i,
|
|
1287
|
-
handleDeleteTooltipTag: ul,
|
|
1288
|
-
deleteSelected: w,
|
|
1289
|
-
handleOptionSelect: k,
|
|
1290
|
-
scrollToOption: z,
|
|
1291
|
-
inputWidth: le,
|
|
1292
|
-
selected: Me,
|
|
1293
|
-
inputLength: qe,
|
|
1294
|
-
filteredOptionsCount: Se,
|
|
1295
|
-
visible: gl,
|
|
1296
|
-
selectedLabel: Fe,
|
|
1297
|
-
hoverIndex: je,
|
|
1298
|
-
query: Ce,
|
|
1299
|
-
inputHovering: bl,
|
|
1300
|
-
currentPlaceholder: Pe,
|
|
1301
|
-
menuVisibleOnFocus: yl,
|
|
1302
|
-
isOnComposition: Qe,
|
|
1303
|
-
options: Ue,
|
|
1304
|
-
resetInputHeight: ae,
|
|
1305
|
-
managePlaceholder: F,
|
|
1306
|
-
showClose: T,
|
|
1307
|
-
selectDisabled: v,
|
|
1308
|
-
iconComponent: P,
|
|
1309
|
-
iconReverse: U,
|
|
1310
|
-
showNewOption: J,
|
|
1311
|
-
emptyText: Z,
|
|
1312
|
-
toggleLastOptionHitState: V,
|
|
1313
|
-
resetInputState: el,
|
|
1314
|
-
handleComposition: ll,
|
|
1315
|
-
handleMenuEnter: nl,
|
|
1316
|
-
handleFocus: x,
|
|
1317
|
-
focus: re,
|
|
1318
|
-
blur: Ae,
|
|
1319
|
-
handleBlur: De,
|
|
1320
|
-
handleClearClick: Le,
|
|
1321
|
-
handleClose: Ke,
|
|
1322
|
-
handleKeydownEscape: ol,
|
|
1323
|
-
toggleMenu: il,
|
|
1324
|
-
selectOption: al,
|
|
1325
|
-
getValueKey: rl,
|
|
1326
|
-
navigateOptions: sl,
|
|
1327
|
-
dropMenuVisible: me,
|
|
1328
|
-
reference: ke,
|
|
1329
|
-
input: Re,
|
|
1330
|
-
iOSInput: We,
|
|
1331
|
-
tooltipRef: Ie,
|
|
1332
|
-
popperPaneRef: j,
|
|
1333
|
-
tags: dl,
|
|
1334
|
-
selectWrapper: se,
|
|
1335
|
-
scrollbar: cl,
|
|
1336
|
-
wrapperKls: t,
|
|
1337
|
-
tagsKls: o,
|
|
1338
|
-
tagWrapperKls: d,
|
|
1339
|
-
inputKls: g,
|
|
1340
|
-
iOSInputKls: A,
|
|
1341
|
-
scrollbarKls: D,
|
|
1342
|
-
selectTagsStyle: ye,
|
|
1343
|
-
nsSelect: n,
|
|
1344
|
-
tagTextStyle: te,
|
|
1345
|
-
inputStyle: ne,
|
|
1346
|
-
handleMouseEnter: ze,
|
|
1347
|
-
handleMouseLeave: vl,
|
|
1348
|
-
showTagList: ml,
|
|
1349
|
-
collapseTagList: hl,
|
|
1350
|
-
tagTooltipRef: Ne
|
|
1351
|
-
};
|
|
1352
|
-
}
|
|
1353
|
-
}), sn = ["disabled", "autocomplete"], un = ["disabled"], dn = { style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" } };
|
|
1354
|
-
function cn(e, l, n, s, u, c) {
|
|
1355
|
-
const r = ue("el-tag"), p = ue("el-tooltip"), a = ue("el-icon"), C = ue("el-input"), b = ue("el-option"), f = ue("el-options"), I = ue("el-scrollbar"), E = ue("el-select-menu"), L = wt("click-outside");
|
|
1356
|
-
return Ee((y(), H("div", {
|
|
1357
|
-
ref: "selectWrapper",
|
|
1358
|
-
class: S(e.wrapperKls),
|
|
1359
|
-
onMouseenter: l[22] || (l[22] = (...i) => e.handleMouseEnter && e.handleMouseEnter(...i)),
|
|
1360
|
-
onMouseleave: l[23] || (l[23] = (...i) => e.handleMouseLeave && e.handleMouseLeave(...i)),
|
|
1361
|
-
onClick: l[24] || (l[24] = _((...i) => e.toggleMenu && e.toggleMenu(...i), ["stop"]))
|
|
1362
|
-
}, [
|
|
1363
|
-
ee(p, {
|
|
1364
|
-
ref: "tooltipRef",
|
|
1365
|
-
visible: e.dropMenuVisible,
|
|
1366
|
-
placement: e.placement,
|
|
1367
|
-
teleported: e.teleported,
|
|
1368
|
-
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
1369
|
-
"popper-options": e.popperOptions,
|
|
1370
|
-
"fallback-placements": ["bottom-start", "top-start", "right", "left"],
|
|
1371
|
-
effect: e.effect,
|
|
1372
|
-
pure: "",
|
|
1373
|
-
trigger: "click",
|
|
1374
|
-
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
1375
|
-
"stop-popper-mouse-event": !1,
|
|
1376
|
-
"gpu-acceleration": !1,
|
|
1377
|
-
persistent: e.persistent,
|
|
1378
|
-
onShow: e.handleMenuEnter
|
|
1379
|
-
}, {
|
|
1380
|
-
default: M(() => [
|
|
1381
|
-
B("div", {
|
|
1382
|
-
class: "select-trigger",
|
|
1383
|
-
onMouseenter: l[20] || (l[20] = (i) => e.inputHovering = !0),
|
|
1384
|
-
onMouseleave: l[21] || (l[21] = (i) => e.inputHovering = !1)
|
|
1385
|
-
}, [
|
|
1386
|
-
e.multiple ? (y(), H("div", {
|
|
1387
|
-
key: 0,
|
|
1388
|
-
ref: "tags",
|
|
1389
|
-
tabindex: "-1",
|
|
1390
|
-
class: S(e.tagsKls),
|
|
1391
|
-
style: Q(e.selectTagsStyle),
|
|
1392
|
-
onClick: l[15] || (l[15] = (...i) => e.focus && e.focus(...i))
|
|
1393
|
-
}, [
|
|
1394
|
-
e.collapseTags && e.selected.length ? (y(), $(Ye, {
|
|
1395
|
-
key: 0,
|
|
1396
|
-
onAfterLeave: e.resetInputHeight
|
|
1397
|
-
}, {
|
|
1398
|
-
default: M(() => [
|
|
1399
|
-
B("span", {
|
|
1400
|
-
class: S(e.tagWrapperKls)
|
|
1401
|
-
}, [
|
|
1402
|
-
(y(!0), H(Be, null, Tl(e.showTagList, (i) => (y(), $(r, {
|
|
1403
|
-
key: e.getValueKey(i),
|
|
1404
|
-
closable: !e.selectDisabled && !i.isDisabled,
|
|
1405
|
-
size: e.collapseTagSize,
|
|
1406
|
-
hit: i.hitState,
|
|
1407
|
-
type: e.tagType,
|
|
1408
|
-
"disable-transitions": "",
|
|
1409
|
-
onClose: (w) => e.deleteTag(w, i)
|
|
1410
|
-
}, {
|
|
1411
|
-
default: M(() => [
|
|
1412
|
-
B("span", {
|
|
1413
|
-
class: S(e.nsSelect.e("tags-text")),
|
|
1414
|
-
style: Q(e.tagTextStyle)
|
|
1415
|
-
}, ce(i.currentLabel), 7)
|
|
1416
|
-
]),
|
|
1417
|
-
_: 2
|
|
1418
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128)),
|
|
1419
|
-
e.selected.length > e.maxCollapseTags ? (y(), $(r, {
|
|
1420
|
-
key: 0,
|
|
1421
|
-
closable: !1,
|
|
1422
|
-
size: e.collapseTagSize,
|
|
1423
|
-
type: e.tagType,
|
|
1424
|
-
"disable-transitions": ""
|
|
1425
|
-
}, {
|
|
1426
|
-
default: M(() => [
|
|
1427
|
-
e.collapseTagsTooltip ? (y(), $(p, {
|
|
1428
|
-
key: 0,
|
|
1429
|
-
ref: "tagTooltipRef",
|
|
1430
|
-
disabled: e.dropMenuVisible,
|
|
1431
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
1432
|
-
effect: e.effect,
|
|
1433
|
-
placement: "bottom",
|
|
1434
|
-
teleported: e.teleported
|
|
1435
|
-
}, {
|
|
1436
|
-
default: M(() => [
|
|
1437
|
-
B("span", {
|
|
1438
|
-
class: S(e.nsSelect.e("tags-text"))
|
|
1439
|
-
}, "+ " + ce(e.selected.length - e.maxCollapseTags), 3)
|
|
1440
|
-
]),
|
|
1441
|
-
content: M(() => [
|
|
1442
|
-
B("div", {
|
|
1443
|
-
class: S(e.nsSelect.e("collapse-tags"))
|
|
1444
|
-
}, [
|
|
1445
|
-
(y(!0), H(Be, null, Tl(e.collapseTagList, (i) => (y(), H("div", {
|
|
1446
|
-
key: e.getValueKey(i),
|
|
1447
|
-
class: S(e.nsSelect.e("collapse-tag"))
|
|
1448
|
-
}, [
|
|
1449
|
-
ee(r, {
|
|
1450
|
-
class: "in-tooltip",
|
|
1451
|
-
closable: !e.selectDisabled && !i.isDisabled,
|
|
1452
|
-
size: e.collapseTagSize,
|
|
1453
|
-
hit: i.hitState,
|
|
1454
|
-
type: e.tagType,
|
|
1455
|
-
"disable-transitions": "",
|
|
1456
|
-
style: { margin: "2px" },
|
|
1457
|
-
onClose: (w) => e.handleDeleteTooltipTag(w, i)
|
|
1458
|
-
}, {
|
|
1459
|
-
default: M(() => [
|
|
1460
|
-
B("span", {
|
|
1461
|
-
class: S(e.nsSelect.e("tags-text")),
|
|
1462
|
-
style: Q({
|
|
1463
|
-
maxWidth: e.inputWidth - 75 + "px"
|
|
1464
|
-
})
|
|
1465
|
-
}, ce(i.currentLabel), 7)
|
|
1466
|
-
]),
|
|
1467
|
-
_: 2
|
|
1468
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"])
|
|
1469
|
-
], 2))), 128))
|
|
1470
|
-
], 2)
|
|
1471
|
-
]),
|
|
1472
|
-
_: 1
|
|
1473
|
-
}, 8, ["disabled", "effect", "teleported"])) : (y(), H("span", {
|
|
1474
|
-
key: 1,
|
|
1475
|
-
class: S(e.nsSelect.e("tags-text"))
|
|
1476
|
-
}, "+ " + ce(e.selected.length - e.maxCollapseTags), 3))
|
|
1477
|
-
]),
|
|
1478
|
-
_: 1
|
|
1479
|
-
}, 8, ["size", "type"])) : R("v-if", !0)
|
|
1480
|
-
], 2)
|
|
1481
|
-
]),
|
|
1482
|
-
_: 1
|
|
1483
|
-
}, 8, ["onAfterLeave"])) : R("v-if", !0),
|
|
1484
|
-
e.collapseTags ? R("v-if", !0) : (y(), $(Ye, {
|
|
1485
|
-
key: 1,
|
|
1486
|
-
onAfterLeave: e.resetInputHeight
|
|
1487
|
-
}, {
|
|
1488
|
-
default: M(() => [
|
|
1489
|
-
B("span", {
|
|
1490
|
-
class: S(e.tagWrapperKls),
|
|
1491
|
-
style: Q(e.prefixWidth && e.selected.length ? { marginLeft: `${e.prefixWidth}px` } : "")
|
|
1492
|
-
}, [
|
|
1493
|
-
(y(!0), H(Be, null, Tl(e.selected, (i) => (y(), $(r, {
|
|
1494
|
-
key: e.getValueKey(i),
|
|
1495
|
-
closable: !e.selectDisabled && !i.isDisabled,
|
|
1496
|
-
size: e.collapseTagSize,
|
|
1497
|
-
hit: i.hitState,
|
|
1498
|
-
type: e.tagType,
|
|
1499
|
-
"disable-transitions": "",
|
|
1500
|
-
onClose: (w) => e.deleteTag(w, i)
|
|
1501
|
-
}, {
|
|
1502
|
-
default: M(() => [
|
|
1503
|
-
B("span", {
|
|
1504
|
-
class: S(e.nsSelect.e("tags-text")),
|
|
1505
|
-
style: Q({ maxWidth: e.inputWidth - 75 + "px" })
|
|
1506
|
-
}, ce(i.currentLabel), 7)
|
|
1507
|
-
]),
|
|
1508
|
-
_: 2
|
|
1509
|
-
}, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128))
|
|
1510
|
-
], 6)
|
|
1511
|
-
]),
|
|
1512
|
-
_: 1
|
|
1513
|
-
}, 8, ["onAfterLeave"])),
|
|
1514
|
-
e.filterable && !e.selectDisabled ? Ee((y(), H("input", {
|
|
1515
|
-
key: 2,
|
|
1516
|
-
ref: "input",
|
|
1517
|
-
"onUpdate:modelValue": l[0] || (l[0] = (i) => e.query = i),
|
|
1518
|
-
type: "text",
|
|
1519
|
-
class: S(e.inputKls),
|
|
1520
|
-
disabled: e.selectDisabled,
|
|
1521
|
-
autocomplete: e.autocomplete,
|
|
1522
|
-
style: Q(e.inputStyle),
|
|
1523
|
-
onFocus: l[1] || (l[1] = (...i) => e.handleFocus && e.handleFocus(...i)),
|
|
1524
|
-
onBlur: l[2] || (l[2] = (...i) => e.handleBlur && e.handleBlur(...i)),
|
|
1525
|
-
onKeyup: l[3] || (l[3] = (...i) => e.managePlaceholder && e.managePlaceholder(...i)),
|
|
1526
|
-
onKeydown: [
|
|
1527
|
-
l[4] || (l[4] = (...i) => e.resetInputState && e.resetInputState(...i)),
|
|
1528
|
-
l[5] || (l[5] = G(_((i) => e.navigateOptions("next"), ["prevent"]), ["down"])),
|
|
1529
|
-
l[6] || (l[6] = G(_((i) => e.navigateOptions("prev"), ["prevent"]), ["up"])),
|
|
1530
|
-
l[7] || (l[7] = G((...i) => e.handleKeydownEscape && e.handleKeydownEscape(...i), ["esc"])),
|
|
1531
|
-
l[8] || (l[8] = G(_((...i) => e.selectOption && e.selectOption(...i), ["stop", "prevent"]), ["enter"])),
|
|
1532
|
-
l[9] || (l[9] = G((...i) => e.deletePrevTag && e.deletePrevTag(...i), ["delete"])),
|
|
1533
|
-
l[10] || (l[10] = G((i) => e.visible = !1, ["tab"]))
|
|
1534
|
-
],
|
|
1535
|
-
onCompositionstart: l[11] || (l[11] = (...i) => e.handleComposition && e.handleComposition(...i)),
|
|
1536
|
-
onCompositionupdate: l[12] || (l[12] = (...i) => e.handleComposition && e.handleComposition(...i)),
|
|
1537
|
-
onCompositionend: l[13] || (l[13] = (...i) => e.handleComposition && e.handleComposition(...i)),
|
|
1538
|
-
onInput: l[14] || (l[14] = (...i) => e.debouncedQueryChange && e.debouncedQueryChange(...i))
|
|
1539
|
-
}, null, 46, sn)), [
|
|
1540
|
-
[Ot, e.query]
|
|
1541
|
-
]) : R("v-if", !0)
|
|
1542
|
-
], 6)) : R("v-if", !0),
|
|
1543
|
-
R(" fix: https://github.com/element-plus/element-plus/issues/11415 "),
|
|
1544
|
-
e.isIOS && !e.multiple && e.filterable && e.readonly ? (y(), H("input", {
|
|
1545
|
-
key: 1,
|
|
1546
|
-
ref: "iOSInput",
|
|
1547
|
-
class: S(e.iOSInputKls),
|
|
1548
|
-
disabled: e.selectDisabled,
|
|
1549
|
-
type: "text"
|
|
1550
|
-
}, null, 10, un)) : R("v-if", !0),
|
|
1551
|
-
ee(C, {
|
|
1552
|
-
id: e.id,
|
|
1553
|
-
ref: "reference",
|
|
1554
|
-
modelValue: e.selectedLabel,
|
|
1555
|
-
"onUpdate:modelValue": l[16] || (l[16] = (i) => e.selectedLabel = i),
|
|
1556
|
-
type: "text",
|
|
1557
|
-
placeholder: typeof e.currentPlaceholder == "function" ? e.currentPlaceholder() : e.currentPlaceholder,
|
|
1558
|
-
name: e.name,
|
|
1559
|
-
autocomplete: e.autocomplete,
|
|
1560
|
-
size: e.selectSize,
|
|
1561
|
-
disabled: e.selectDisabled,
|
|
1562
|
-
readonly: e.readonly,
|
|
1563
|
-
"validate-event": !1,
|
|
1564
|
-
class: S([e.nsSelect.is("focus", e.visible)]),
|
|
1565
|
-
tabindex: e.multiple && e.filterable ? -1 : void 0,
|
|
1566
|
-
onFocus: e.handleFocus,
|
|
1567
|
-
onBlur: e.handleBlur,
|
|
1568
|
-
onInput: e.debouncedOnInputChange,
|
|
1569
|
-
onPaste: e.debouncedOnInputChange,
|
|
1570
|
-
onCompositionstart: e.handleComposition,
|
|
1571
|
-
onCompositionupdate: e.handleComposition,
|
|
1572
|
-
onCompositionend: e.handleComposition,
|
|
1573
|
-
onKeydown: [
|
|
1574
|
-
l[17] || (l[17] = G(_((i) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
|
|
1575
|
-
l[18] || (l[18] = G(_((i) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
|
|
1576
|
-
G(_(e.selectOption, ["stop", "prevent"]), ["enter"]),
|
|
1577
|
-
G(e.handleKeydownEscape, ["esc"]),
|
|
1578
|
-
l[19] || (l[19] = G((i) => e.visible = !1, ["tab"]))
|
|
1579
|
-
]
|
|
1580
|
-
}, Tt({
|
|
1581
|
-
suffix: M(() => [
|
|
1582
|
-
e.iconComponent && !e.showClose ? (y(), $(a, {
|
|
1583
|
-
key: 0,
|
|
1584
|
-
class: S([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
|
|
1585
|
-
}, {
|
|
1586
|
-
default: M(() => [
|
|
1587
|
-
(y(), $(Il(e.iconComponent)))
|
|
1588
|
-
]),
|
|
1589
|
-
_: 1
|
|
1590
|
-
}, 8, ["class"])) : R("v-if", !0),
|
|
1591
|
-
e.showClose && e.clearIcon ? (y(), $(a, {
|
|
1592
|
-
key: 1,
|
|
1593
|
-
class: S([e.nsSelect.e("caret"), e.nsSelect.e("icon")]),
|
|
1594
|
-
onClick: e.handleClearClick
|
|
1595
|
-
}, {
|
|
1596
|
-
default: M(() => [
|
|
1597
|
-
(y(), $(Il(e.clearIcon)))
|
|
1598
|
-
]),
|
|
1599
|
-
_: 1
|
|
1600
|
-
}, 8, ["class", "onClick"])) : R("v-if", !0)
|
|
1601
|
-
]),
|
|
1602
|
-
_: 2
|
|
1603
|
-
}, [
|
|
1604
|
-
e.$slots.prefix ? {
|
|
1605
|
-
name: "prefix",
|
|
1606
|
-
fn: M(() => [
|
|
1607
|
-
B("div", dn, [
|
|
1608
|
-
oe(e.$slots, "prefix")
|
|
1609
|
-
])
|
|
1610
|
-
])
|
|
1611
|
-
} : void 0
|
|
1612
|
-
]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"])
|
|
1613
|
-
], 32)
|
|
1614
|
-
]),
|
|
1615
|
-
content: M(() => [
|
|
1616
|
-
ee(E, null, {
|
|
1617
|
-
default: M(() => [
|
|
1618
|
-
Ee(ee(I, {
|
|
1619
|
-
ref: "scrollbar",
|
|
1620
|
-
tag: "ul",
|
|
1621
|
-
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
|
|
1622
|
-
"view-class": e.nsSelect.be("dropdown", "list"),
|
|
1623
|
-
class: S(e.scrollbarKls)
|
|
1624
|
-
}, {
|
|
1625
|
-
default: M(() => [
|
|
1626
|
-
e.showNewOption ? (y(), $(b, {
|
|
1627
|
-
key: 0,
|
|
1628
|
-
value: e.query,
|
|
1629
|
-
created: !0
|
|
1630
|
-
}, null, 8, ["value"])) : R("v-if", !0),
|
|
1631
|
-
ee(f, { onUpdateOptions: e.onOptionsRendered }, {
|
|
1632
|
-
default: M(() => [
|
|
1633
|
-
oe(e.$slots, "default")
|
|
1634
|
-
]),
|
|
1635
|
-
_: 3
|
|
1636
|
-
}, 8, ["onUpdateOptions"])
|
|
1637
|
-
]),
|
|
1638
|
-
_: 3
|
|
1639
|
-
}, 8, ["wrap-class", "view-class", "class"]), [
|
|
1640
|
-
[xe, e.options.size > 0 && !e.loading]
|
|
1641
|
-
]),
|
|
1642
|
-
e.emptyText && (!e.allowCreate || e.loading || e.allowCreate && e.options.size === 0) ? (y(), H(Be, { key: 0 }, [
|
|
1643
|
-
e.$slots.empty ? oe(e.$slots, "empty", { key: 0 }) : (y(), H("p", {
|
|
1644
|
-
key: 1,
|
|
1645
|
-
class: S(e.nsSelect.be("dropdown", "empty"))
|
|
1646
|
-
}, ce(e.emptyText), 3))
|
|
1647
|
-
], 64)) : R("v-if", !0)
|
|
1648
|
-
]),
|
|
1649
|
-
_: 3
|
|
1650
|
-
})
|
|
1651
|
-
]),
|
|
1652
|
-
_: 3
|
|
1653
|
-
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "effect", "transition", "persistent", "onShow"])
|
|
1654
|
-
], 34)), [
|
|
1655
|
-
[L, e.handleClose, e.popperPaneRef]
|
|
1656
|
-
]);
|
|
1657
|
-
}
|
|
1658
|
-
var fn = /* @__PURE__ */ pe(rn, [["render", cn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]), pn = X({
|
|
1659
|
-
name: "ElOptionGroup",
|
|
1660
|
-
componentName: "ElOptionGroup",
|
|
1661
|
-
props: {
|
|
1662
|
-
label: String,
|
|
1663
|
-
disabled: {
|
|
1664
|
-
type: Boolean,
|
|
1665
|
-
default: !1
|
|
1666
|
-
}
|
|
1667
|
-
},
|
|
1668
|
-
setup(e) {
|
|
1669
|
-
const l = ie("select"), n = O(!0), s = Hl(), u = O([]);
|
|
1670
|
-
Vl(tt, $e({
|
|
1671
|
-
...Bl(e)
|
|
1672
|
-
}));
|
|
1673
|
-
const c = He(_e);
|
|
1674
|
-
Ze(() => {
|
|
1675
|
-
u.value = r(s.subTree);
|
|
1676
|
-
});
|
|
1677
|
-
const r = (a) => {
|
|
1678
|
-
const C = [];
|
|
1679
|
-
return Array.isArray(a.children) && a.children.forEach((b) => {
|
|
1680
|
-
var f;
|
|
1681
|
-
b.type && b.type.name === "ElOption" && b.component && b.component.proxy ? C.push(b.component.proxy) : (f = b.children) != null && f.length && C.push(...r(b));
|
|
1682
|
-
}), C;
|
|
1683
|
-
}, { groupQueryChange: p } = Xe(c);
|
|
1684
|
-
return W(p, () => {
|
|
1685
|
-
n.value = u.value.some((a) => a.visible === !0);
|
|
1686
|
-
}, { flush: "post" }), {
|
|
1687
|
-
visible: n,
|
|
1688
|
-
ns: l
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
});
|
|
1692
|
-
function vn(e, l, n, s, u, c) {
|
|
1693
|
-
return Ee((y(), H("ul", {
|
|
1694
|
-
class: S(e.ns.be("group", "wrap"))
|
|
1695
|
-
}, [
|
|
1696
|
-
B("li", {
|
|
1697
|
-
class: S(e.ns.be("group", "title"))
|
|
1698
|
-
}, ce(e.label), 3),
|
|
1699
|
-
B("li", null, [
|
|
1700
|
-
B("ul", {
|
|
1701
|
-
class: S(e.ns.b("group"))
|
|
1702
|
-
}, [
|
|
1703
|
-
oe(e.$slots, "default")
|
|
1704
|
-
], 2)
|
|
1705
|
-
])
|
|
1706
|
-
], 2)), [
|
|
1707
|
-
[xe, e.visible]
|
|
1708
|
-
]);
|
|
1709
|
-
}
|
|
1710
|
-
var nt = /* @__PURE__ */ pe(pn, [["render", vn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]), En = Pl(fn, {
|
|
1711
|
-
Option: $l,
|
|
1712
|
-
OptionGroup: nt
|
|
1713
|
-
}), Ln = Zl($l);
|
|
1714
|
-
Zl(nt);
|
|
1
|
+
const o = "";
|
|
1715
2
|
export {
|
|
1716
|
-
|
|
1717
|
-
zt as ClickOutside,
|
|
1718
|
-
Ln as ElOption,
|
|
1719
|
-
Qt as ElScrollbar,
|
|
1720
|
-
En as ElSelect,
|
|
1721
|
-
Jt as ElTag,
|
|
1722
|
-
Te as GAP,
|
|
1723
|
-
Tn as WEEK_DAYS,
|
|
1724
|
-
On as datePickTypes,
|
|
1725
|
-
wn as getScrollBarWidth,
|
|
1726
|
-
Cn as getScrollContainer,
|
|
1727
|
-
It as isValidComponentSize,
|
|
1728
|
-
Vt as renderThumbStyle,
|
|
1729
|
-
Lt as scrollIntoView,
|
|
1730
|
-
et as scrollbarContextKey,
|
|
1731
|
-
Wt as scrollbarEmits,
|
|
1732
|
-
Rt as scrollbarProps,
|
|
1733
|
-
tt as selectGroupKey,
|
|
1734
|
-
_e as selectKey,
|
|
1735
|
-
Ut as tagEmits,
|
|
1736
|
-
lt as tagProps,
|
|
1737
|
-
Bt as thumbProps,
|
|
1738
|
-
Mt as useDeprecated
|
|
3
|
+
o as default
|
|
1739
4
|
};
|