jmash-core 0.0.9 → 0.0.10
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/{401-C_jDuubo.mjs → 401-CHBVbzep.mjs} +13 -15
- package/dist/{404-D1KiG-19.mjs → 404-C06c3dKV.mjs} +1 -1
- package/dist/{BarChart-BiYcyOIt.mjs → BarChart-DMEOgtiK.mjs} +27 -30
- package/dist/{FileSaver.min-CpTDBPJB.mjs → FileSaver.min-QT2Ccp7G.mjs} +8 -8
- package/dist/{PieChart-DvQrr19I.mjs → PieChart-CR6Jny_5.mjs} +1 -1
- package/dist/{PieChart.vue_vue_type_script_setup_true_lang-DcF0vyqZ.mjs → PieChart.vue_vue_type_script_setup_true_lang-65SK3HKm.mjs} +2 -2
- package/dist/{RadarChart-DadH3Bsc.mjs → RadarChart-dAF4Lmnh.mjs} +1 -1
- package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-mZYAljbA.mjs → RadarChart.vue_vue_type_script_setup_true_lang-CugqBg8u.mjs} +2 -2
- package/dist/{caret-bottom-ByzDT72p.mjs → caret-bottom-DQsNMTCk.mjs} +1 -1
- package/dist/{edit-BZ3xqmLv.mjs → edit-BILFCR0k.mjs} +154 -164
- package/dist/{edit-Cbvy2Sfv.mjs → edit-BaKHtEYP.mjs} +1 -1
- package/dist/{edit-Cb6DydNq.mjs → edit-BryJ1Ozj.mjs} +1 -1
- package/dist/{edit-CTPp57mz.mjs → edit-C3_M4SAm.mjs} +1 -1
- package/dist/{edit-BEZbUD7x.mjs → edit-CBUBEDYQ.mjs} +47 -58
- package/dist/{edit-BNIu335Q.mjs → edit-Da4rBqIl.mjs} +1 -1
- package/dist/edit-YR1BLwBM.mjs +4 -0
- package/dist/edit-dkzoPlC1.mjs +4 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-CZoUg9gj.mjs → edit.vue_vue_type_script_setup_true_lang-5_bW1lje.mjs} +22 -23
- package/dist/{edit.vue_vue_type_script_setup_true_lang-mbsAcwCr.mjs → edit.vue_vue_type_script_setup_true_lang-B0CmHQFN.mjs} +63 -71
- package/dist/{edit.vue_vue_type_script_setup_true_lang-p1_8U_WZ.mjs → edit.vue_vue_type_script_setup_true_lang-BojWrHVs.mjs} +19 -20
- package/dist/{edit.vue_vue_type_script_setup_true_lang-B87Ti-_7.mjs → edit.vue_vue_type_script_setup_true_lang-DfZ2CWbT.mjs} +249 -300
- package/dist/{edit.vue_vue_type_script_setup_true_lang-D8zavJFz.mjs → edit.vue_vue_type_script_setup_true_lang-DvT8PvhG.mjs} +28 -29
- package/dist/{edit.vue_vue_type_script_setup_true_lang-Dzw7eFuh.mjs → edit.vue_vue_type_script_setup_true_lang-RRQ8AbpV.mjs} +52 -59
- package/dist/{el-card-CNibUy3q.mjs → el-card-BOz1BuaJ.mjs} +1 -1
- package/dist/{el-col-faEvjKbh.mjs → el-col-ByQ4RMxz.mjs} +16 -16
- package/dist/{el-date-picker-CmipR6MW.mjs → el-date-picker-BxsQLDQk.mjs} +588 -592
- package/dist/{el-dropdown-item-BDZy-ttj.mjs → el-dropdown-item-Oj8hVe5g.mjs} +145 -149
- package/dist/{el-tree-select-Czi47mIj.mjs → el-tree-select-D9LnnJmi.mjs} +108 -111
- package/dist/{index-DrDJJbqj.mjs → index-7E1Q6xEm.mjs} +72 -82
- package/dist/{index-DqGCMao5.mjs → index-B1tUnBOd.mjs} +5 -5
- package/dist/{index-uMGobxHH.mjs → index-B6lfofak.mjs} +35 -39
- package/dist/{index-xo5uwQYL.mjs → index-BC5xzJHH.mjs} +66 -70
- package/dist/{index-CzGRc0hK.mjs → index-BFilvnBa.mjs} +224 -239
- package/dist/{index-DJ08yxAP.mjs → index-BQj9zHJH.mjs} +1 -1
- package/dist/index-BTnK8LSe.mjs +319 -0
- package/dist/{index-LhUQe1Xu.mjs → index-BhWLFjrd.mjs} +148 -159
- package/dist/{index-KWJbe1VG.mjs → index-Bm8Ym_vg.mjs} +98 -107
- package/dist/{index-BbdkfW1u.mjs → index-CMhIkM_l.mjs} +1 -1
- package/dist/{index-VAf5EsQ5.mjs → index-CO0p57s7.mjs} +65 -68
- package/dist/{index-D4nHCHVJ.mjs → index-CTwdawf9.mjs} +1 -1
- package/dist/{index-CugZa1Ys.mjs → index-CYOLMp2W.mjs} +98 -107
- package/dist/{index-X9SBRcLU.mjs → index-CZazFMG9.mjs} +102 -106
- package/dist/{index-BAy-MZyA.mjs → index-CcwdkUsS.mjs} +73 -84
- package/dist/{index-ChvYPMES.mjs → index-DIik67HQ.mjs} +55 -58
- package/dist/{index-5-dP9leL.mjs → index-DgmZIJSM.mjs} +1 -1
- package/dist/index-DjBUKTDX.mjs +29725 -0
- package/dist/{index-TIICDILF.mjs → index-H2NqoRop.mjs} +1 -1
- package/dist/{index-CC1cqzhH.mjs → index-WG3AukVT.mjs} +56 -59
- package/dist/index.mjs +25 -25
- package/dist/{picture-BT7yeXEj.mjs → picture-CG9bft5d.mjs} +26 -27
- package/dist/profile-B8BtUlO7.mjs +261 -0
- package/dist/style.css +1 -1
- package/dist/{types-fCJt2Tua.mjs → types-CZaBSnxK.mjs} +45 -46
- package/dist/{updatePwd-DgqhTWUV.mjs → updatePwd-BRhEXp-m.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-B6YhGyCY.mjs → updatePwd.vue_vue_type_script_setup_true_lang-DcvNM8-2.mjs} +24 -25
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +0 -9
- package/dist/debounce-D-IJxfPF.mjs +0 -81
- package/dist/dropdown2-Cnd0SGXe.mjs +0 -160
- package/dist/edit-D9vdHRed.mjs +0 -4
- package/dist/edit-NenpQsL5.mjs +0 -4
- package/dist/el-checkbox-Bb05WXyt.mjs +0 -547
- package/dist/el-dialog-ttaEYSPa.mjs +0 -378
- package/dist/el-icon-l0sNRNKZ.mjs +0 -1
- package/dist/el-popover-CRZimqDD.mjs +0 -159
- package/dist/el-popper-D2LHTqDy.mjs +0 -1656
- package/dist/el-progress-COmCqT1a.mjs +0 -897
- package/dist/el-radio-BKt8lW7J.mjs +0 -251
- package/dist/el-scrollbar-CcOhSvuU.mjs +0 -606
- package/dist/el-select-BLskFr20.mjs +0 -1040
- package/dist/el-switch-BL2KLnPo.mjs +0 -254
- package/dist/el-table-AWydVCJY.mjs +0 -3167
- package/dist/el-tag-l0sNRNKZ.mjs +0 -1
- package/dist/el-tooltip-l0sNRNKZ.mjs +0 -1
- package/dist/importUpload.vue_vue_type_script_setup_true_lang-uF63aa0G.mjs +0 -116
- package/dist/index-BEjEqYND.mjs +0 -107
- package/dist/index-Dd6PCsAJ.mjs +0 -328
- package/dist/index-DjkMA-Wh.mjs +0 -40
- package/dist/index-HyB-t-wB.mjs +0 -633
- package/dist/index-PuLggzCy.mjs +0 -19287
- package/dist/index.vue_vue_type_script_setup_true_lang-BCQXNjtA.mjs +0 -57
- package/dist/index.vue_vue_type_script_setup_true_lang-BIbfa3W2.mjs +0 -286
- package/dist/index.vue_vue_type_style_index_0_scope_true_lang-AvcZIlmm.mjs +0 -119
- package/dist/isUndefined-CUQZk6oB.mjs +0 -6
- package/dist/profile-fw7e0wjU.mjs +0 -319
- package/dist/refs-B_ySplLd.mjs +0 -9
|
@@ -1,1040 +0,0 @@
|
|
|
1
|
-
import { inject as me, computed as i, getCurrentInstance as Ve, toRaw as lt, watch as j, defineComponent as oe, unref as Oe, reactive as ge, toRefs as nt, onBeforeUnmount as Qt, nextTick as H, withDirectives as le, openBlock as b, createElementBlock as w, normalizeClass as d, withModifiers as F, renderSlot as k, createElementVNode as M, toDisplayString as z, vShow as Ee, ref as O, onMounted as Te, normalizeStyle as ve, createCommentVNode as $, watchEffect as Yt, provide as ot, resolveComponent as K, resolveDirective as Zt, createVNode as A, withCtx as R, Fragment as Je, renderList as xe, createBlock as N, withKeys as te, vModelText as Xt, resolveDynamicComponent as we } from "vue";
|
|
2
|
-
import { q as Q, bz as G, u as ne, aY as st, _ as he, m as U, cb as Jt, al as Y, a3 as xt, cc as _t, aZ as el, a_ as tl, bf as B, s as ll, cd as nl, aV as ol, a$ as sl, Z as al, c5 as il, a0 as rl, ce as Ie, aR as W, c as ul, cf as dl, aT as at, k as cl, b as pl, aQ as fl, d as fe, i as _e, cg as vl, g as ml, U as bl, E as gl, ch as hl, w as Sl, a as it } from "./index-PuLggzCy.mjs";
|
|
3
|
-
import { a as yl, b as Cl, E as Ol } from "./el-popper-D2LHTqDy.mjs";
|
|
4
|
-
import { b as wl, a as be, E as Il, C as Vl } from "./el-scrollbar-CcOhSvuU.mjs";
|
|
5
|
-
import { t as El, E as Tl } from "./index-BEjEqYND.mjs";
|
|
6
|
-
import { t as $l, d as Ml } from "./debounce-D-IJxfPF.mjs";
|
|
7
|
-
var et = 1 / 0, Rl = 17976931348623157e292;
|
|
8
|
-
function kl(e) {
|
|
9
|
-
if (!e)
|
|
10
|
-
return e === 0 ? e : 0;
|
|
11
|
-
if (e = $l(e), e === et || e === -et) {
|
|
12
|
-
var n = e < 0 ? -1 : 1;
|
|
13
|
-
return n * Rl;
|
|
14
|
-
}
|
|
15
|
-
return e === e ? e : 0;
|
|
16
|
-
}
|
|
17
|
-
function Dl(e) {
|
|
18
|
-
var n = kl(e), s = n % 1;
|
|
19
|
-
return n === n ? s ? n - s : n : 0;
|
|
20
|
-
}
|
|
21
|
-
function Bl(e, n, s, f) {
|
|
22
|
-
for (var r = e.length, v = s + (f ? 1 : -1); f ? v-- : ++v < r; )
|
|
23
|
-
if (n(e[v], v, e))
|
|
24
|
-
return v;
|
|
25
|
-
return -1;
|
|
26
|
-
}
|
|
27
|
-
var Ll = Math.max, Nl = Math.min;
|
|
28
|
-
function Fl(e, n, s) {
|
|
29
|
-
var f = e == null ? 0 : e.length;
|
|
30
|
-
if (!f)
|
|
31
|
-
return -1;
|
|
32
|
-
var r = f - 1;
|
|
33
|
-
return s !== void 0 && (r = Dl(s), r = s < 0 ? Ll(f + r, 0) : Nl(r, f - 1)), Bl(e, wl(n), r, !0);
|
|
34
|
-
}
|
|
35
|
-
const Wl = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), rt = Symbol("ElSelectGroup"), Se = Symbol("ElSelect");
|
|
36
|
-
function zl(e, n) {
|
|
37
|
-
const s = me(Se), f = me(rt, { disabled: !1 }), r = i(() => s.props.multiple ? u(s.props.modelValue, e.value) : u([s.props.modelValue], e.value)), v = i(() => {
|
|
38
|
-
if (s.props.multiple) {
|
|
39
|
-
const m = s.props.modelValue || [];
|
|
40
|
-
return !r.value && m.length >= s.props.multipleLimit && s.props.multipleLimit > 0;
|
|
41
|
-
} else
|
|
42
|
-
return !1;
|
|
43
|
-
}), l = i(() => e.label || (Q(e.value) ? "" : e.value)), h = i(() => e.value || e.label || ""), c = i(() => e.disabled || n.groupDisabled || v.value), S = Ve(), u = (m = [], g) => {
|
|
44
|
-
if (Q(e.value)) {
|
|
45
|
-
const a = s.props.valueKey;
|
|
46
|
-
return m && m.some((T) => lt(G(T, a)) === G(g, a));
|
|
47
|
-
} else
|
|
48
|
-
return m && m.includes(g);
|
|
49
|
-
}, E = () => {
|
|
50
|
-
!e.disabled && !f.disabled && (s.states.hoveringIndex = s.optionsArray.indexOf(S.proxy));
|
|
51
|
-
}, I = (m) => {
|
|
52
|
-
const g = new RegExp(Wl(m), "i");
|
|
53
|
-
n.visible = g.test(l.value) || e.created;
|
|
54
|
-
};
|
|
55
|
-
return j(() => l.value, () => {
|
|
56
|
-
!e.created && !s.props.remote && s.setSelected();
|
|
57
|
-
}), j(() => e.value, (m, g) => {
|
|
58
|
-
const { remote: a, valueKey: T } = s.props;
|
|
59
|
-
if (be(m, g) || (s.onOptionDestroy(g, S.proxy), s.onOptionCreate(S.proxy)), !e.created && !a) {
|
|
60
|
-
if (T && Q(m) && Q(g) && m[T] === g[T])
|
|
61
|
-
return;
|
|
62
|
-
s.setSelected();
|
|
63
|
-
}
|
|
64
|
-
}), j(() => f.disabled, () => {
|
|
65
|
-
n.groupDisabled = f.disabled;
|
|
66
|
-
}, { immediate: !0 }), {
|
|
67
|
-
select: s,
|
|
68
|
-
currentLabel: l,
|
|
69
|
-
currentValue: h,
|
|
70
|
-
itemSelected: r,
|
|
71
|
-
isDisabled: c,
|
|
72
|
-
hoverItem: E,
|
|
73
|
-
updateOption: I
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
const Pl = oe({
|
|
77
|
-
name: "ElOption",
|
|
78
|
-
componentName: "ElOption",
|
|
79
|
-
props: {
|
|
80
|
-
value: {
|
|
81
|
-
required: !0,
|
|
82
|
-
type: [String, Number, Boolean, Object]
|
|
83
|
-
},
|
|
84
|
-
label: [String, Number],
|
|
85
|
-
created: Boolean,
|
|
86
|
-
disabled: Boolean
|
|
87
|
-
},
|
|
88
|
-
setup(e) {
|
|
89
|
-
const n = ne("select"), s = st(), f = i(() => [
|
|
90
|
-
n.be("dropdown", "item"),
|
|
91
|
-
n.is("disabled", Oe(h)),
|
|
92
|
-
n.is("selected", Oe(l)),
|
|
93
|
-
n.is("hovering", Oe(I))
|
|
94
|
-
]), r = ge({
|
|
95
|
-
index: -1,
|
|
96
|
-
groupDisabled: !1,
|
|
97
|
-
visible: !0,
|
|
98
|
-
hover: !1
|
|
99
|
-
}), {
|
|
100
|
-
currentLabel: v,
|
|
101
|
-
itemSelected: l,
|
|
102
|
-
isDisabled: h,
|
|
103
|
-
select: c,
|
|
104
|
-
hoverItem: S,
|
|
105
|
-
updateOption: u
|
|
106
|
-
} = zl(e, r), { visible: E, hover: I } = nt(r), m = Ve().proxy;
|
|
107
|
-
c.onOptionCreate(m), Qt(() => {
|
|
108
|
-
const a = m.value, { selected: T } = c.states, se = (c.props.multiple ? T : [T]).some((ae) => ae.value === m.value);
|
|
109
|
-
H(() => {
|
|
110
|
-
c.states.cachedOptions.get(a) === m && !se && c.states.cachedOptions.delete(a);
|
|
111
|
-
}), c.onOptionDestroy(a, m);
|
|
112
|
-
});
|
|
113
|
-
function g() {
|
|
114
|
-
e.disabled !== !0 && r.groupDisabled !== !0 && c.handleOptionSelect(m);
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
ns: n,
|
|
118
|
-
id: s,
|
|
119
|
-
containerKls: f,
|
|
120
|
-
currentLabel: v,
|
|
121
|
-
itemSelected: l,
|
|
122
|
-
isDisabled: h,
|
|
123
|
-
select: c,
|
|
124
|
-
hoverItem: S,
|
|
125
|
-
updateOption: u,
|
|
126
|
-
visible: E,
|
|
127
|
-
hover: I,
|
|
128
|
-
selectOptionClick: g,
|
|
129
|
-
states: r
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
}), Kl = ["id", "aria-disabled", "aria-selected"];
|
|
133
|
-
function Al(e, n, s, f, r, v) {
|
|
134
|
-
return le((b(), w("li", {
|
|
135
|
-
id: e.id,
|
|
136
|
-
class: d(e.containerKls),
|
|
137
|
-
role: "option",
|
|
138
|
-
"aria-disabled": e.isDisabled || void 0,
|
|
139
|
-
"aria-selected": e.itemSelected,
|
|
140
|
-
onMouseenter: n[0] || (n[0] = (...l) => e.hoverItem && e.hoverItem(...l)),
|
|
141
|
-
onClick: n[1] || (n[1] = F((...l) => e.selectOptionClick && e.selectOptionClick(...l), ["stop"]))
|
|
142
|
-
}, [
|
|
143
|
-
k(e.$slots, "default", {}, () => [
|
|
144
|
-
M("span", null, z(e.currentLabel), 1)
|
|
145
|
-
])
|
|
146
|
-
], 42, Kl)), [
|
|
147
|
-
[Ee, e.visible]
|
|
148
|
-
]);
|
|
149
|
-
}
|
|
150
|
-
var $e = /* @__PURE__ */ he(Pl, [["render", Al], ["__file", "option.vue"]]);
|
|
151
|
-
const Hl = oe({
|
|
152
|
-
name: "ElSelectDropdown",
|
|
153
|
-
componentName: "ElSelectDropdown",
|
|
154
|
-
setup() {
|
|
155
|
-
const e = me(Se), n = ne("select"), s = i(() => e.props.popperClass), f = i(() => e.props.multiple), r = i(() => e.props.fitInputWidth), v = O("");
|
|
156
|
-
function l() {
|
|
157
|
-
var h;
|
|
158
|
-
v.value = `${(h = e.selectRef) == null ? void 0 : h.offsetWidth}px`;
|
|
159
|
-
}
|
|
160
|
-
return Te(() => {
|
|
161
|
-
l(), U(e.selectRef, l);
|
|
162
|
-
}), {
|
|
163
|
-
ns: n,
|
|
164
|
-
minWidth: v,
|
|
165
|
-
popperClass: s,
|
|
166
|
-
isMultiple: f,
|
|
167
|
-
isFitInputWidth: r
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
function Ul(e, n, s, f, r, v) {
|
|
172
|
-
return b(), w("div", {
|
|
173
|
-
class: d([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
|
|
174
|
-
style: ve({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
|
|
175
|
-
}, [
|
|
176
|
-
e.$slots.header ? (b(), w("div", {
|
|
177
|
-
key: 0,
|
|
178
|
-
class: d(e.ns.be("dropdown", "header"))
|
|
179
|
-
}, [
|
|
180
|
-
k(e.$slots, "header")
|
|
181
|
-
], 2)) : $("v-if", !0),
|
|
182
|
-
k(e.$slots, "default"),
|
|
183
|
-
e.$slots.footer ? (b(), w("div", {
|
|
184
|
-
key: 1,
|
|
185
|
-
class: d(e.ns.be("dropdown", "footer"))
|
|
186
|
-
}, [
|
|
187
|
-
k(e.$slots, "footer")
|
|
188
|
-
], 2)) : $("v-if", !0)
|
|
189
|
-
], 6);
|
|
190
|
-
}
|
|
191
|
-
var Gl = /* @__PURE__ */ he(Hl, [["render", Ul], ["__file", "select-dropdown.vue"]]);
|
|
192
|
-
function jl(e) {
|
|
193
|
-
const n = O(!1);
|
|
194
|
-
return {
|
|
195
|
-
handleCompositionStart: () => {
|
|
196
|
-
n.value = !0;
|
|
197
|
-
},
|
|
198
|
-
handleCompositionUpdate: (v) => {
|
|
199
|
-
const l = v.target.value, h = l[l.length - 1] || "";
|
|
200
|
-
n.value = !Jt(h);
|
|
201
|
-
},
|
|
202
|
-
handleCompositionEnd: (v) => {
|
|
203
|
-
n.value && (n.value = !1, Y(e) && e(v));
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
const ql = 11, Ql = (e, n) => {
|
|
208
|
-
const { t: s } = xt(), f = st(), r = ne("select"), v = ne("input"), l = ge({
|
|
209
|
-
inputValue: "",
|
|
210
|
-
options: /* @__PURE__ */ new Map(),
|
|
211
|
-
cachedOptions: /* @__PURE__ */ new Map(),
|
|
212
|
-
disabledOptions: /* @__PURE__ */ new Map(),
|
|
213
|
-
optionValues: [],
|
|
214
|
-
selected: e.multiple ? [] : {},
|
|
215
|
-
selectionWidth: 0,
|
|
216
|
-
calculatorWidth: 0,
|
|
217
|
-
collapseItemWidth: 0,
|
|
218
|
-
selectedLabel: "",
|
|
219
|
-
hoveringIndex: -1,
|
|
220
|
-
previousQuery: null,
|
|
221
|
-
inputHovering: !1,
|
|
222
|
-
menuVisibleOnFocus: !1,
|
|
223
|
-
isBeforeHide: !1
|
|
224
|
-
}), h = O(null), c = O(null), S = O(null), u = O(null), E = O(null), I = O(null), m = O(null), g = O(null), a = O(null), T = O(null), Z = O(null), se = O(null), { wrapperRef: ae, isFocused: Me, handleFocus: dt, handleBlur: Re } = _t(E, {
|
|
225
|
-
afterFocus() {
|
|
226
|
-
e.automaticDropdown && !C.value && (C.value = !0, l.menuVisibleOnFocus = !0);
|
|
227
|
-
},
|
|
228
|
-
beforeBlur(t) {
|
|
229
|
-
var o, p;
|
|
230
|
-
return ((o = S.value) == null ? void 0 : o.isFocusInsideContent(t)) || ((p = u.value) == null ? void 0 : p.isFocusInsideContent(t));
|
|
231
|
-
},
|
|
232
|
-
afterBlur() {
|
|
233
|
-
C.value = !1, l.menuVisibleOnFocus = !1;
|
|
234
|
-
}
|
|
235
|
-
}), C = O(!1), X = O(), { form: ke, formItem: J } = el(), { inputId: ct } = tl(e, {
|
|
236
|
-
formItemContext: J
|
|
237
|
-
}), ie = i(() => e.disabled || (ke == null ? void 0 : ke.disabled)), pt = i(() => V.value.some((t) => t.value === "")), ye = i(() => e.multiple ? B(e.modelValue) && e.modelValue.length > 0 : !ll(e.modelValue) && (e.modelValue !== "" || pt.value)), ft = i(() => e.clearable && !ie.value && l.inputHovering && ye.value), De = i(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), vt = i(() => r.is("reverse", De.value && C.value)), Be = i(() => (J == null ? void 0 : J.validateState) || ""), mt = i(() => nl[Be.value]), bt = i(() => e.remote ? 300 : 0), Le = i(() => e.loading ? e.loadingText || s("el.select.loading") : e.remote && !l.inputValue && l.options.size === 0 ? !1 : e.filterable && l.inputValue && l.options.size > 0 && x.value === 0 ? e.noMatchText || s("el.select.noMatch") : l.options.size === 0 ? e.noDataText || s("el.select.noData") : null), x = i(() => V.value.filter((t) => t.visible).length), V = i(() => {
|
|
238
|
-
const t = Array.from(l.options.values()), o = [];
|
|
239
|
-
return l.optionValues.forEach((p) => {
|
|
240
|
-
const y = t.findIndex((L) => L.value === p);
|
|
241
|
-
y > -1 && o.push(t[y]);
|
|
242
|
-
}), o.length >= t.length ? o : t;
|
|
243
|
-
}), gt = i(() => Array.from(l.cachedOptions.values())), ht = i(() => {
|
|
244
|
-
const t = V.value.filter((o) => !o.created).some((o) => o.currentLabel === l.inputValue);
|
|
245
|
-
return e.filterable && e.allowCreate && l.inputValue !== "" && !t;
|
|
246
|
-
}), Ne = () => {
|
|
247
|
-
e.filterable && Y(e.filterMethod) || e.filterable && e.remote && Y(e.remoteMethod) || V.value.forEach((t) => {
|
|
248
|
-
t.updateOption(l.inputValue);
|
|
249
|
-
});
|
|
250
|
-
}, Fe = ol(), St = i(() => ["small"].includes(Fe.value) ? "small" : "default"), yt = i({
|
|
251
|
-
get() {
|
|
252
|
-
return C.value && Le.value !== !1;
|
|
253
|
-
},
|
|
254
|
-
set(t) {
|
|
255
|
-
C.value = t;
|
|
256
|
-
}
|
|
257
|
-
}), Ct = i(() => B(e.modelValue) ? e.modelValue.length === 0 && !l.inputValue : e.filterable ? !l.inputValue : !0), Ot = i(() => {
|
|
258
|
-
var t;
|
|
259
|
-
const o = (t = e.placeholder) != null ? t : s("el.select.placeholder");
|
|
260
|
-
return e.multiple || !ye.value ? o : l.selectedLabel;
|
|
261
|
-
});
|
|
262
|
-
j(() => e.modelValue, (t, o) => {
|
|
263
|
-
e.multiple && e.filterable && !e.reserveKeyword && (l.inputValue = "", re("")), ue(), !be(t, o) && e.validateEvent && (J == null || J.validate("change").catch((p) => sl(p)));
|
|
264
|
-
}, {
|
|
265
|
-
flush: "post",
|
|
266
|
-
deep: !0
|
|
267
|
-
}), j(() => C.value, (t) => {
|
|
268
|
-
t ? re(l.inputValue) : (l.inputValue = "", l.previousQuery = null, l.isBeforeHide = !0), n("visible-change", t);
|
|
269
|
-
}), j(() => l.options.entries(), () => {
|
|
270
|
-
var t;
|
|
271
|
-
if (!al)
|
|
272
|
-
return;
|
|
273
|
-
const o = ((t = h.value) == null ? void 0 : t.querySelectorAll("input")) || [];
|
|
274
|
-
(!e.filterable && !e.defaultFirstOption && !il(e.modelValue) || !Array.from(o).includes(document.activeElement)) && ue(), e.defaultFirstOption && (e.filterable || e.remote) && x.value && We();
|
|
275
|
-
}, {
|
|
276
|
-
flush: "post"
|
|
277
|
-
}), j(() => l.hoveringIndex, (t) => {
|
|
278
|
-
rl(t) && t > -1 ? X.value = V.value[t] || {} : X.value = {}, V.value.forEach((o) => {
|
|
279
|
-
o.hover = X.value === o;
|
|
280
|
-
});
|
|
281
|
-
}), Yt(() => {
|
|
282
|
-
l.isBeforeHide || Ne();
|
|
283
|
-
});
|
|
284
|
-
const re = (t) => {
|
|
285
|
-
l.previousQuery !== t && (l.previousQuery = t, e.filterable && Y(e.filterMethod) ? e.filterMethod(t) : e.filterable && e.remote && Y(e.remoteMethod) && e.remoteMethod(t), e.defaultFirstOption && (e.filterable || e.remote) && x.value ? H(We) : H(wt));
|
|
286
|
-
}, We = () => {
|
|
287
|
-
const t = V.value.filter((y) => y.visible && !y.disabled && !y.states.groupDisabled), o = t.find((y) => y.created), p = t[0];
|
|
288
|
-
l.hoveringIndex = qe(V.value, o || p);
|
|
289
|
-
}, ue = () => {
|
|
290
|
-
if (e.multiple)
|
|
291
|
-
l.selectedLabel = "";
|
|
292
|
-
else {
|
|
293
|
-
const o = ze(e.modelValue);
|
|
294
|
-
l.selectedLabel = o.currentLabel, l.selected = o;
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
const t = [];
|
|
298
|
-
B(e.modelValue) && e.modelValue.forEach((o) => {
|
|
299
|
-
t.push(ze(o));
|
|
300
|
-
}), l.selected = t;
|
|
301
|
-
}, ze = (t) => {
|
|
302
|
-
let o;
|
|
303
|
-
const p = Ie(t).toLowerCase() === "object", y = Ie(t).toLowerCase() === "null", L = Ie(t).toLowerCase() === "undefined";
|
|
304
|
-
for (let P = l.cachedOptions.size - 1; P >= 0; P--) {
|
|
305
|
-
const D = gt.value[P];
|
|
306
|
-
if (p ? G(D.value, e.valueKey) === G(t, e.valueKey) : D.value === t) {
|
|
307
|
-
o = {
|
|
308
|
-
value: t,
|
|
309
|
-
currentLabel: D.currentLabel,
|
|
310
|
-
isDisabled: D.isDisabled
|
|
311
|
-
};
|
|
312
|
-
break;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
if (o)
|
|
316
|
-
return o;
|
|
317
|
-
const q = p ? t.label : !y && !L ? t : "";
|
|
318
|
-
return {
|
|
319
|
-
value: t,
|
|
320
|
-
currentLabel: q
|
|
321
|
-
};
|
|
322
|
-
}, wt = () => {
|
|
323
|
-
e.multiple ? l.hoveringIndex = V.value.findIndex((t) => l.selected.some((o) => ee(o) === ee(t))) : l.hoveringIndex = V.value.findIndex((t) => ee(t) === ee(l.selected));
|
|
324
|
-
}, It = () => {
|
|
325
|
-
l.selectionWidth = c.value.getBoundingClientRect().width;
|
|
326
|
-
}, Pe = () => {
|
|
327
|
-
l.calculatorWidth = I.value.getBoundingClientRect().width;
|
|
328
|
-
}, Vt = () => {
|
|
329
|
-
l.collapseItemWidth = Z.value.getBoundingClientRect().width;
|
|
330
|
-
}, Ce = () => {
|
|
331
|
-
var t, o;
|
|
332
|
-
(o = (t = S.value) == null ? void 0 : t.updatePopper) == null || o.call(t);
|
|
333
|
-
}, Ke = () => {
|
|
334
|
-
var t, o;
|
|
335
|
-
(o = (t = u.value) == null ? void 0 : t.updatePopper) == null || o.call(t);
|
|
336
|
-
}, Ae = () => {
|
|
337
|
-
l.inputValue.length > 0 && !C.value && (C.value = !0), re(l.inputValue);
|
|
338
|
-
}, He = (t) => {
|
|
339
|
-
if (l.inputValue = t.target.value, e.remote)
|
|
340
|
-
Ue();
|
|
341
|
-
else
|
|
342
|
-
return Ae();
|
|
343
|
-
}, Ue = Ml(() => {
|
|
344
|
-
Ae();
|
|
345
|
-
}, bt.value), _ = (t) => {
|
|
346
|
-
be(e.modelValue, t) || n(at, t);
|
|
347
|
-
}, Et = (t) => Fl(t, (o) => !l.disabledOptions.has(o)), Tt = (t) => {
|
|
348
|
-
if (e.multiple && t.code !== ul.delete && t.target.value.length <= 0) {
|
|
349
|
-
const o = e.modelValue.slice(), p = Et(o);
|
|
350
|
-
if (p < 0)
|
|
351
|
-
return;
|
|
352
|
-
o.splice(p, 1), n(W, o), _(o);
|
|
353
|
-
}
|
|
354
|
-
}, $t = (t, o) => {
|
|
355
|
-
const p = l.selected.indexOf(o);
|
|
356
|
-
if (p > -1 && !ie.value) {
|
|
357
|
-
const y = e.modelValue.slice();
|
|
358
|
-
y.splice(p, 1), n(W, y), _(y), n("remove-tag", o.value);
|
|
359
|
-
}
|
|
360
|
-
t.stopPropagation(), ce();
|
|
361
|
-
}, Ge = (t) => {
|
|
362
|
-
t.stopPropagation();
|
|
363
|
-
const o = e.multiple ? [] : void 0;
|
|
364
|
-
if (e.multiple)
|
|
365
|
-
for (const p of l.selected)
|
|
366
|
-
p.isDisabled && o.push(p.value);
|
|
367
|
-
n(W, o), _(o), l.hoveringIndex = -1, C.value = !1, n("clear"), ce();
|
|
368
|
-
}, je = (t) => {
|
|
369
|
-
if (e.multiple) {
|
|
370
|
-
const o = (e.modelValue || []).slice(), p = qe(o, t.value);
|
|
371
|
-
p > -1 ? o.splice(p, 1) : (e.multipleLimit <= 0 || o.length < e.multipleLimit) && o.push(t.value), n(W, o), _(o), t.created && re(""), e.filterable && !e.reserveKeyword && (l.inputValue = "");
|
|
372
|
-
} else
|
|
373
|
-
n(W, t.value), _(t.value), C.value = !1;
|
|
374
|
-
ce(), !C.value && H(() => {
|
|
375
|
-
de(t);
|
|
376
|
-
});
|
|
377
|
-
}, qe = (t = [], o) => {
|
|
378
|
-
if (!Q(o))
|
|
379
|
-
return t.indexOf(o);
|
|
380
|
-
const p = e.valueKey;
|
|
381
|
-
let y = -1;
|
|
382
|
-
return t.some((L, q) => lt(G(L, p)) === G(o, p) ? (y = q, !0) : !1), y;
|
|
383
|
-
}, de = (t) => {
|
|
384
|
-
var o, p, y, L, q;
|
|
385
|
-
const pe = B(t) ? t[0] : t;
|
|
386
|
-
let P = null;
|
|
387
|
-
if (pe != null && pe.value) {
|
|
388
|
-
const D = V.value.filter((Xe) => Xe.value === pe.value);
|
|
389
|
-
D.length > 0 && (P = D[0].$el);
|
|
390
|
-
}
|
|
391
|
-
if (S.value && P) {
|
|
392
|
-
const D = (L = (y = (p = (o = S.value) == null ? void 0 : o.popperRef) == null ? void 0 : p.contentRef) == null ? void 0 : y.querySelector) == null ? void 0 : L.call(y, `.${r.be("dropdown", "wrap")}`);
|
|
393
|
-
D && dl(D, P);
|
|
394
|
-
}
|
|
395
|
-
(q = se.value) == null || q.handleScroll();
|
|
396
|
-
}, Mt = (t) => {
|
|
397
|
-
l.options.set(t.value, t), l.cachedOptions.set(t.value, t), t.disabled && l.disabledOptions.set(t.value, t);
|
|
398
|
-
}, Rt = (t, o) => {
|
|
399
|
-
l.options.get(t) === o && l.options.delete(t);
|
|
400
|
-
}, {
|
|
401
|
-
handleCompositionStart: kt,
|
|
402
|
-
handleCompositionUpdate: Dt,
|
|
403
|
-
handleCompositionEnd: Bt
|
|
404
|
-
} = jl((t) => He(t)), Lt = i(() => {
|
|
405
|
-
var t, o;
|
|
406
|
-
return (o = (t = S.value) == null ? void 0 : t.popperRef) == null ? void 0 : o.contentRef;
|
|
407
|
-
}), Nt = () => {
|
|
408
|
-
H(() => de(l.selected));
|
|
409
|
-
}, ce = () => {
|
|
410
|
-
var t;
|
|
411
|
-
(t = E.value) == null || t.focus();
|
|
412
|
-
}, Ft = () => {
|
|
413
|
-
Qe();
|
|
414
|
-
}, Wt = (t) => {
|
|
415
|
-
Ge(t);
|
|
416
|
-
}, Qe = (t) => {
|
|
417
|
-
if (C.value = !1, Me.value) {
|
|
418
|
-
const o = new FocusEvent("focus", t);
|
|
419
|
-
H(() => Re(o));
|
|
420
|
-
}
|
|
421
|
-
}, zt = () => {
|
|
422
|
-
l.inputValue.length > 0 ? l.inputValue = "" : C.value = !1;
|
|
423
|
-
}, Ye = () => {
|
|
424
|
-
ie.value || (l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : C.value = !C.value);
|
|
425
|
-
}, Pt = () => {
|
|
426
|
-
C.value ? V.value[l.hoveringIndex] && je(V.value[l.hoveringIndex]) : Ye();
|
|
427
|
-
}, ee = (t) => Q(t.value) ? G(t.value, e.valueKey) : t.value, Kt = i(() => V.value.filter((t) => t.visible).every((t) => t.disabled)), At = i(() => e.multiple ? e.collapseTags ? l.selected.slice(0, e.maxCollapseTags) : l.selected : []), Ht = i(() => e.multiple ? e.collapseTags ? l.selected.slice(e.maxCollapseTags) : [] : []), Ze = (t) => {
|
|
428
|
-
if (!C.value) {
|
|
429
|
-
C.value = !0;
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
if (!(l.options.size === 0 || x.value === 0) && !Kt.value) {
|
|
433
|
-
t === "next" ? (l.hoveringIndex++, l.hoveringIndex === l.options.size && (l.hoveringIndex = 0)) : t === "prev" && (l.hoveringIndex--, l.hoveringIndex < 0 && (l.hoveringIndex = l.options.size - 1));
|
|
434
|
-
const o = V.value[l.hoveringIndex];
|
|
435
|
-
(o.disabled === !0 || o.states.groupDisabled === !0 || !o.visible) && Ze(t), H(() => de(X.value));
|
|
436
|
-
}
|
|
437
|
-
}, Ut = () => {
|
|
438
|
-
if (!c.value)
|
|
439
|
-
return 0;
|
|
440
|
-
const t = window.getComputedStyle(c.value);
|
|
441
|
-
return Number.parseFloat(t.gap || "6px");
|
|
442
|
-
}, Gt = i(() => {
|
|
443
|
-
const t = Ut();
|
|
444
|
-
return { maxWidth: `${Z.value && e.maxCollapseTags === 1 ? l.selectionWidth - l.collapseItemWidth - t : l.selectionWidth}px` };
|
|
445
|
-
}), jt = i(() => ({ maxWidth: `${l.selectionWidth}px` })), qt = i(() => ({
|
|
446
|
-
width: `${Math.max(l.calculatorWidth, ql)}px`
|
|
447
|
-
}));
|
|
448
|
-
return e.multiple && !B(e.modelValue) && n(W, []), !e.multiple && B(e.modelValue) && n(W, ""), U(c, It), U(I, Pe), U(a, Ce), U(ae, Ce), U(T, Ke), U(Z, Vt), Te(() => {
|
|
449
|
-
ue();
|
|
450
|
-
}), {
|
|
451
|
-
inputId: ct,
|
|
452
|
-
contentId: f,
|
|
453
|
-
nsSelect: r,
|
|
454
|
-
nsInput: v,
|
|
455
|
-
states: l,
|
|
456
|
-
isFocused: Me,
|
|
457
|
-
expanded: C,
|
|
458
|
-
optionsArray: V,
|
|
459
|
-
hoverOption: X,
|
|
460
|
-
selectSize: Fe,
|
|
461
|
-
filteredOptionsCount: x,
|
|
462
|
-
resetCalculatorWidth: Pe,
|
|
463
|
-
updateTooltip: Ce,
|
|
464
|
-
updateTagTooltip: Ke,
|
|
465
|
-
debouncedOnInputChange: Ue,
|
|
466
|
-
onInput: He,
|
|
467
|
-
deletePrevTag: Tt,
|
|
468
|
-
deleteTag: $t,
|
|
469
|
-
deleteSelected: Ge,
|
|
470
|
-
handleOptionSelect: je,
|
|
471
|
-
scrollToOption: de,
|
|
472
|
-
hasModelValue: ye,
|
|
473
|
-
shouldShowPlaceholder: Ct,
|
|
474
|
-
currentPlaceholder: Ot,
|
|
475
|
-
showClose: ft,
|
|
476
|
-
iconComponent: De,
|
|
477
|
-
iconReverse: vt,
|
|
478
|
-
validateState: Be,
|
|
479
|
-
validateIcon: mt,
|
|
480
|
-
showNewOption: ht,
|
|
481
|
-
updateOptions: Ne,
|
|
482
|
-
collapseTagSize: St,
|
|
483
|
-
setSelected: ue,
|
|
484
|
-
selectDisabled: ie,
|
|
485
|
-
emptyText: Le,
|
|
486
|
-
handleCompositionStart: kt,
|
|
487
|
-
handleCompositionUpdate: Dt,
|
|
488
|
-
handleCompositionEnd: Bt,
|
|
489
|
-
onOptionCreate: Mt,
|
|
490
|
-
onOptionDestroy: Rt,
|
|
491
|
-
handleMenuEnter: Nt,
|
|
492
|
-
handleFocus: dt,
|
|
493
|
-
focus: ce,
|
|
494
|
-
blur: Ft,
|
|
495
|
-
handleBlur: Re,
|
|
496
|
-
handleClearClick: Wt,
|
|
497
|
-
handleClickOutside: Qe,
|
|
498
|
-
handleEsc: zt,
|
|
499
|
-
toggleMenu: Ye,
|
|
500
|
-
selectOption: Pt,
|
|
501
|
-
getValueKey: ee,
|
|
502
|
-
navigateOptions: Ze,
|
|
503
|
-
dropdownMenuVisible: yt,
|
|
504
|
-
showTagList: At,
|
|
505
|
-
collapseTagList: Ht,
|
|
506
|
-
tagStyle: Gt,
|
|
507
|
-
collapseTagStyle: jt,
|
|
508
|
-
inputStyle: qt,
|
|
509
|
-
popperRef: Lt,
|
|
510
|
-
inputRef: E,
|
|
511
|
-
tooltipRef: S,
|
|
512
|
-
tagTooltipRef: u,
|
|
513
|
-
calculatorRef: I,
|
|
514
|
-
prefixRef: m,
|
|
515
|
-
suffixRef: g,
|
|
516
|
-
selectRef: h,
|
|
517
|
-
wrapperRef: ae,
|
|
518
|
-
selectionRef: c,
|
|
519
|
-
scrollbarRef: se,
|
|
520
|
-
menuRef: a,
|
|
521
|
-
tagMenuRef: T,
|
|
522
|
-
collapseItemRef: Z
|
|
523
|
-
};
|
|
524
|
-
};
|
|
525
|
-
var Yl = oe({
|
|
526
|
-
name: "ElOptions",
|
|
527
|
-
setup(e, { slots: n }) {
|
|
528
|
-
const s = me(Se);
|
|
529
|
-
let f = [];
|
|
530
|
-
return () => {
|
|
531
|
-
var r, v;
|
|
532
|
-
const l = (r = n.default) == null ? void 0 : r.call(n), h = [];
|
|
533
|
-
function c(S) {
|
|
534
|
-
B(S) && S.forEach((u) => {
|
|
535
|
-
var E, I, m, g;
|
|
536
|
-
const a = (E = (u == null ? void 0 : u.type) || {}) == null ? void 0 : E.name;
|
|
537
|
-
a === "ElOptionGroup" ? c(!cl(u.children) && !B(u.children) && Y((I = u.children) == null ? void 0 : I.default) ? (m = u.children) == null ? void 0 : m.default() : u.children) : a === "ElOption" ? h.push((g = u.props) == null ? void 0 : g.value) : B(u.children) && c(u.children);
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
return l.length && c((v = l[0]) == null ? void 0 : v.children), be(h, f) || (f = h, s && (s.states.optionValues = h)), l;
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
const Zl = pl({
|
|
545
|
-
name: String,
|
|
546
|
-
id: String,
|
|
547
|
-
modelValue: {
|
|
548
|
-
type: [Array, String, Number, Boolean, Object],
|
|
549
|
-
default: void 0
|
|
550
|
-
},
|
|
551
|
-
autocomplete: {
|
|
552
|
-
type: String,
|
|
553
|
-
default: "off"
|
|
554
|
-
},
|
|
555
|
-
automaticDropdown: Boolean,
|
|
556
|
-
size: fl,
|
|
557
|
-
effect: {
|
|
558
|
-
type: fe(String),
|
|
559
|
-
default: "light"
|
|
560
|
-
},
|
|
561
|
-
disabled: Boolean,
|
|
562
|
-
clearable: Boolean,
|
|
563
|
-
filterable: Boolean,
|
|
564
|
-
allowCreate: Boolean,
|
|
565
|
-
loading: Boolean,
|
|
566
|
-
popperClass: {
|
|
567
|
-
type: String,
|
|
568
|
-
default: ""
|
|
569
|
-
},
|
|
570
|
-
popperOptions: {
|
|
571
|
-
type: fe(Object),
|
|
572
|
-
default: () => ({})
|
|
573
|
-
},
|
|
574
|
-
remote: Boolean,
|
|
575
|
-
loadingText: String,
|
|
576
|
-
noMatchText: String,
|
|
577
|
-
noDataText: String,
|
|
578
|
-
remoteMethod: Function,
|
|
579
|
-
filterMethod: Function,
|
|
580
|
-
multiple: Boolean,
|
|
581
|
-
multipleLimit: {
|
|
582
|
-
type: Number,
|
|
583
|
-
default: 0
|
|
584
|
-
},
|
|
585
|
-
placeholder: {
|
|
586
|
-
type: String
|
|
587
|
-
},
|
|
588
|
-
defaultFirstOption: Boolean,
|
|
589
|
-
reserveKeyword: {
|
|
590
|
-
type: Boolean,
|
|
591
|
-
default: !0
|
|
592
|
-
},
|
|
593
|
-
valueKey: {
|
|
594
|
-
type: String,
|
|
595
|
-
default: "value"
|
|
596
|
-
},
|
|
597
|
-
collapseTags: Boolean,
|
|
598
|
-
collapseTagsTooltip: Boolean,
|
|
599
|
-
maxCollapseTags: {
|
|
600
|
-
type: Number,
|
|
601
|
-
default: 1
|
|
602
|
-
},
|
|
603
|
-
teleported: yl.teleported,
|
|
604
|
-
persistent: {
|
|
605
|
-
type: Boolean,
|
|
606
|
-
default: !0
|
|
607
|
-
},
|
|
608
|
-
clearIcon: {
|
|
609
|
-
type: _e,
|
|
610
|
-
default: vl
|
|
611
|
-
},
|
|
612
|
-
fitInputWidth: Boolean,
|
|
613
|
-
suffixIcon: {
|
|
614
|
-
type: _e,
|
|
615
|
-
default: ml
|
|
616
|
-
},
|
|
617
|
-
tagType: { ...El.type, default: "info" },
|
|
618
|
-
validateEvent: {
|
|
619
|
-
type: Boolean,
|
|
620
|
-
default: !0
|
|
621
|
-
},
|
|
622
|
-
remoteShowSuffix: Boolean,
|
|
623
|
-
placement: {
|
|
624
|
-
type: fe(String),
|
|
625
|
-
values: Cl,
|
|
626
|
-
default: "bottom-start"
|
|
627
|
-
},
|
|
628
|
-
fallbackPlacements: {
|
|
629
|
-
type: fe(Array),
|
|
630
|
-
default: ["bottom-start", "top-start", "right", "left"]
|
|
631
|
-
},
|
|
632
|
-
ariaLabel: {
|
|
633
|
-
type: String,
|
|
634
|
-
default: void 0
|
|
635
|
-
}
|
|
636
|
-
}), tt = "ElSelect", Xl = oe({
|
|
637
|
-
name: tt,
|
|
638
|
-
componentName: tt,
|
|
639
|
-
components: {
|
|
640
|
-
ElInput: bl,
|
|
641
|
-
ElSelectMenu: Gl,
|
|
642
|
-
ElOption: $e,
|
|
643
|
-
ElOptions: Yl,
|
|
644
|
-
ElTag: Tl,
|
|
645
|
-
ElScrollbar: Il,
|
|
646
|
-
ElTooltip: Ol,
|
|
647
|
-
ElIcon: gl
|
|
648
|
-
},
|
|
649
|
-
directives: { ClickOutside: Vl },
|
|
650
|
-
props: Zl,
|
|
651
|
-
emits: [
|
|
652
|
-
W,
|
|
653
|
-
at,
|
|
654
|
-
"remove-tag",
|
|
655
|
-
"clear",
|
|
656
|
-
"visible-change",
|
|
657
|
-
"focus",
|
|
658
|
-
"blur"
|
|
659
|
-
],
|
|
660
|
-
setup(e, { emit: n }) {
|
|
661
|
-
const s = Ql(e, n);
|
|
662
|
-
return ot(Se, ge({
|
|
663
|
-
props: e,
|
|
664
|
-
states: s.states,
|
|
665
|
-
optionsArray: s.optionsArray,
|
|
666
|
-
handleOptionSelect: s.handleOptionSelect,
|
|
667
|
-
onOptionCreate: s.onOptionCreate,
|
|
668
|
-
onOptionDestroy: s.onOptionDestroy,
|
|
669
|
-
selectRef: s.selectRef,
|
|
670
|
-
setSelected: s.setSelected
|
|
671
|
-
})), {
|
|
672
|
-
...s
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
}), Jl = ["id", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label"], xl = ["textContent"];
|
|
676
|
-
function _l(e, n, s, f, r, v) {
|
|
677
|
-
const l = K("el-tag"), h = K("el-tooltip"), c = K("el-icon"), S = K("el-option"), u = K("el-options"), E = K("el-scrollbar"), I = K("el-select-menu"), m = Zt("click-outside");
|
|
678
|
-
return le((b(), w("div", {
|
|
679
|
-
ref: "selectRef",
|
|
680
|
-
class: d([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
|
|
681
|
-
onMouseenter: n[14] || (n[14] = (g) => e.states.inputHovering = !0),
|
|
682
|
-
onMouseleave: n[15] || (n[15] = (g) => e.states.inputHovering = !1),
|
|
683
|
-
onClick: n[16] || (n[16] = F((...g) => e.toggleMenu && e.toggleMenu(...g), ["stop"]))
|
|
684
|
-
}, [
|
|
685
|
-
A(h, {
|
|
686
|
-
ref: "tooltipRef",
|
|
687
|
-
visible: e.dropdownMenuVisible,
|
|
688
|
-
placement: e.placement,
|
|
689
|
-
teleported: e.teleported,
|
|
690
|
-
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
691
|
-
"popper-options": e.popperOptions,
|
|
692
|
-
"fallback-placements": e.fallbackPlacements,
|
|
693
|
-
effect: e.effect,
|
|
694
|
-
pure: "",
|
|
695
|
-
trigger: "click",
|
|
696
|
-
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
697
|
-
"stop-popper-mouse-event": !1,
|
|
698
|
-
"gpu-acceleration": !1,
|
|
699
|
-
persistent: e.persistent,
|
|
700
|
-
onBeforeShow: e.handleMenuEnter,
|
|
701
|
-
onHide: n[13] || (n[13] = (g) => e.states.isBeforeHide = !1)
|
|
702
|
-
}, {
|
|
703
|
-
default: R(() => {
|
|
704
|
-
var g;
|
|
705
|
-
return [
|
|
706
|
-
M("div", {
|
|
707
|
-
ref: "wrapperRef",
|
|
708
|
-
class: d([
|
|
709
|
-
e.nsSelect.e("wrapper"),
|
|
710
|
-
e.nsSelect.is("focused", e.isFocused),
|
|
711
|
-
e.nsSelect.is("hovering", e.states.inputHovering),
|
|
712
|
-
e.nsSelect.is("filterable", e.filterable),
|
|
713
|
-
e.nsSelect.is("disabled", e.selectDisabled)
|
|
714
|
-
])
|
|
715
|
-
}, [
|
|
716
|
-
e.$slots.prefix ? (b(), w("div", {
|
|
717
|
-
key: 0,
|
|
718
|
-
ref: "prefixRef",
|
|
719
|
-
class: d(e.nsSelect.e("prefix"))
|
|
720
|
-
}, [
|
|
721
|
-
k(e.$slots, "prefix")
|
|
722
|
-
], 2)) : $("v-if", !0),
|
|
723
|
-
M("div", {
|
|
724
|
-
ref: "selectionRef",
|
|
725
|
-
class: d([
|
|
726
|
-
e.nsSelect.e("selection"),
|
|
727
|
-
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
|
|
728
|
-
])
|
|
729
|
-
}, [
|
|
730
|
-
e.multiple ? k(e.$slots, "tag", { key: 0 }, () => [
|
|
731
|
-
(b(!0), w(Je, null, xe(e.showTagList, (a) => (b(), w("div", {
|
|
732
|
-
key: e.getValueKey(a),
|
|
733
|
-
class: d(e.nsSelect.e("selected-item"))
|
|
734
|
-
}, [
|
|
735
|
-
A(l, {
|
|
736
|
-
closable: !e.selectDisabled && !a.isDisabled,
|
|
737
|
-
size: e.collapseTagSize,
|
|
738
|
-
type: e.tagType,
|
|
739
|
-
"disable-transitions": "",
|
|
740
|
-
style: ve(e.tagStyle),
|
|
741
|
-
onClose: (T) => e.deleteTag(T, a)
|
|
742
|
-
}, {
|
|
743
|
-
default: R(() => [
|
|
744
|
-
M("span", {
|
|
745
|
-
class: d(e.nsSelect.e("tags-text"))
|
|
746
|
-
}, z(a.currentLabel), 3)
|
|
747
|
-
]),
|
|
748
|
-
_: 2
|
|
749
|
-
}, 1032, ["closable", "size", "type", "style", "onClose"])
|
|
750
|
-
], 2))), 128)),
|
|
751
|
-
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (b(), N(h, {
|
|
752
|
-
key: 0,
|
|
753
|
-
ref: "tagTooltipRef",
|
|
754
|
-
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
|
|
755
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
756
|
-
effect: e.effect,
|
|
757
|
-
placement: "bottom",
|
|
758
|
-
teleported: e.teleported
|
|
759
|
-
}, {
|
|
760
|
-
default: R(() => [
|
|
761
|
-
M("div", {
|
|
762
|
-
ref: "collapseItemRef",
|
|
763
|
-
class: d(e.nsSelect.e("selected-item"))
|
|
764
|
-
}, [
|
|
765
|
-
A(l, {
|
|
766
|
-
closable: !1,
|
|
767
|
-
size: e.collapseTagSize,
|
|
768
|
-
type: e.tagType,
|
|
769
|
-
"disable-transitions": "",
|
|
770
|
-
style: ve(e.collapseTagStyle)
|
|
771
|
-
}, {
|
|
772
|
-
default: R(() => [
|
|
773
|
-
M("span", {
|
|
774
|
-
class: d(e.nsSelect.e("tags-text"))
|
|
775
|
-
}, " + " + z(e.states.selected.length - e.maxCollapseTags), 3)
|
|
776
|
-
]),
|
|
777
|
-
_: 1
|
|
778
|
-
}, 8, ["size", "type", "style"])
|
|
779
|
-
], 2)
|
|
780
|
-
]),
|
|
781
|
-
content: R(() => [
|
|
782
|
-
M("div", {
|
|
783
|
-
ref: "tagMenuRef",
|
|
784
|
-
class: d(e.nsSelect.e("selection"))
|
|
785
|
-
}, [
|
|
786
|
-
(b(!0), w(Je, null, xe(e.collapseTagList, (a) => (b(), w("div", {
|
|
787
|
-
key: e.getValueKey(a),
|
|
788
|
-
class: d(e.nsSelect.e("selected-item"))
|
|
789
|
-
}, [
|
|
790
|
-
A(l, {
|
|
791
|
-
class: "in-tooltip",
|
|
792
|
-
closable: !e.selectDisabled && !a.isDisabled,
|
|
793
|
-
size: e.collapseTagSize,
|
|
794
|
-
type: e.tagType,
|
|
795
|
-
"disable-transitions": "",
|
|
796
|
-
onClose: (T) => e.deleteTag(T, a)
|
|
797
|
-
}, {
|
|
798
|
-
default: R(() => [
|
|
799
|
-
M("span", {
|
|
800
|
-
class: d(e.nsSelect.e("tags-text"))
|
|
801
|
-
}, z(a.currentLabel), 3)
|
|
802
|
-
]),
|
|
803
|
-
_: 2
|
|
804
|
-
}, 1032, ["closable", "size", "type", "onClose"])
|
|
805
|
-
], 2))), 128))
|
|
806
|
-
], 2)
|
|
807
|
-
]),
|
|
808
|
-
_: 1
|
|
809
|
-
}, 8, ["disabled", "effect", "teleported"])) : $("v-if", !0)
|
|
810
|
-
]) : $("v-if", !0),
|
|
811
|
-
e.selectDisabled ? $("v-if", !0) : (b(), w("div", {
|
|
812
|
-
key: 1,
|
|
813
|
-
class: d([
|
|
814
|
-
e.nsSelect.e("selected-item"),
|
|
815
|
-
e.nsSelect.e("input-wrapper"),
|
|
816
|
-
e.nsSelect.is("hidden", !e.filterable)
|
|
817
|
-
])
|
|
818
|
-
}, [
|
|
819
|
-
le(M("input", {
|
|
820
|
-
id: e.inputId,
|
|
821
|
-
ref: "inputRef",
|
|
822
|
-
"onUpdate:modelValue": n[0] || (n[0] = (a) => e.states.inputValue = a),
|
|
823
|
-
type: "text",
|
|
824
|
-
class: d([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
|
|
825
|
-
disabled: e.selectDisabled,
|
|
826
|
-
autocomplete: e.autocomplete,
|
|
827
|
-
style: ve(e.inputStyle),
|
|
828
|
-
role: "combobox",
|
|
829
|
-
readonly: !e.filterable,
|
|
830
|
-
spellcheck: "false",
|
|
831
|
-
"aria-activedescendant": ((g = e.hoverOption) == null ? void 0 : g.id) || "",
|
|
832
|
-
"aria-controls": e.contentId,
|
|
833
|
-
"aria-expanded": e.dropdownMenuVisible,
|
|
834
|
-
"aria-label": e.ariaLabel,
|
|
835
|
-
"aria-autocomplete": "none",
|
|
836
|
-
"aria-haspopup": "listbox",
|
|
837
|
-
onFocus: n[1] || (n[1] = (...a) => e.handleFocus && e.handleFocus(...a)),
|
|
838
|
-
onBlur: n[2] || (n[2] = (...a) => e.handleBlur && e.handleBlur(...a)),
|
|
839
|
-
onKeydown: [
|
|
840
|
-
n[3] || (n[3] = te(F((a) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
|
|
841
|
-
n[4] || (n[4] = te(F((a) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
|
|
842
|
-
n[5] || (n[5] = te(F((...a) => e.handleEsc && e.handleEsc(...a), ["stop", "prevent"]), ["esc"])),
|
|
843
|
-
n[6] || (n[6] = te(F((...a) => e.selectOption && e.selectOption(...a), ["stop", "prevent"]), ["enter"])),
|
|
844
|
-
n[7] || (n[7] = te(F((...a) => e.deletePrevTag && e.deletePrevTag(...a), ["stop"]), ["delete"]))
|
|
845
|
-
],
|
|
846
|
-
onCompositionstart: n[8] || (n[8] = (...a) => e.handleCompositionStart && e.handleCompositionStart(...a)),
|
|
847
|
-
onCompositionupdate: n[9] || (n[9] = (...a) => e.handleCompositionUpdate && e.handleCompositionUpdate(...a)),
|
|
848
|
-
onCompositionend: n[10] || (n[10] = (...a) => e.handleCompositionEnd && e.handleCompositionEnd(...a)),
|
|
849
|
-
onInput: n[11] || (n[11] = (...a) => e.onInput && e.onInput(...a)),
|
|
850
|
-
onClick: n[12] || (n[12] = F((...a) => e.toggleMenu && e.toggleMenu(...a), ["stop"]))
|
|
851
|
-
}, null, 46, Jl), [
|
|
852
|
-
[Xt, e.states.inputValue]
|
|
853
|
-
]),
|
|
854
|
-
e.filterable ? (b(), w("span", {
|
|
855
|
-
key: 0,
|
|
856
|
-
ref: "calculatorRef",
|
|
857
|
-
"aria-hidden": "true",
|
|
858
|
-
class: d(e.nsSelect.e("input-calculator")),
|
|
859
|
-
textContent: z(e.states.inputValue)
|
|
860
|
-
}, null, 10, xl)) : $("v-if", !0)
|
|
861
|
-
], 2)),
|
|
862
|
-
e.shouldShowPlaceholder ? (b(), w("div", {
|
|
863
|
-
key: 2,
|
|
864
|
-
class: d([
|
|
865
|
-
e.nsSelect.e("selected-item"),
|
|
866
|
-
e.nsSelect.e("placeholder"),
|
|
867
|
-
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
|
|
868
|
-
])
|
|
869
|
-
}, [
|
|
870
|
-
M("span", null, z(e.currentPlaceholder), 1)
|
|
871
|
-
], 2)) : $("v-if", !0)
|
|
872
|
-
], 2),
|
|
873
|
-
M("div", {
|
|
874
|
-
ref: "suffixRef",
|
|
875
|
-
class: d(e.nsSelect.e("suffix"))
|
|
876
|
-
}, [
|
|
877
|
-
e.iconComponent && !e.showClose ? (b(), N(c, {
|
|
878
|
-
key: 0,
|
|
879
|
-
class: d([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
|
|
880
|
-
}, {
|
|
881
|
-
default: R(() => [
|
|
882
|
-
(b(), N(we(e.iconComponent)))
|
|
883
|
-
]),
|
|
884
|
-
_: 1
|
|
885
|
-
}, 8, ["class"])) : $("v-if", !0),
|
|
886
|
-
e.showClose && e.clearIcon ? (b(), N(c, {
|
|
887
|
-
key: 1,
|
|
888
|
-
class: d([e.nsSelect.e("caret"), e.nsSelect.e("icon")]),
|
|
889
|
-
onClick: e.handleClearClick
|
|
890
|
-
}, {
|
|
891
|
-
default: R(() => [
|
|
892
|
-
(b(), N(we(e.clearIcon)))
|
|
893
|
-
]),
|
|
894
|
-
_: 1
|
|
895
|
-
}, 8, ["class", "onClick"])) : $("v-if", !0),
|
|
896
|
-
e.validateState && e.validateIcon ? (b(), N(c, {
|
|
897
|
-
key: 2,
|
|
898
|
-
class: d([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
|
|
899
|
-
}, {
|
|
900
|
-
default: R(() => [
|
|
901
|
-
(b(), N(we(e.validateIcon)))
|
|
902
|
-
]),
|
|
903
|
-
_: 1
|
|
904
|
-
}, 8, ["class"])) : $("v-if", !0)
|
|
905
|
-
], 2)
|
|
906
|
-
], 2)
|
|
907
|
-
];
|
|
908
|
-
}),
|
|
909
|
-
content: R(() => [
|
|
910
|
-
A(I, { ref: "menuRef" }, {
|
|
911
|
-
default: R(() => [
|
|
912
|
-
e.$slots.header ? (b(), w("div", {
|
|
913
|
-
key: 0,
|
|
914
|
-
class: d(e.nsSelect.be("dropdown", "header"))
|
|
915
|
-
}, [
|
|
916
|
-
k(e.$slots, "header")
|
|
917
|
-
], 2)) : $("v-if", !0),
|
|
918
|
-
le(A(E, {
|
|
919
|
-
id: e.contentId,
|
|
920
|
-
ref: "scrollbarRef",
|
|
921
|
-
tag: "ul",
|
|
922
|
-
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
|
|
923
|
-
"view-class": e.nsSelect.be("dropdown", "list"),
|
|
924
|
-
class: d([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
|
|
925
|
-
role: "listbox",
|
|
926
|
-
"aria-label": e.ariaLabel,
|
|
927
|
-
"aria-orientation": "vertical"
|
|
928
|
-
}, {
|
|
929
|
-
default: R(() => [
|
|
930
|
-
e.showNewOption ? (b(), N(S, {
|
|
931
|
-
key: 0,
|
|
932
|
-
value: e.states.inputValue,
|
|
933
|
-
created: !0
|
|
934
|
-
}, null, 8, ["value"])) : $("v-if", !0),
|
|
935
|
-
A(u, null, {
|
|
936
|
-
default: R(() => [
|
|
937
|
-
k(e.$slots, "default")
|
|
938
|
-
]),
|
|
939
|
-
_: 3
|
|
940
|
-
})
|
|
941
|
-
]),
|
|
942
|
-
_: 3
|
|
943
|
-
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
|
|
944
|
-
[Ee, e.states.options.size > 0 && !e.loading]
|
|
945
|
-
]),
|
|
946
|
-
e.$slots.loading && e.loading ? (b(), w("div", {
|
|
947
|
-
key: 1,
|
|
948
|
-
class: d(e.nsSelect.be("dropdown", "loading"))
|
|
949
|
-
}, [
|
|
950
|
-
k(e.$slots, "loading")
|
|
951
|
-
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (b(), w("div", {
|
|
952
|
-
key: 2,
|
|
953
|
-
class: d(e.nsSelect.be("dropdown", "empty"))
|
|
954
|
-
}, [
|
|
955
|
-
k(e.$slots, "empty", {}, () => [
|
|
956
|
-
M("span", null, z(e.emptyText), 1)
|
|
957
|
-
])
|
|
958
|
-
], 2)) : $("v-if", !0),
|
|
959
|
-
e.$slots.footer ? (b(), w("div", {
|
|
960
|
-
key: 3,
|
|
961
|
-
class: d(e.nsSelect.be("dropdown", "footer"))
|
|
962
|
-
}, [
|
|
963
|
-
k(e.$slots, "footer")
|
|
964
|
-
], 2)) : $("v-if", !0)
|
|
965
|
-
]),
|
|
966
|
-
_: 3
|
|
967
|
-
}, 512)
|
|
968
|
-
]),
|
|
969
|
-
_: 3
|
|
970
|
-
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "onBeforeShow"])
|
|
971
|
-
], 34)), [
|
|
972
|
-
[m, e.handleClickOutside, e.popperRef]
|
|
973
|
-
]);
|
|
974
|
-
}
|
|
975
|
-
var en = /* @__PURE__ */ he(Xl, [["render", _l], ["__file", "select.vue"]]);
|
|
976
|
-
const tn = oe({
|
|
977
|
-
name: "ElOptionGroup",
|
|
978
|
-
componentName: "ElOptionGroup",
|
|
979
|
-
props: {
|
|
980
|
-
label: String,
|
|
981
|
-
disabled: Boolean
|
|
982
|
-
},
|
|
983
|
-
setup(e) {
|
|
984
|
-
const n = ne("select"), s = O(null), f = Ve(), r = O([]);
|
|
985
|
-
ot(rt, ge({
|
|
986
|
-
...nt(e)
|
|
987
|
-
}));
|
|
988
|
-
const v = i(() => r.value.some((c) => c.visible === !0)), l = (c) => {
|
|
989
|
-
const S = [];
|
|
990
|
-
return B(c.children) && c.children.forEach((u) => {
|
|
991
|
-
var E, I;
|
|
992
|
-
u.type && u.type.name === "ElOption" && u.component && u.component.proxy ? S.push(u.component.proxy) : (E = u.children) != null && E.length ? S.push(...l(u)) : (I = u.component) != null && I.subTree && S.push(...l(u.component.subTree));
|
|
993
|
-
}), S;
|
|
994
|
-
}, h = () => {
|
|
995
|
-
r.value = l(f.subTree);
|
|
996
|
-
};
|
|
997
|
-
return Te(() => {
|
|
998
|
-
h();
|
|
999
|
-
}), hl(s, h, {
|
|
1000
|
-
attributes: !0,
|
|
1001
|
-
subtree: !0,
|
|
1002
|
-
childList: !0
|
|
1003
|
-
}), {
|
|
1004
|
-
groupRef: s,
|
|
1005
|
-
visible: v,
|
|
1006
|
-
ns: n
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
});
|
|
1010
|
-
function ln(e, n, s, f, r, v) {
|
|
1011
|
-
return le((b(), w("ul", {
|
|
1012
|
-
ref: "groupRef",
|
|
1013
|
-
class: d(e.ns.be("group", "wrap"))
|
|
1014
|
-
}, [
|
|
1015
|
-
M("li", {
|
|
1016
|
-
class: d(e.ns.be("group", "title"))
|
|
1017
|
-
}, z(e.label), 3),
|
|
1018
|
-
M("li", null, [
|
|
1019
|
-
M("ul", {
|
|
1020
|
-
class: d(e.ns.b("group"))
|
|
1021
|
-
}, [
|
|
1022
|
-
k(e.$slots, "default")
|
|
1023
|
-
], 2)
|
|
1024
|
-
])
|
|
1025
|
-
], 2)), [
|
|
1026
|
-
[Ee, e.visible]
|
|
1027
|
-
]);
|
|
1028
|
-
}
|
|
1029
|
-
var ut = /* @__PURE__ */ he(tn, [["render", ln], ["__file", "option-group.vue"]]);
|
|
1030
|
-
const dn = Sl(en, {
|
|
1031
|
-
Option: $e,
|
|
1032
|
-
OptionGroup: ut
|
|
1033
|
-
}), cn = it($e);
|
|
1034
|
-
it(ut);
|
|
1035
|
-
export {
|
|
1036
|
-
cn as E,
|
|
1037
|
-
dn as a,
|
|
1038
|
-
Wl as e,
|
|
1039
|
-
Se as s
|
|
1040
|
-
};
|