st-comp 0.0.279 → 0.0.280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -14
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +342 -547
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +294 -294
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +253 -253
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +579 -553
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +23 -24
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +30 -29
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +517 -425
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +46 -46
- package/es/User.cjs +1 -1
- package/es/User.js +898 -866
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +110 -109
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +605 -443
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +3079 -2913
- package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
- package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +51 -51
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +1929 -2261
- package/es/_baseClone-10bdb989.cjs +1 -0
- package/es/_baseClone-98af8b33.js +210 -0
- package/es/base-d987e5c9.cjs +5 -0
- package/es/base-dd156b8e.js +790 -0
- package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
- package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
- package/es/clamp-17c4d8aa.cjs +1 -0
- package/es/clamp-c7512966.js +10 -0
- package/es/config-provider-33a127c4.cjs +1 -0
- package/es/config-provider-563023c9.js +86 -0
- package/es/debounce-0a98a9c6.js +57 -0
- package/es/debounce-37b17615.cjs +1 -0
- package/es/dropdown-ce7496c7.cjs +1 -0
- package/es/dropdown-feea8702.js +178 -0
- package/es/el-autocomplete-d9253bba.cjs +1 -0
- package/es/el-autocomplete-eac54f9f.js +434 -0
- package/es/el-button-8259594b.cjs +1 -0
- package/es/el-button-8a9721f8.js +343 -0
- package/es/el-checkbox-6303fc92.cjs +1 -0
- package/es/el-checkbox-c328b097.js +566 -0
- package/es/el-dialog-67536fac.js +252 -0
- package/es/el-dialog-8788bcc1.cjs +1 -0
- package/es/el-divider-3f0320be.cjs +1 -0
- package/es/el-divider-c5d72961.js +51 -0
- package/es/el-empty-552baf04.js +159 -0
- package/es/el-empty-58bc2a10.cjs +1 -0
- package/es/el-form-item-8efcf2c3.js +1265 -0
- package/es/el-form-item-95e68669.cjs +12 -0
- package/es/el-input-c8a9bb71.cjs +1 -0
- package/es/el-input-e66500b7.js +761 -0
- package/es/el-input-number-68ee0d65.js +390 -0
- package/es/el-input-number-d7a81922.cjs +1 -0
- package/es/el-loading-62132db2.cjs +1 -0
- package/es/el-loading-db4c6d13.js +190 -0
- package/es/el-menu-item-4b8e7794.cjs +1 -0
- package/es/el-menu-item-c2523d82.js +824 -0
- package/es/el-message-box-7c13546c.js +481 -0
- package/es/el-message-box-fed174f0.cjs +1 -0
- package/es/el-overlay-17299785.cjs +1 -0
- package/es/el-overlay-36f223e9.js +444 -0
- package/es/el-popconfirm-520b2928.cjs +1 -0
- package/es/el-popconfirm-a857c54a.js +190 -0
- package/es/el-popper-852446fd.js +2235 -0
- package/es/el-popper-f824c63b.cjs +1 -0
- package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
- package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
- package/es/el-segmented-45dcc036.cjs +1 -0
- package/es/el-segmented-bf08279f.js +168 -0
- package/es/el-select-a34348e1.js +1535 -0
- package/es/el-select-d2958ae8.cjs +1 -0
- package/es/el-table-column-ad70ee0e.cjs +14 -0
- package/es/el-table-column-e2be313e.js +3651 -0
- package/es/el-tag-527f06f0.cjs +1 -0
- package/es/el-tag-9bcfae32.js +77 -0
- package/es/el-text-f9379288.js +84 -0
- package/es/el-text-fc345ffd.cjs +1 -0
- package/es/index-2419d69a.js +468 -0
- package/es/index-3806160e.js +710 -0
- package/es/index-3a0a7c36.cjs +1 -0
- package/es/index-3e7d5ffb.cjs +1 -0
- package/es/index-3ed0c678.cjs +1 -0
- package/es/index-47d30a52.js +372 -0
- package/es/index-5dec535a.cjs +1 -0
- package/es/index-5e76a22d.cjs +1 -0
- package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
- package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
- package/es/index-71ba4c28.cjs +1 -0
- package/es/index-7711aa69.cjs +1 -0
- package/es/index-7c4d8f5d.js +47 -0
- package/es/index-86678b72.js +131 -0
- package/es/index-99bb359f.cjs +1 -0
- package/es/index-99d4335d.cjs +1 -0
- package/es/index-a0522466.js +413 -0
- package/es/index-a181f161.js +429 -0
- package/es/index-b9a26e7f.js +141 -0
- package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
- package/es/index-d372e68f.cjs +5 -0
- package/es/index-de9ad85c.js +12 -0
- package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
- package/es/index-f5474dcc.cjs +3 -0
- package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
- package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
- package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
- package/es/scroll-07bade1e.cjs +1 -0
- package/es/scroll-70271cb1.js +35 -0
- package/es/style.css +1 -1
- package/es/toNumber-b47ceb68.cjs +1 -0
- package/es/toNumber-f077c66a.js +31 -0
- package/es/use-form-item-0a831287.cjs +2 -0
- package/es/use-form-item-187cd7db.js +422 -0
- package/es/use-global-config-17dafd40.js +71 -0
- package/es/use-global-config-c90c91f7.cjs +1 -0
- package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
- package/es/validator-ee5bc3eb.cjs +1 -0
- package/es/vnode-6f7b84f0.cjs +1 -0
- package/es/vnode-8ee9bf4e.js +12 -0
- package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
- package/es/zh-cn-a22a6792.cjs +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +271 -252
- package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
- package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_initCloneObject-5e73c9c8.js +0 -81
- package/es/_initCloneObject-a5832933.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/config-provider-06ea6b42.cjs +0 -1
- package/es/config-provider-88b637a8.js +0 -59
- package/es/dayjs.min-2c20abe6.cjs +0 -1
- package/es/dayjs.min-8313b006.js +0 -299
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-4ce4c3e2.cjs +0 -1
- package/es/dropdown-72fbc15d.js +0 -178
- package/es/el-autocomplete-6cafcdf1.js +0 -329
- package/es/el-autocomplete-e0857c5b.cjs +0 -1
- package/es/el-button-613e0bb2.cjs +0 -1
- package/es/el-button-94d3de38.js +0 -272
- package/es/el-checkbox-6d4cb393.js +0 -459
- package/es/el-checkbox-e90762df.cjs +0 -1
- package/es/el-dialog-02942e22.cjs +0 -1
- package/es/el-dialog-5e30161f.js +0 -276
- package/es/el-divider-4713d74c.cjs +0 -1
- package/es/el-divider-4e059794.js +0 -45
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-empty-33cb66f1.js +0 -183
- package/es/el-form-item-44f060d8.cjs +0 -12
- package/es/el-form-item-9e8969ea.js +0 -1269
- package/es/el-input-342b2def.js +0 -531
- package/es/el-input-9a9a7f7f.cjs +0 -1
- package/es/el-input-number-65c847d6.cjs +0 -1
- package/es/el-input-number-c22b803a.js +0 -311
- package/es/el-loading-8179b497.cjs +0 -1
- package/es/el-loading-bcc51e3d.js +0 -203
- package/es/el-menu-item-339baf6d.js +0 -768
- package/es/el-menu-item-83186444.cjs +0 -1
- package/es/el-message-box-035b699c.js +0 -489
- package/es/el-message-box-c62d3217.cjs +0 -1
- package/es/el-overlay-3e17604b.js +0 -324
- package/es/el-overlay-8f1da9e8.cjs +0 -1
- package/es/el-popconfirm-4e32ec1b.cjs +0 -1
- package/es/el-popconfirm-f8a86e2c.js +0 -162
- package/es/el-popper-a4f3ae4d.cjs +0 -1
- package/es/el-popper-fbd0dcea.js +0 -2094
- package/es/el-segmented-56bd58a8.js +0 -142
- package/es/el-segmented-833ac177.cjs +0 -1
- package/es/el-select-44fa547d.js +0 -1256
- package/es/el-select-70806166.cjs +0 -1
- package/es/el-table-column-3e2cdfca.cjs +0 -14
- package/es/el-table-column-b74a857d.js +0 -3432
- package/es/el-tag-66c83156.js +0 -117
- package/es/el-tag-9c2f329f.cjs +0 -1
- package/es/el-text-034bd3f4.js +0 -67
- package/es/el-text-6b2374bb.cjs +0 -1
- package/es/index-00f6ca75.cjs +0 -1
- package/es/index-185792a7.cjs +0 -1
- package/es/index-1e2a38ab.js +0 -113
- package/es/index-2e331d74.js +0 -10
- package/es/index-3153c1db.cjs +0 -1
- package/es/index-5216d5f5.js +0 -406
- package/es/index-5c0dd943.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-870b6c9d.cjs +0 -1
- package/es/index-8c2d7e05.js +0 -368
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9d16cea8.cjs +0 -1
- package/es/index-ac8dc53d.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c5f2d372.js +0 -326
- package/es/index-c6584658.js +0 -163
- package/es/index-d77a7336.js +0 -204
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index-f034b910.js +0 -60
- package/es/index-f1c702f6.cjs +0 -1
- package/es/index-f58b2920.cjs +0 -1
- package/es/scroll-679bd6bf.js +0 -35
- package/es/scroll-b108dabd.cjs +0 -1
- package/es/use-form-common-props-ac666630.cjs +0 -1
- package/es/use-form-common-props-ed72e914.js +0 -364
- package/es/use-global-config-23472471.cjs +0 -1
- package/es/use-global-config-ee406d58.js +0 -72
- package/es/validator-366dbf39.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/es/zh-cn-c21d12d8.cjs +0 -1
package/es/el-select-44fa547d.js
DELETED
|
@@ -1,1256 +0,0 @@
|
|
|
1
|
-
import { shallowRef as il, ref as T, computed as u, inject as we, getCurrentInstance as Ee, toRaw as rl, watch as G, defineComponent as pe, unref as $e, reactive as de, toRefs as Be, onBeforeUnmount as ft, nextTick as Q, withDirectives as ue, openBlock as v, createElementBlock as w, normalizeClass as b, withModifiers as F, renderSlot as M, createElementVNode as k, toDisplayString as H, vShow as Pe, onMounted as We, normalizeStyle as Ce, createCommentVNode as L, watchEffect as ul, provide as vt, isVNode as dl, resolveComponent as q, resolveDirective as cl, toHandlerKey as pl, createVNode as _, withCtx as $, Fragment as se, renderList as Se, createTextVNode as ot, createBlock as P, withKeys as ie, vModelText as fl, resolveDynamicComponent as Le, mergeProps as at, normalizeProps as vl } from "vue";
|
|
2
|
-
import { b as ml, d as st, a as bl, U as x, C as Fe, g as it, m as hl, u as gl, E as yl } from "./el-popper-fbd0dcea.js";
|
|
3
|
-
import { s as Sl, E as Ol } from "./index-c5f2d372.js";
|
|
4
|
-
import { t as rt, E as Cl } from "./index-1e2a38ab.js";
|
|
5
|
-
import { t as wl, g as El, E as Vl } from "./index-eb96e074.js";
|
|
6
|
-
import { g as z, u as Il } from "./index-d77a7336.js";
|
|
7
|
-
import { b as mt, f as U, u as ce, _ as Ve, j, i as Oe, C as ut, s as Tl, p as kl, x as re, D as Dl, c as Ml, e as W, w as Rl, l as bt } from "./base-a5af3db3.js";
|
|
8
|
-
import { c as X } from "./castArray-7741a212.js";
|
|
9
|
-
import { i as le, u as $l, m as Ll } from "./index-8c2d7e05.js";
|
|
10
|
-
import { u as ht } from "./index-960806da.js";
|
|
11
|
-
import { u as ee, d as Nl, f as Bl, V as Pl, e as Wl, h as Fl, i as dt, v as zl } from "./use-form-common-props-ed72e914.js";
|
|
12
|
-
import { u as Al, a as Kl } from "./index-f034b910.js";
|
|
13
|
-
import { s as Hl } from "./scroll-679bd6bf.js";
|
|
14
|
-
import { t as Gl, d as Ul } from "./debounce-8d53f4dd.js";
|
|
15
|
-
import { b as jl, C as ql } from "./el-tag-66c83156.js";
|
|
16
|
-
import { f as Ql } from "./vnode-5ddb7ed1.js";
|
|
17
|
-
var ct = 1 / 0, Xl = 17976931348623157e292;
|
|
18
|
-
function Yl(e) {
|
|
19
|
-
if (!e)
|
|
20
|
-
return e === 0 ? e : 0;
|
|
21
|
-
if (e = Gl(e), e === ct || e === -ct) {
|
|
22
|
-
var o = e < 0 ? -1 : 1;
|
|
23
|
-
return o * Xl;
|
|
24
|
-
}
|
|
25
|
-
return e === e ? e : 0;
|
|
26
|
-
}
|
|
27
|
-
function Zl(e) {
|
|
28
|
-
var o = Yl(e), a = o % 1;
|
|
29
|
-
return o === o ? a ? o - a : o : 0;
|
|
30
|
-
}
|
|
31
|
-
function Jl(e, o, a, f) {
|
|
32
|
-
for (var d = e.length, p = a + (f ? 1 : -1); f ? p-- : ++p < d; )
|
|
33
|
-
if (o(e[p], p, e))
|
|
34
|
-
return p;
|
|
35
|
-
return -1;
|
|
36
|
-
}
|
|
37
|
-
var _l = Math.max, xl = Math.min;
|
|
38
|
-
function en(e, o, a) {
|
|
39
|
-
var f = e == null ? 0 : e.length;
|
|
40
|
-
if (!f)
|
|
41
|
-
return -1;
|
|
42
|
-
var d = f - 1;
|
|
43
|
-
return a !== void 0 && (d = Zl(a), d = a < 0 ? _l(f + d, 0) : xl(d, f - 1)), Jl(e, jl(o), d, !0);
|
|
44
|
-
}
|
|
45
|
-
const gt = 11, tn = 2;
|
|
46
|
-
function ln() {
|
|
47
|
-
const e = il(), o = T(0), a = u(() => ({
|
|
48
|
-
minWidth: `${Math.max(o.value, gt)}px`
|
|
49
|
-
}));
|
|
50
|
-
return ee(e, () => {
|
|
51
|
-
var d, p;
|
|
52
|
-
o.value = (p = (d = e.value) == null ? void 0 : d.getBoundingClientRect().width) != null ? p : 0;
|
|
53
|
-
}), {
|
|
54
|
-
calculatorRef: e,
|
|
55
|
-
calculatorWidth: o,
|
|
56
|
-
inputStyle: a
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const yt = {
|
|
60
|
-
label: "label",
|
|
61
|
-
value: "value",
|
|
62
|
-
disabled: "disabled",
|
|
63
|
-
options: "options"
|
|
64
|
-
};
|
|
65
|
-
function nn(e) {
|
|
66
|
-
const o = u(() => ({ ...yt, ...e.props }));
|
|
67
|
-
return {
|
|
68
|
-
aliasProps: o,
|
|
69
|
-
getLabel: (l) => z(l, o.value.label),
|
|
70
|
-
getValue: (l) => z(l, o.value.value),
|
|
71
|
-
getDisabled: (l) => z(l, o.value.disabled),
|
|
72
|
-
getOptions: (l) => z(l, o.value.options)
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const St = Symbol("ElSelectGroup"), Ie = Symbol("ElSelect"), Ne = "ElOption", on = mt({
|
|
76
|
-
value: {
|
|
77
|
-
type: [String, Number, Boolean, Object],
|
|
78
|
-
required: !0
|
|
79
|
-
},
|
|
80
|
-
label: {
|
|
81
|
-
type: [String, Number]
|
|
82
|
-
},
|
|
83
|
-
created: Boolean,
|
|
84
|
-
disabled: Boolean
|
|
85
|
-
}), an = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
86
|
-
function sn(e, o) {
|
|
87
|
-
const a = we(Ie);
|
|
88
|
-
a || ml(Ne, "usage: <el-select><el-option /></el-select/>");
|
|
89
|
-
const f = we(St, { disabled: !1 }), d = u(() => y(X(a.props.modelValue), e.value)), p = u(() => {
|
|
90
|
-
var i;
|
|
91
|
-
if (a.props.multiple) {
|
|
92
|
-
const O = X((i = a.props.modelValue) != null ? i : []);
|
|
93
|
-
return !d.value && O.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
|
|
94
|
-
} else
|
|
95
|
-
return !1;
|
|
96
|
-
}), l = u(() => {
|
|
97
|
-
var i;
|
|
98
|
-
return (i = e.label) != null ? i : U(e.value) ? "" : e.value;
|
|
99
|
-
}), C = u(() => e.value || e.label || ""), h = u(() => e.disabled || o.groupDisabled || p.value), S = Ee(), y = (i = [], O) => {
|
|
100
|
-
if (U(e.value)) {
|
|
101
|
-
const I = a.props.valueKey;
|
|
102
|
-
return i && i.some((R) => rl(z(R, I)) === z(O, I));
|
|
103
|
-
} else
|
|
104
|
-
return i && i.includes(O);
|
|
105
|
-
}, m = () => {
|
|
106
|
-
!e.disabled && !f.disabled && (a.states.hoveringIndex = a.optionsArray.indexOf(S.proxy));
|
|
107
|
-
}, s = (i) => {
|
|
108
|
-
const O = new RegExp(an(i), "i");
|
|
109
|
-
o.visible = O.test(String(l.value)) || e.created;
|
|
110
|
-
};
|
|
111
|
-
return G(() => l.value, () => {
|
|
112
|
-
!e.created && !a.props.remote && a.setSelected();
|
|
113
|
-
}), G(() => e.value, (i, O) => {
|
|
114
|
-
const { remote: I, valueKey: R } = a.props;
|
|
115
|
-
if ((I ? i !== O : !le(i, O)) && (a.onOptionDestroy(O, S.proxy), a.onOptionCreate(S.proxy)), !e.created && !I) {
|
|
116
|
-
if (R && U(i) && U(O) && i[R] === O[R])
|
|
117
|
-
return;
|
|
118
|
-
a.setSelected();
|
|
119
|
-
}
|
|
120
|
-
}), G(() => f.disabled, () => {
|
|
121
|
-
o.groupDisabled = f.disabled;
|
|
122
|
-
}, { immediate: !0 }), {
|
|
123
|
-
select: a,
|
|
124
|
-
currentLabel: l,
|
|
125
|
-
currentValue: C,
|
|
126
|
-
itemSelected: d,
|
|
127
|
-
isDisabled: h,
|
|
128
|
-
hoverItem: m,
|
|
129
|
-
updateOption: s
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
const rn = pe({
|
|
133
|
-
name: Ne,
|
|
134
|
-
componentName: Ne,
|
|
135
|
-
props: on,
|
|
136
|
-
setup(e) {
|
|
137
|
-
const o = ce("select"), a = ht(), f = u(() => [
|
|
138
|
-
o.be("dropdown", "item"),
|
|
139
|
-
o.is("disabled", $e(C)),
|
|
140
|
-
o.is("selected", $e(l)),
|
|
141
|
-
o.is("hovering", $e(s))
|
|
142
|
-
]), d = de({
|
|
143
|
-
index: -1,
|
|
144
|
-
groupDisabled: !1,
|
|
145
|
-
visible: !0,
|
|
146
|
-
hover: !1
|
|
147
|
-
}), {
|
|
148
|
-
currentLabel: p,
|
|
149
|
-
itemSelected: l,
|
|
150
|
-
isDisabled: C,
|
|
151
|
-
select: h,
|
|
152
|
-
hoverItem: S,
|
|
153
|
-
updateOption: y
|
|
154
|
-
} = sn(e, d), { visible: m, hover: s } = Be(d), i = Ee().proxy;
|
|
155
|
-
h.onOptionCreate(i), ft(() => {
|
|
156
|
-
const I = i.value;
|
|
157
|
-
Q(() => {
|
|
158
|
-
const { selected: R } = h.states, g = R.some((c) => c.value === i.value);
|
|
159
|
-
h.states.cachedOptions.get(I) === i && !g && h.states.cachedOptions.delete(I);
|
|
160
|
-
}), h.onOptionDestroy(I, i);
|
|
161
|
-
});
|
|
162
|
-
function O() {
|
|
163
|
-
C.value || h.handleOptionSelect(i);
|
|
164
|
-
}
|
|
165
|
-
return {
|
|
166
|
-
ns: o,
|
|
167
|
-
id: a,
|
|
168
|
-
containerKls: f,
|
|
169
|
-
currentLabel: p,
|
|
170
|
-
itemSelected: l,
|
|
171
|
-
isDisabled: C,
|
|
172
|
-
select: h,
|
|
173
|
-
visible: m,
|
|
174
|
-
hover: s,
|
|
175
|
-
states: d,
|
|
176
|
-
hoverItem: S,
|
|
177
|
-
updateOption: y,
|
|
178
|
-
selectOptionClick: O
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
function un(e, o) {
|
|
183
|
-
return ue((v(), w("li", {
|
|
184
|
-
id: e.id,
|
|
185
|
-
class: b(e.containerKls),
|
|
186
|
-
role: "option",
|
|
187
|
-
"aria-disabled": e.isDisabled || void 0,
|
|
188
|
-
"aria-selected": e.itemSelected,
|
|
189
|
-
onMousemove: e.hoverItem,
|
|
190
|
-
onClick: F(e.selectOptionClick, ["stop"])
|
|
191
|
-
}, [
|
|
192
|
-
M(e.$slots, "default", {}, () => [
|
|
193
|
-
k("span", null, H(e.currentLabel), 1)
|
|
194
|
-
])
|
|
195
|
-
], 42, ["id", "aria-disabled", "aria-selected", "onMousemove", "onClick"])), [
|
|
196
|
-
[Pe, e.visible]
|
|
197
|
-
]);
|
|
198
|
-
}
|
|
199
|
-
var ze = /* @__PURE__ */ Ve(rn, [["render", un], ["__file", "option.vue"]]);
|
|
200
|
-
const dn = pe({
|
|
201
|
-
name: "ElSelectDropdown",
|
|
202
|
-
componentName: "ElSelectDropdown",
|
|
203
|
-
setup() {
|
|
204
|
-
const e = we(Ie), o = ce("select"), a = u(() => e.props.popperClass), f = u(() => e.props.multiple), d = u(() => e.props.fitInputWidth), p = T("");
|
|
205
|
-
function l() {
|
|
206
|
-
var C;
|
|
207
|
-
const h = (C = e.selectRef) == null ? void 0 : C.offsetWidth;
|
|
208
|
-
h ? p.value = `${h - tn}px` : p.value = "";
|
|
209
|
-
}
|
|
210
|
-
return We(() => {
|
|
211
|
-
l(), ee(e.selectRef, l);
|
|
212
|
-
}), {
|
|
213
|
-
ns: o,
|
|
214
|
-
minWidth: p,
|
|
215
|
-
popperClass: a,
|
|
216
|
-
isMultiple: f,
|
|
217
|
-
isFitInputWidth: d
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
function cn(e, o, a, f, d, p) {
|
|
222
|
-
return v(), w("div", {
|
|
223
|
-
class: b([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
|
|
224
|
-
style: Ce({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
|
|
225
|
-
}, [
|
|
226
|
-
e.$slots.header ? (v(), w("div", {
|
|
227
|
-
key: 0,
|
|
228
|
-
class: b(e.ns.be("dropdown", "header"))
|
|
229
|
-
}, [
|
|
230
|
-
M(e.$slots, "header")
|
|
231
|
-
], 2)) : L("v-if", !0),
|
|
232
|
-
M(e.$slots, "default"),
|
|
233
|
-
e.$slots.footer ? (v(), w("div", {
|
|
234
|
-
key: 1,
|
|
235
|
-
class: b(e.ns.be("dropdown", "footer"))
|
|
236
|
-
}, [
|
|
237
|
-
M(e.$slots, "footer")
|
|
238
|
-
], 2)) : L("v-if", !0)
|
|
239
|
-
], 6);
|
|
240
|
-
}
|
|
241
|
-
var pn = /* @__PURE__ */ Ve(dn, [["render", cn], ["__file", "select-dropdown.vue"]]);
|
|
242
|
-
const fn = (e, o) => {
|
|
243
|
-
const { t: a } = Il(), f = ht(), d = ce("select"), p = ce("input"), l = de({
|
|
244
|
-
inputValue: "",
|
|
245
|
-
options: /* @__PURE__ */ new Map(),
|
|
246
|
-
cachedOptions: /* @__PURE__ */ new Map(),
|
|
247
|
-
optionValues: [],
|
|
248
|
-
selected: [],
|
|
249
|
-
selectionWidth: 0,
|
|
250
|
-
collapseItemWidth: 0,
|
|
251
|
-
selectedLabel: "",
|
|
252
|
-
hoveringIndex: -1,
|
|
253
|
-
previousQuery: null,
|
|
254
|
-
inputHovering: !1,
|
|
255
|
-
menuVisibleOnFocus: !1,
|
|
256
|
-
isBeforeHide: !1
|
|
257
|
-
}), C = T(), h = T(), S = T(), y = T(), m = T(), s = T(), i = T(), O = T(), I = T(), R = T(), g = T(), c = T(!1), E = T(), { form: Y, formItem: B } = Nl(), { inputId: A } = Bl(e, {
|
|
258
|
-
formItemContext: B
|
|
259
|
-
}), { valueOnClear: Ke, isEmptyValue: Z } = $l(e), {
|
|
260
|
-
isComposing: He,
|
|
261
|
-
handleCompositionStart: Ot,
|
|
262
|
-
handleCompositionUpdate: Ct,
|
|
263
|
-
handleCompositionEnd: wt
|
|
264
|
-
} = Al({
|
|
265
|
-
afterComposition: (t) => Je(t)
|
|
266
|
-
}), ne = u(() => e.disabled || !!(Y != null && Y.disabled)), { wrapperRef: Ge, isFocused: Te, handleBlur: Et } = Kl(m, {
|
|
267
|
-
disabled: ne,
|
|
268
|
-
afterFocus() {
|
|
269
|
-
e.automaticDropdown && !c.value && (c.value = !0, l.menuVisibleOnFocus = !0);
|
|
270
|
-
},
|
|
271
|
-
beforeBlur(t) {
|
|
272
|
-
var n, r;
|
|
273
|
-
return ((n = S.value) == null ? void 0 : n.isFocusInsideContent(t)) || ((r = y.value) == null ? void 0 : r.isFocusInsideContent(t));
|
|
274
|
-
},
|
|
275
|
-
afterBlur() {
|
|
276
|
-
var t;
|
|
277
|
-
c.value = !1, l.menuVisibleOnFocus = !1, e.validateEvent && ((t = B == null ? void 0 : B.validate) == null || t.call(B, "blur").catch((n) => st()));
|
|
278
|
-
}
|
|
279
|
-
}), ke = u(() => j(e.modelValue) ? e.modelValue.length > 0 : !Z(e.modelValue)), Vt = u(() => {
|
|
280
|
-
var t;
|
|
281
|
-
return (t = Y == null ? void 0 : Y.statusIcon) != null ? t : !1;
|
|
282
|
-
}), It = u(() => e.clearable && !ne.value && ke.value && (Te.value || l.inputHovering)), Ue = u(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), Tt = u(() => d.is("reverse", !!(Ue.value && c.value))), De = u(() => (B == null ? void 0 : B.validateState) || ""), kt = u(() => De.value && Pl[De.value]), Dt = u(() => e.remote ? 300 : 0), Mt = u(() => e.remote && !l.inputValue && l.options.size === 0), Rt = u(() => e.loading ? e.loadingText || a("el.select.loading") : e.filterable && l.inputValue && l.options.size > 0 && oe.value === 0 ? e.noMatchText || a("el.select.noMatch") : l.options.size === 0 ? e.noDataText || a("el.select.noData") : null), oe = u(() => D.value.filter((t) => t.visible).length), D = u(() => {
|
|
283
|
-
const t = Array.from(l.options.values()), n = [];
|
|
284
|
-
return l.optionValues.forEach((r) => {
|
|
285
|
-
const V = t.findIndex((N) => N.value === r);
|
|
286
|
-
V > -1 && n.push(t[V]);
|
|
287
|
-
}), n.length >= t.length ? n : t;
|
|
288
|
-
}), $t = u(() => Array.from(l.cachedOptions.values())), Lt = u(() => {
|
|
289
|
-
const t = D.value.filter((n) => !n.created).some((n) => n.currentLabel === l.inputValue);
|
|
290
|
-
return e.filterable && e.allowCreate && l.inputValue !== "" && !t;
|
|
291
|
-
}), je = () => {
|
|
292
|
-
e.filterable && re(e.filterMethod) || e.filterable && e.remote && re(e.remoteMethod) || D.value.forEach((t) => {
|
|
293
|
-
var n;
|
|
294
|
-
(n = t.updateOption) == null || n.call(t, l.inputValue);
|
|
295
|
-
});
|
|
296
|
-
}, qe = Wl(), Nt = u(() => ["small"].includes(qe.value) ? "small" : "default"), Qe = u({
|
|
297
|
-
get() {
|
|
298
|
-
return c.value && !Mt.value;
|
|
299
|
-
},
|
|
300
|
-
set(t) {
|
|
301
|
-
c.value = t;
|
|
302
|
-
}
|
|
303
|
-
}), Bt = u(() => {
|
|
304
|
-
if (e.multiple && !Oe(e.modelValue))
|
|
305
|
-
return X(e.modelValue).length === 0 && !l.inputValue;
|
|
306
|
-
const t = j(e.modelValue) ? e.modelValue[0] : e.modelValue;
|
|
307
|
-
return e.filterable || Oe(t) ? !l.inputValue : !0;
|
|
308
|
-
}), Pt = u(() => {
|
|
309
|
-
var t;
|
|
310
|
-
const n = (t = e.placeholder) != null ? t : a("el.select.placeholder");
|
|
311
|
-
return e.multiple || !ke.value ? n : l.selectedLabel;
|
|
312
|
-
}), Wt = u(() => ut ? null : "mouseenter");
|
|
313
|
-
G(() => e.modelValue, (t, n) => {
|
|
314
|
-
e.multiple && e.filterable && !e.reserveKeyword && (l.inputValue = "", fe("")), ve(), !le(t, n) && e.validateEvent && (B == null || B.validate("change").catch((r) => st()));
|
|
315
|
-
}, {
|
|
316
|
-
flush: "post",
|
|
317
|
-
deep: !0
|
|
318
|
-
}), G(() => c.value, (t) => {
|
|
319
|
-
t ? fe(l.inputValue) : (l.inputValue = "", l.previousQuery = null, l.isBeforeHide = !0), o("visible-change", t);
|
|
320
|
-
}), G(() => l.options.entries(), () => {
|
|
321
|
-
Tl && (ve(), e.defaultFirstOption && (e.filterable || e.remote) && oe.value && Xe());
|
|
322
|
-
}, {
|
|
323
|
-
flush: "post"
|
|
324
|
-
}), G([() => l.hoveringIndex, D], ([t]) => {
|
|
325
|
-
kl(t) && t > -1 ? E.value = D.value[t] || {} : E.value = {}, D.value.forEach((n) => {
|
|
326
|
-
n.hover = E.value === n;
|
|
327
|
-
});
|
|
328
|
-
}), ul(() => {
|
|
329
|
-
l.isBeforeHide || je();
|
|
330
|
-
});
|
|
331
|
-
const fe = (t) => {
|
|
332
|
-
l.previousQuery === t || He.value || (l.previousQuery = t, e.filterable && re(e.filterMethod) ? e.filterMethod(t) : e.filterable && e.remote && re(e.remoteMethod) && e.remoteMethod(t), e.defaultFirstOption && (e.filterable || e.remote) && oe.value ? Q(Xe) : Q(Ft));
|
|
333
|
-
}, Xe = () => {
|
|
334
|
-
const t = D.value.filter((N) => N.visible && !N.disabled && !N.states.groupDisabled), n = t.find((N) => N.created), r = t[0], V = D.value.map((N) => N.value);
|
|
335
|
-
l.hoveringIndex = tt(V, n || r);
|
|
336
|
-
}, ve = () => {
|
|
337
|
-
if (e.multiple)
|
|
338
|
-
l.selectedLabel = "";
|
|
339
|
-
else {
|
|
340
|
-
const n = j(e.modelValue) ? e.modelValue[0] : e.modelValue, r = Me(n);
|
|
341
|
-
l.selectedLabel = r.currentLabel, l.selected = [r];
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
const t = [];
|
|
345
|
-
Oe(e.modelValue) || X(e.modelValue).forEach((n) => {
|
|
346
|
-
t.push(Me(n));
|
|
347
|
-
}), l.selected = t;
|
|
348
|
-
}, Me = (t) => {
|
|
349
|
-
let n;
|
|
350
|
-
const r = Dl(t);
|
|
351
|
-
for (let te = l.cachedOptions.size - 1; te >= 0; te--) {
|
|
352
|
-
const K = $t.value[te];
|
|
353
|
-
if (r ? z(K.value, e.valueKey) === z(t, e.valueKey) : K.value === t) {
|
|
354
|
-
n = {
|
|
355
|
-
index: D.value.filter((J) => !J.created).indexOf(K),
|
|
356
|
-
value: t,
|
|
357
|
-
currentLabel: K.currentLabel,
|
|
358
|
-
get isDisabled() {
|
|
359
|
-
return K.isDisabled;
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
if (n)
|
|
366
|
-
return n;
|
|
367
|
-
const V = r ? t.label : t ?? "";
|
|
368
|
-
return {
|
|
369
|
-
index: -1,
|
|
370
|
-
value: t,
|
|
371
|
-
currentLabel: V
|
|
372
|
-
};
|
|
373
|
-
}, Ft = () => {
|
|
374
|
-
l.hoveringIndex = D.value.findIndex((t) => l.selected.some((n) => he(n) === he(t)));
|
|
375
|
-
}, zt = () => {
|
|
376
|
-
l.selectionWidth = Number.parseFloat(window.getComputedStyle(h.value).width);
|
|
377
|
-
}, At = () => {
|
|
378
|
-
l.collapseItemWidth = R.value.getBoundingClientRect().width;
|
|
379
|
-
}, Re = () => {
|
|
380
|
-
var t, n;
|
|
381
|
-
(n = (t = S.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
382
|
-
}, Ye = () => {
|
|
383
|
-
var t, n;
|
|
384
|
-
(n = (t = y.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
385
|
-
}, Ze = () => {
|
|
386
|
-
l.inputValue.length > 0 && !c.value && (c.value = !0), fe(l.inputValue);
|
|
387
|
-
}, Je = (t) => {
|
|
388
|
-
if (l.inputValue = t.target.value, e.remote)
|
|
389
|
-
_e();
|
|
390
|
-
else
|
|
391
|
-
return Ze();
|
|
392
|
-
}, _e = Ul(() => {
|
|
393
|
-
Ze();
|
|
394
|
-
}, Dt.value), ae = (t) => {
|
|
395
|
-
le(e.modelValue, t) || o(Fe, t);
|
|
396
|
-
}, Kt = (t) => en(t, (n) => {
|
|
397
|
-
const r = l.cachedOptions.get(n);
|
|
398
|
-
return r && !r.disabled && !r.states.groupDisabled;
|
|
399
|
-
}), Ht = (t) => {
|
|
400
|
-
if (e.multiple && t.code !== bl.delete && t.target.value.length <= 0) {
|
|
401
|
-
const n = X(e.modelValue).slice(), r = Kt(n);
|
|
402
|
-
if (r < 0)
|
|
403
|
-
return;
|
|
404
|
-
const V = n[r];
|
|
405
|
-
n.splice(r, 1), o(x, n), ae(n), o("remove-tag", V);
|
|
406
|
-
}
|
|
407
|
-
}, Gt = (t, n) => {
|
|
408
|
-
const r = l.selected.indexOf(n);
|
|
409
|
-
if (r > -1 && !ne.value) {
|
|
410
|
-
const V = X(e.modelValue).slice();
|
|
411
|
-
V.splice(r, 1), o(x, V), ae(V), o("remove-tag", n.value);
|
|
412
|
-
}
|
|
413
|
-
t.stopPropagation(), be();
|
|
414
|
-
}, xe = (t) => {
|
|
415
|
-
t.stopPropagation();
|
|
416
|
-
const n = e.multiple ? [] : Ke.value;
|
|
417
|
-
if (e.multiple)
|
|
418
|
-
for (const r of l.selected)
|
|
419
|
-
r.isDisabled && n.push(r.value);
|
|
420
|
-
o(x, n), ae(n), l.hoveringIndex = -1, c.value = !1, o("clear"), be();
|
|
421
|
-
}, et = (t) => {
|
|
422
|
-
var n;
|
|
423
|
-
if (e.multiple) {
|
|
424
|
-
const r = X((n = e.modelValue) != null ? n : []).slice(), V = tt(r, t);
|
|
425
|
-
V > -1 ? r.splice(V, 1) : (e.multipleLimit <= 0 || r.length < e.multipleLimit) && r.push(t.value), o(x, r), ae(r), t.created && fe(""), e.filterable && !e.reserveKeyword && (l.inputValue = "");
|
|
426
|
-
} else
|
|
427
|
-
!le(e.modelValue, t.value) && o(x, t.value), ae(t.value), c.value = !1;
|
|
428
|
-
be(), !c.value && Q(() => {
|
|
429
|
-
me(t);
|
|
430
|
-
});
|
|
431
|
-
}, tt = (t, n) => Oe(n) ? -1 : U(n.value) ? t.findIndex((r) => le(z(r, e.valueKey), he(n))) : t.indexOf(n.value), me = (t) => {
|
|
432
|
-
var n, r, V, N, te;
|
|
433
|
-
const K = j(t) ? t[0] : t;
|
|
434
|
-
let ye = null;
|
|
435
|
-
if (K != null && K.value) {
|
|
436
|
-
const J = D.value.filter((sl) => sl.value === K.value);
|
|
437
|
-
J.length > 0 && (ye = J[0].$el);
|
|
438
|
-
}
|
|
439
|
-
if (S.value && ye) {
|
|
440
|
-
const J = (N = (V = (r = (n = S.value) == null ? void 0 : n.popperRef) == null ? void 0 : r.contentRef) == null ? void 0 : V.querySelector) == null ? void 0 : N.call(V, `.${d.be("dropdown", "wrap")}`);
|
|
441
|
-
J && Hl(J, ye);
|
|
442
|
-
}
|
|
443
|
-
(te = g.value) == null || te.handleScroll();
|
|
444
|
-
}, Ut = (t) => {
|
|
445
|
-
l.options.set(t.value, t), l.cachedOptions.set(t.value, t);
|
|
446
|
-
}, jt = (t, n) => {
|
|
447
|
-
l.options.get(t) === n && l.options.delete(t);
|
|
448
|
-
}, qt = u(() => {
|
|
449
|
-
var t, n;
|
|
450
|
-
return (n = (t = S.value) == null ? void 0 : t.popperRef) == null ? void 0 : n.contentRef;
|
|
451
|
-
}), Qt = () => {
|
|
452
|
-
l.isBeforeHide = !1, Q(() => {
|
|
453
|
-
var t;
|
|
454
|
-
(t = g.value) == null || t.update(), me(l.selected);
|
|
455
|
-
});
|
|
456
|
-
}, be = () => {
|
|
457
|
-
var t;
|
|
458
|
-
(t = m.value) == null || t.focus();
|
|
459
|
-
}, Xt = () => {
|
|
460
|
-
var t;
|
|
461
|
-
if (c.value) {
|
|
462
|
-
c.value = !1, Q(() => {
|
|
463
|
-
var n;
|
|
464
|
-
return (n = m.value) == null ? void 0 : n.blur();
|
|
465
|
-
});
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
(t = m.value) == null || t.blur();
|
|
469
|
-
}, Yt = (t) => {
|
|
470
|
-
xe(t);
|
|
471
|
-
}, Zt = (t) => {
|
|
472
|
-
if (c.value = !1, Te.value) {
|
|
473
|
-
const n = new FocusEvent("blur", t);
|
|
474
|
-
Q(() => Et(n));
|
|
475
|
-
}
|
|
476
|
-
}, Jt = () => {
|
|
477
|
-
l.inputValue.length > 0 ? l.inputValue = "" : c.value = !1;
|
|
478
|
-
}, lt = () => {
|
|
479
|
-
ne.value || (ut && (l.inputHovering = !0), l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : c.value = !c.value);
|
|
480
|
-
}, _t = () => {
|
|
481
|
-
if (!c.value)
|
|
482
|
-
lt();
|
|
483
|
-
else {
|
|
484
|
-
const t = D.value[l.hoveringIndex];
|
|
485
|
-
t && !t.isDisabled && et(t);
|
|
486
|
-
}
|
|
487
|
-
}, he = (t) => U(t.value) ? z(t.value, e.valueKey) : t.value, xt = u(() => D.value.filter((t) => t.visible).every((t) => t.isDisabled)), el = u(() => e.multiple ? e.collapseTags ? l.selected.slice(0, e.maxCollapseTags) : l.selected : []), tl = u(() => e.multiple ? e.collapseTags ? l.selected.slice(e.maxCollapseTags) : [] : []), nt = (t) => {
|
|
488
|
-
if (!c.value) {
|
|
489
|
-
c.value = !0;
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
if (!(l.options.size === 0 || oe.value === 0 || He.value) && !xt.value) {
|
|
493
|
-
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));
|
|
494
|
-
const n = D.value[l.hoveringIndex];
|
|
495
|
-
(n.isDisabled || !n.visible) && nt(t), Q(() => me(E.value));
|
|
496
|
-
}
|
|
497
|
-
}, ll = () => {
|
|
498
|
-
if (!h.value)
|
|
499
|
-
return 0;
|
|
500
|
-
const t = window.getComputedStyle(h.value);
|
|
501
|
-
return Number.parseFloat(t.gap || "6px");
|
|
502
|
-
}, nl = u(() => {
|
|
503
|
-
const t = ll(), n = e.filterable ? t + gt : 0;
|
|
504
|
-
return { maxWidth: `${R.value && e.maxCollapseTags === 1 ? l.selectionWidth - l.collapseItemWidth - t - n : l.selectionWidth - n}px` };
|
|
505
|
-
}), ol = u(() => ({ maxWidth: `${l.selectionWidth}px` })), al = (t) => {
|
|
506
|
-
o("popup-scroll", t);
|
|
507
|
-
};
|
|
508
|
-
ee(h, zt), ee(Ge, Re), ee(I, Ye), ee(R, At);
|
|
509
|
-
let ge;
|
|
510
|
-
return G(() => Qe.value, (t) => {
|
|
511
|
-
t ? ge = ee(O, Re).stop : (ge == null || ge(), ge = void 0);
|
|
512
|
-
}), We(() => {
|
|
513
|
-
ve();
|
|
514
|
-
}), {
|
|
515
|
-
inputId: A,
|
|
516
|
-
contentId: f,
|
|
517
|
-
nsSelect: d,
|
|
518
|
-
nsInput: p,
|
|
519
|
-
states: l,
|
|
520
|
-
isFocused: Te,
|
|
521
|
-
expanded: c,
|
|
522
|
-
optionsArray: D,
|
|
523
|
-
hoverOption: E,
|
|
524
|
-
selectSize: qe,
|
|
525
|
-
filteredOptionsCount: oe,
|
|
526
|
-
updateTooltip: Re,
|
|
527
|
-
updateTagTooltip: Ye,
|
|
528
|
-
debouncedOnInputChange: _e,
|
|
529
|
-
onInput: Je,
|
|
530
|
-
deletePrevTag: Ht,
|
|
531
|
-
deleteTag: Gt,
|
|
532
|
-
deleteSelected: xe,
|
|
533
|
-
handleOptionSelect: et,
|
|
534
|
-
scrollToOption: me,
|
|
535
|
-
hasModelValue: ke,
|
|
536
|
-
shouldShowPlaceholder: Bt,
|
|
537
|
-
currentPlaceholder: Pt,
|
|
538
|
-
mouseEnterEventName: Wt,
|
|
539
|
-
needStatusIcon: Vt,
|
|
540
|
-
showClearBtn: It,
|
|
541
|
-
iconComponent: Ue,
|
|
542
|
-
iconReverse: Tt,
|
|
543
|
-
validateState: De,
|
|
544
|
-
validateIcon: kt,
|
|
545
|
-
showNewOption: Lt,
|
|
546
|
-
updateOptions: je,
|
|
547
|
-
collapseTagSize: Nt,
|
|
548
|
-
setSelected: ve,
|
|
549
|
-
selectDisabled: ne,
|
|
550
|
-
emptyText: Rt,
|
|
551
|
-
handleCompositionStart: Ot,
|
|
552
|
-
handleCompositionUpdate: Ct,
|
|
553
|
-
handleCompositionEnd: wt,
|
|
554
|
-
onOptionCreate: Ut,
|
|
555
|
-
onOptionDestroy: jt,
|
|
556
|
-
handleMenuEnter: Qt,
|
|
557
|
-
focus: be,
|
|
558
|
-
blur: Xt,
|
|
559
|
-
handleClearClick: Yt,
|
|
560
|
-
handleClickOutside: Zt,
|
|
561
|
-
handleEsc: Jt,
|
|
562
|
-
toggleMenu: lt,
|
|
563
|
-
selectOption: _t,
|
|
564
|
-
getValueKey: he,
|
|
565
|
-
navigateOptions: nt,
|
|
566
|
-
dropdownMenuVisible: Qe,
|
|
567
|
-
showTagList: el,
|
|
568
|
-
collapseTagList: tl,
|
|
569
|
-
popupScroll: al,
|
|
570
|
-
getOption: Me,
|
|
571
|
-
tagStyle: nl,
|
|
572
|
-
collapseTagStyle: ol,
|
|
573
|
-
popperRef: qt,
|
|
574
|
-
inputRef: m,
|
|
575
|
-
tooltipRef: S,
|
|
576
|
-
tagTooltipRef: y,
|
|
577
|
-
prefixRef: s,
|
|
578
|
-
suffixRef: i,
|
|
579
|
-
selectRef: C,
|
|
580
|
-
wrapperRef: Ge,
|
|
581
|
-
selectionRef: h,
|
|
582
|
-
scrollbarRef: g,
|
|
583
|
-
menuRef: O,
|
|
584
|
-
tagMenuRef: I,
|
|
585
|
-
collapseItemRef: R
|
|
586
|
-
};
|
|
587
|
-
};
|
|
588
|
-
var vn = pe({
|
|
589
|
-
name: "ElOptions",
|
|
590
|
-
setup(e, { slots: o }) {
|
|
591
|
-
const a = we(Ie);
|
|
592
|
-
let f = [];
|
|
593
|
-
return () => {
|
|
594
|
-
var d, p;
|
|
595
|
-
const l = (d = o.default) == null ? void 0 : d.call(o), C = [];
|
|
596
|
-
function h(S) {
|
|
597
|
-
j(S) && S.forEach((y) => {
|
|
598
|
-
var m, s, i, O;
|
|
599
|
-
const I = (m = (y == null ? void 0 : y.type) || {}) == null ? void 0 : m.name;
|
|
600
|
-
I === "ElOptionGroup" ? h(!Ml(y.children) && !j(y.children) && re((s = y.children) == null ? void 0 : s.default) ? (i = y.children) == null ? void 0 : i.default() : y.children) : I === "ElOption" ? C.push((O = y.props) == null ? void 0 : O.value) : j(y.children) && h(y.children);
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
return l.length && h((p = l[0]) == null ? void 0 : p.children), le(C, f) || (f = C, a && (a.states.optionValues = C)), l;
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
const mn = mt({
|
|
608
|
-
name: String,
|
|
609
|
-
id: String,
|
|
610
|
-
modelValue: {
|
|
611
|
-
type: W([
|
|
612
|
-
Array,
|
|
613
|
-
String,
|
|
614
|
-
Number,
|
|
615
|
-
Boolean,
|
|
616
|
-
Object
|
|
617
|
-
]),
|
|
618
|
-
default: void 0
|
|
619
|
-
},
|
|
620
|
-
autocomplete: {
|
|
621
|
-
type: String,
|
|
622
|
-
default: "off"
|
|
623
|
-
},
|
|
624
|
-
automaticDropdown: Boolean,
|
|
625
|
-
size: Fl,
|
|
626
|
-
effect: {
|
|
627
|
-
type: W(String),
|
|
628
|
-
default: "light"
|
|
629
|
-
},
|
|
630
|
-
disabled: Boolean,
|
|
631
|
-
clearable: Boolean,
|
|
632
|
-
filterable: Boolean,
|
|
633
|
-
allowCreate: Boolean,
|
|
634
|
-
loading: Boolean,
|
|
635
|
-
popperClass: {
|
|
636
|
-
type: String,
|
|
637
|
-
default: ""
|
|
638
|
-
},
|
|
639
|
-
popperStyle: {
|
|
640
|
-
type: W([String, Object])
|
|
641
|
-
},
|
|
642
|
-
popperOptions: {
|
|
643
|
-
type: W(Object),
|
|
644
|
-
default: () => ({})
|
|
645
|
-
},
|
|
646
|
-
remote: Boolean,
|
|
647
|
-
loadingText: String,
|
|
648
|
-
noMatchText: String,
|
|
649
|
-
noDataText: String,
|
|
650
|
-
remoteMethod: {
|
|
651
|
-
type: W(Function)
|
|
652
|
-
},
|
|
653
|
-
filterMethod: {
|
|
654
|
-
type: W(Function)
|
|
655
|
-
},
|
|
656
|
-
multiple: Boolean,
|
|
657
|
-
multipleLimit: {
|
|
658
|
-
type: Number,
|
|
659
|
-
default: 0
|
|
660
|
-
},
|
|
661
|
-
placeholder: {
|
|
662
|
-
type: String
|
|
663
|
-
},
|
|
664
|
-
defaultFirstOption: Boolean,
|
|
665
|
-
reserveKeyword: {
|
|
666
|
-
type: Boolean,
|
|
667
|
-
default: !0
|
|
668
|
-
},
|
|
669
|
-
valueKey: {
|
|
670
|
-
type: String,
|
|
671
|
-
default: "value"
|
|
672
|
-
},
|
|
673
|
-
collapseTags: Boolean,
|
|
674
|
-
collapseTagsTooltip: Boolean,
|
|
675
|
-
maxCollapseTags: {
|
|
676
|
-
type: Number,
|
|
677
|
-
default: 1
|
|
678
|
-
},
|
|
679
|
-
teleported: it.teleported,
|
|
680
|
-
persistent: {
|
|
681
|
-
type: Boolean,
|
|
682
|
-
default: !0
|
|
683
|
-
},
|
|
684
|
-
clearIcon: {
|
|
685
|
-
type: dt,
|
|
686
|
-
default: wl
|
|
687
|
-
},
|
|
688
|
-
fitInputWidth: Boolean,
|
|
689
|
-
suffixIcon: {
|
|
690
|
-
type: dt,
|
|
691
|
-
default: El
|
|
692
|
-
},
|
|
693
|
-
tagType: { ...rt.type, default: "info" },
|
|
694
|
-
tagEffect: { ...rt.effect, default: "light" },
|
|
695
|
-
validateEvent: {
|
|
696
|
-
type: Boolean,
|
|
697
|
-
default: !0
|
|
698
|
-
},
|
|
699
|
-
remoteShowSuffix: Boolean,
|
|
700
|
-
showArrow: {
|
|
701
|
-
type: Boolean,
|
|
702
|
-
default: !0
|
|
703
|
-
},
|
|
704
|
-
offset: {
|
|
705
|
-
type: Number,
|
|
706
|
-
default: 12
|
|
707
|
-
},
|
|
708
|
-
placement: {
|
|
709
|
-
type: W(String),
|
|
710
|
-
values: hl,
|
|
711
|
-
default: "bottom-start"
|
|
712
|
-
},
|
|
713
|
-
fallbackPlacements: {
|
|
714
|
-
type: W(Array),
|
|
715
|
-
default: ["bottom-start", "top-start", "right", "left"]
|
|
716
|
-
},
|
|
717
|
-
tabindex: {
|
|
718
|
-
type: [String, Number],
|
|
719
|
-
default: 0
|
|
720
|
-
},
|
|
721
|
-
appendTo: it.appendTo,
|
|
722
|
-
options: {
|
|
723
|
-
type: W(Array)
|
|
724
|
-
},
|
|
725
|
-
props: {
|
|
726
|
-
type: W(Object),
|
|
727
|
-
default: () => yt
|
|
728
|
-
},
|
|
729
|
-
...Ll,
|
|
730
|
-
...gl(["ariaLabel"])
|
|
731
|
-
});
|
|
732
|
-
x + "", Fe + "", Sl.scroll;
|
|
733
|
-
const bn = pe({
|
|
734
|
-
name: "ElOptionGroup",
|
|
735
|
-
componentName: "ElOptionGroup",
|
|
736
|
-
props: {
|
|
737
|
-
label: String,
|
|
738
|
-
disabled: Boolean
|
|
739
|
-
},
|
|
740
|
-
setup(e) {
|
|
741
|
-
const o = ce("select"), a = T(), f = Ee(), d = T([]);
|
|
742
|
-
vt(St, de({
|
|
743
|
-
...Be(e)
|
|
744
|
-
}));
|
|
745
|
-
const p = u(() => d.value.some((S) => S.visible === !0)), l = (S) => {
|
|
746
|
-
var y;
|
|
747
|
-
return S.type.name === "ElOption" && !!((y = S.component) != null && y.proxy);
|
|
748
|
-
}, C = (S) => {
|
|
749
|
-
const y = X(S), m = [];
|
|
750
|
-
return y.forEach((s) => {
|
|
751
|
-
var i;
|
|
752
|
-
dl(s) && (l(s) ? m.push(s.component.proxy) : j(s.children) && s.children.length ? m.push(...C(s.children)) : (i = s.component) != null && i.subTree && m.push(...C(s.component.subTree)));
|
|
753
|
-
}), m;
|
|
754
|
-
}, h = () => {
|
|
755
|
-
d.value = C(f.subTree);
|
|
756
|
-
};
|
|
757
|
-
return We(() => {
|
|
758
|
-
h();
|
|
759
|
-
}), zl(a, h, {
|
|
760
|
-
attributes: !0,
|
|
761
|
-
subtree: !0,
|
|
762
|
-
childList: !0
|
|
763
|
-
}), {
|
|
764
|
-
groupRef: a,
|
|
765
|
-
visible: p,
|
|
766
|
-
ns: o
|
|
767
|
-
};
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
function hn(e, o, a, f, d, p) {
|
|
771
|
-
return ue((v(), w("ul", {
|
|
772
|
-
ref: "groupRef",
|
|
773
|
-
class: b(e.ns.be("group", "wrap"))
|
|
774
|
-
}, [
|
|
775
|
-
k("li", {
|
|
776
|
-
class: b(e.ns.be("group", "title"))
|
|
777
|
-
}, H(e.label), 3),
|
|
778
|
-
k("li", null, [
|
|
779
|
-
k("ul", {
|
|
780
|
-
class: b(e.ns.b("group"))
|
|
781
|
-
}, [
|
|
782
|
-
M(e.$slots, "default")
|
|
783
|
-
], 2)
|
|
784
|
-
])
|
|
785
|
-
], 2)), [
|
|
786
|
-
[Pe, e.visible]
|
|
787
|
-
]);
|
|
788
|
-
}
|
|
789
|
-
var Ae = /* @__PURE__ */ Ve(bn, [["render", hn], ["__file", "option-group.vue"]]);
|
|
790
|
-
const pt = "ElSelect", gn = pe({
|
|
791
|
-
name: pt,
|
|
792
|
-
componentName: pt,
|
|
793
|
-
components: {
|
|
794
|
-
ElSelectMenu: pn,
|
|
795
|
-
ElOption: ze,
|
|
796
|
-
ElOptions: vn,
|
|
797
|
-
ElOptionGroup: Ae,
|
|
798
|
-
ElTag: Cl,
|
|
799
|
-
ElScrollbar: Ol,
|
|
800
|
-
ElTooltip: yl,
|
|
801
|
-
ElIcon: Vl
|
|
802
|
-
},
|
|
803
|
-
directives: { ClickOutside: ql },
|
|
804
|
-
props: mn,
|
|
805
|
-
emits: [
|
|
806
|
-
x,
|
|
807
|
-
Fe,
|
|
808
|
-
"remove-tag",
|
|
809
|
-
"clear",
|
|
810
|
-
"visible-change",
|
|
811
|
-
"focus",
|
|
812
|
-
"blur",
|
|
813
|
-
"popup-scroll"
|
|
814
|
-
],
|
|
815
|
-
setup(e, { emit: o, slots: a }) {
|
|
816
|
-
const f = Ee();
|
|
817
|
-
f.appContext.config.warnHandler = (...g) => {
|
|
818
|
-
!g[0] || g[0].includes('Slot "default" invoked outside of the render function') || console.warn(...g);
|
|
819
|
-
};
|
|
820
|
-
const d = u(() => {
|
|
821
|
-
const { modelValue: g, multiple: c } = e, E = c ? [] : void 0;
|
|
822
|
-
return j(g) ? c ? g : E : c ? E : g;
|
|
823
|
-
}), p = de({
|
|
824
|
-
...Be(e),
|
|
825
|
-
modelValue: d
|
|
826
|
-
}), l = fn(p, o), { calculatorRef: C, inputStyle: h } = ln(), { getLabel: S, getValue: y, getOptions: m, getDisabled: s } = nn(e), i = (g) => ({
|
|
827
|
-
label: S(g),
|
|
828
|
-
value: y(g),
|
|
829
|
-
disabled: s(g)
|
|
830
|
-
}), O = (g) => g.reduce((c, E) => (c.push(E), E.children && E.children.length > 0 && c.push(...O(E.children)), c), []), I = (g) => {
|
|
831
|
-
Ql(g || []).forEach((E) => {
|
|
832
|
-
var Y;
|
|
833
|
-
if (U(E) && (E.type.name === "ElOption" || E.type.name === "ElTree")) {
|
|
834
|
-
const B = E.type.name;
|
|
835
|
-
if (B === "ElTree") {
|
|
836
|
-
const A = ((Y = E.props) == null ? void 0 : Y.data) || [];
|
|
837
|
-
O(A).forEach((Z) => {
|
|
838
|
-
Z.currentLabel = Z.label || (U(Z.value) ? "" : Z.value), l.onOptionCreate(Z);
|
|
839
|
-
});
|
|
840
|
-
} else if (B === "ElOption") {
|
|
841
|
-
const A = { ...E.props };
|
|
842
|
-
A.currentLabel = A.label || (U(A.value) ? "" : A.value), l.onOptionCreate(A);
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
});
|
|
846
|
-
};
|
|
847
|
-
G(() => {
|
|
848
|
-
var g;
|
|
849
|
-
return (g = a.default) == null ? void 0 : g.call(a);
|
|
850
|
-
}, (g) => {
|
|
851
|
-
e.persistent || I(g);
|
|
852
|
-
}, {
|
|
853
|
-
immediate: !0
|
|
854
|
-
}), vt(Ie, de({
|
|
855
|
-
props: p,
|
|
856
|
-
states: l.states,
|
|
857
|
-
selectRef: l.selectRef,
|
|
858
|
-
optionsArray: l.optionsArray,
|
|
859
|
-
setSelected: l.setSelected,
|
|
860
|
-
handleOptionSelect: l.handleOptionSelect,
|
|
861
|
-
onOptionCreate: l.onOptionCreate,
|
|
862
|
-
onOptionDestroy: l.onOptionDestroy
|
|
863
|
-
}));
|
|
864
|
-
const R = u(() => e.multiple ? l.states.selected.map((g) => g.currentLabel) : l.states.selectedLabel);
|
|
865
|
-
return ft(() => {
|
|
866
|
-
f.appContext.config.warnHandler = void 0;
|
|
867
|
-
}), {
|
|
868
|
-
...l,
|
|
869
|
-
modelValue: d,
|
|
870
|
-
selectedLabel: R,
|
|
871
|
-
calculatorRef: C,
|
|
872
|
-
inputStyle: h,
|
|
873
|
-
getLabel: S,
|
|
874
|
-
getValue: y,
|
|
875
|
-
getOptions: m,
|
|
876
|
-
getDisabled: s,
|
|
877
|
-
getOptionProps: i
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
function yn(e, o) {
|
|
882
|
-
const a = q("el-tag"), f = q("el-tooltip"), d = q("el-icon"), p = q("el-option"), l = q("el-option-group"), C = q("el-options"), h = q("el-scrollbar"), S = q("el-select-menu"), y = cl("click-outside");
|
|
883
|
-
return ue((v(), w("div", {
|
|
884
|
-
ref: "selectRef",
|
|
885
|
-
class: b([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
|
|
886
|
-
[pl(e.mouseEnterEventName)]: (m) => e.states.inputHovering = !0,
|
|
887
|
-
onMouseleave: (m) => e.states.inputHovering = !1
|
|
888
|
-
}, [
|
|
889
|
-
_(f, {
|
|
890
|
-
ref: "tooltipRef",
|
|
891
|
-
visible: e.dropdownMenuVisible,
|
|
892
|
-
placement: e.placement,
|
|
893
|
-
teleported: e.teleported,
|
|
894
|
-
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
|
|
895
|
-
"popper-style": e.popperStyle,
|
|
896
|
-
"popper-options": e.popperOptions,
|
|
897
|
-
"fallback-placements": e.fallbackPlacements,
|
|
898
|
-
effect: e.effect,
|
|
899
|
-
pure: "",
|
|
900
|
-
trigger: "click",
|
|
901
|
-
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
|
|
902
|
-
"stop-popper-mouse-event": !1,
|
|
903
|
-
"gpu-acceleration": !1,
|
|
904
|
-
persistent: e.persistent,
|
|
905
|
-
"append-to": e.appendTo,
|
|
906
|
-
"show-arrow": e.showArrow,
|
|
907
|
-
offset: e.offset,
|
|
908
|
-
onBeforeShow: e.handleMenuEnter,
|
|
909
|
-
onHide: (m) => e.states.isBeforeHide = !1
|
|
910
|
-
}, {
|
|
911
|
-
default: $(() => {
|
|
912
|
-
var m;
|
|
913
|
-
return [
|
|
914
|
-
k("div", {
|
|
915
|
-
ref: "wrapperRef",
|
|
916
|
-
class: b([
|
|
917
|
-
e.nsSelect.e("wrapper"),
|
|
918
|
-
e.nsSelect.is("focused", e.isFocused),
|
|
919
|
-
e.nsSelect.is("hovering", e.states.inputHovering),
|
|
920
|
-
e.nsSelect.is("filterable", e.filterable),
|
|
921
|
-
e.nsSelect.is("disabled", e.selectDisabled)
|
|
922
|
-
]),
|
|
923
|
-
onClick: F(e.toggleMenu, ["prevent"])
|
|
924
|
-
}, [
|
|
925
|
-
e.$slots.prefix ? (v(), w("div", {
|
|
926
|
-
key: 0,
|
|
927
|
-
ref: "prefixRef",
|
|
928
|
-
class: b(e.nsSelect.e("prefix"))
|
|
929
|
-
}, [
|
|
930
|
-
M(e.$slots, "prefix")
|
|
931
|
-
], 2)) : L("v-if", !0),
|
|
932
|
-
k("div", {
|
|
933
|
-
ref: "selectionRef",
|
|
934
|
-
class: b([
|
|
935
|
-
e.nsSelect.e("selection"),
|
|
936
|
-
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
|
|
937
|
-
])
|
|
938
|
-
}, [
|
|
939
|
-
e.multiple ? M(e.$slots, "tag", {
|
|
940
|
-
key: 0,
|
|
941
|
-
data: e.states.selected,
|
|
942
|
-
deleteTag: e.deleteTag,
|
|
943
|
-
selectDisabled: e.selectDisabled
|
|
944
|
-
}, () => [
|
|
945
|
-
(v(!0), w(se, null, Se(e.showTagList, (s) => (v(), w("div", {
|
|
946
|
-
key: e.getValueKey(s),
|
|
947
|
-
class: b(e.nsSelect.e("selected-item"))
|
|
948
|
-
}, [
|
|
949
|
-
_(a, {
|
|
950
|
-
closable: !e.selectDisabled && !s.isDisabled,
|
|
951
|
-
size: e.collapseTagSize,
|
|
952
|
-
type: e.tagType,
|
|
953
|
-
effect: e.tagEffect,
|
|
954
|
-
"disable-transitions": "",
|
|
955
|
-
style: Ce(e.tagStyle),
|
|
956
|
-
onClose: (i) => e.deleteTag(i, s)
|
|
957
|
-
}, {
|
|
958
|
-
default: $(() => [
|
|
959
|
-
k("span", {
|
|
960
|
-
class: b(e.nsSelect.e("tags-text"))
|
|
961
|
-
}, [
|
|
962
|
-
M(e.$slots, "label", {
|
|
963
|
-
index: s.index,
|
|
964
|
-
label: s.currentLabel,
|
|
965
|
-
value: s.value
|
|
966
|
-
}, () => [
|
|
967
|
-
ot(H(s.currentLabel), 1)
|
|
968
|
-
])
|
|
969
|
-
], 2)
|
|
970
|
-
]),
|
|
971
|
-
_: 2
|
|
972
|
-
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
|
|
973
|
-
], 2))), 128)),
|
|
974
|
-
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (v(), P(f, {
|
|
975
|
-
key: 0,
|
|
976
|
-
ref: "tagTooltipRef",
|
|
977
|
-
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
|
|
978
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
979
|
-
effect: e.effect,
|
|
980
|
-
placement: "bottom",
|
|
981
|
-
"popper-class": e.popperClass,
|
|
982
|
-
"popper-style": e.popperStyle,
|
|
983
|
-
teleported: e.teleported
|
|
984
|
-
}, {
|
|
985
|
-
default: $(() => [
|
|
986
|
-
k("div", {
|
|
987
|
-
ref: "collapseItemRef",
|
|
988
|
-
class: b(e.nsSelect.e("selected-item"))
|
|
989
|
-
}, [
|
|
990
|
-
_(a, {
|
|
991
|
-
closable: !1,
|
|
992
|
-
size: e.collapseTagSize,
|
|
993
|
-
type: e.tagType,
|
|
994
|
-
effect: e.tagEffect,
|
|
995
|
-
"disable-transitions": "",
|
|
996
|
-
style: Ce(e.collapseTagStyle)
|
|
997
|
-
}, {
|
|
998
|
-
default: $(() => [
|
|
999
|
-
k("span", {
|
|
1000
|
-
class: b(e.nsSelect.e("tags-text"))
|
|
1001
|
-
}, " + " + H(e.states.selected.length - e.maxCollapseTags), 3)
|
|
1002
|
-
]),
|
|
1003
|
-
_: 1
|
|
1004
|
-
}, 8, ["size", "type", "effect", "style"])
|
|
1005
|
-
], 2)
|
|
1006
|
-
]),
|
|
1007
|
-
content: $(() => [
|
|
1008
|
-
k("div", {
|
|
1009
|
-
ref: "tagMenuRef",
|
|
1010
|
-
class: b(e.nsSelect.e("selection"))
|
|
1011
|
-
}, [
|
|
1012
|
-
(v(!0), w(se, null, Se(e.collapseTagList, (s) => (v(), w("div", {
|
|
1013
|
-
key: e.getValueKey(s),
|
|
1014
|
-
class: b(e.nsSelect.e("selected-item"))
|
|
1015
|
-
}, [
|
|
1016
|
-
_(a, {
|
|
1017
|
-
class: "in-tooltip",
|
|
1018
|
-
closable: !e.selectDisabled && !s.isDisabled,
|
|
1019
|
-
size: e.collapseTagSize,
|
|
1020
|
-
type: e.tagType,
|
|
1021
|
-
effect: e.tagEffect,
|
|
1022
|
-
"disable-transitions": "",
|
|
1023
|
-
onClose: (i) => e.deleteTag(i, s)
|
|
1024
|
-
}, {
|
|
1025
|
-
default: $(() => [
|
|
1026
|
-
k("span", {
|
|
1027
|
-
class: b(e.nsSelect.e("tags-text"))
|
|
1028
|
-
}, [
|
|
1029
|
-
M(e.$slots, "label", {
|
|
1030
|
-
index: s.index,
|
|
1031
|
-
label: s.currentLabel,
|
|
1032
|
-
value: s.value
|
|
1033
|
-
}, () => [
|
|
1034
|
-
ot(H(s.currentLabel), 1)
|
|
1035
|
-
])
|
|
1036
|
-
], 2)
|
|
1037
|
-
]),
|
|
1038
|
-
_: 2
|
|
1039
|
-
}, 1032, ["closable", "size", "type", "effect", "onClose"])
|
|
1040
|
-
], 2))), 128))
|
|
1041
|
-
], 2)
|
|
1042
|
-
]),
|
|
1043
|
-
_: 3
|
|
1044
|
-
}, 8, ["disabled", "effect", "popper-class", "popper-style", "teleported"])) : L("v-if", !0)
|
|
1045
|
-
]) : L("v-if", !0),
|
|
1046
|
-
k("div", {
|
|
1047
|
-
class: b([
|
|
1048
|
-
e.nsSelect.e("selected-item"),
|
|
1049
|
-
e.nsSelect.e("input-wrapper"),
|
|
1050
|
-
e.nsSelect.is("hidden", !e.filterable)
|
|
1051
|
-
])
|
|
1052
|
-
}, [
|
|
1053
|
-
ue(k("input", {
|
|
1054
|
-
id: e.inputId,
|
|
1055
|
-
ref: "inputRef",
|
|
1056
|
-
"onUpdate:modelValue": (s) => e.states.inputValue = s,
|
|
1057
|
-
type: "text",
|
|
1058
|
-
name: e.name,
|
|
1059
|
-
class: b([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
|
|
1060
|
-
disabled: e.selectDisabled,
|
|
1061
|
-
autocomplete: e.autocomplete,
|
|
1062
|
-
style: Ce(e.inputStyle),
|
|
1063
|
-
tabindex: e.tabindex,
|
|
1064
|
-
role: "combobox",
|
|
1065
|
-
readonly: !e.filterable,
|
|
1066
|
-
spellcheck: "false",
|
|
1067
|
-
"aria-activedescendant": ((m = e.hoverOption) == null ? void 0 : m.id) || "",
|
|
1068
|
-
"aria-controls": e.contentId,
|
|
1069
|
-
"aria-expanded": e.dropdownMenuVisible,
|
|
1070
|
-
"aria-label": e.ariaLabel,
|
|
1071
|
-
"aria-autocomplete": "none",
|
|
1072
|
-
"aria-haspopup": "listbox",
|
|
1073
|
-
onKeydown: [
|
|
1074
|
-
ie(F((s) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
|
|
1075
|
-
ie(F((s) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
|
|
1076
|
-
ie(F(e.handleEsc, ["stop", "prevent"]), ["esc"]),
|
|
1077
|
-
ie(F(e.selectOption, ["stop", "prevent"]), ["enter"]),
|
|
1078
|
-
ie(F(e.deletePrevTag, ["stop"]), ["delete"])
|
|
1079
|
-
],
|
|
1080
|
-
onCompositionstart: e.handleCompositionStart,
|
|
1081
|
-
onCompositionupdate: e.handleCompositionUpdate,
|
|
1082
|
-
onCompositionend: e.handleCompositionEnd,
|
|
1083
|
-
onInput: e.onInput,
|
|
1084
|
-
onClick: F(e.toggleMenu, ["stop"])
|
|
1085
|
-
}, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "tabindex", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
|
|
1086
|
-
[fl, e.states.inputValue]
|
|
1087
|
-
]),
|
|
1088
|
-
e.filterable ? (v(), w("span", {
|
|
1089
|
-
key: 0,
|
|
1090
|
-
ref: "calculatorRef",
|
|
1091
|
-
"aria-hidden": "true",
|
|
1092
|
-
class: b(e.nsSelect.e("input-calculator")),
|
|
1093
|
-
textContent: H(e.states.inputValue)
|
|
1094
|
-
}, null, 10, ["textContent"])) : L("v-if", !0)
|
|
1095
|
-
], 2),
|
|
1096
|
-
e.shouldShowPlaceholder ? (v(), w("div", {
|
|
1097
|
-
key: 1,
|
|
1098
|
-
class: b([
|
|
1099
|
-
e.nsSelect.e("selected-item"),
|
|
1100
|
-
e.nsSelect.e("placeholder"),
|
|
1101
|
-
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
|
|
1102
|
-
])
|
|
1103
|
-
}, [
|
|
1104
|
-
e.hasModelValue ? M(e.$slots, "label", {
|
|
1105
|
-
key: 0,
|
|
1106
|
-
index: e.getOption(e.modelValue).index,
|
|
1107
|
-
label: e.currentPlaceholder,
|
|
1108
|
-
value: e.modelValue
|
|
1109
|
-
}, () => [
|
|
1110
|
-
k("span", null, H(e.currentPlaceholder), 1)
|
|
1111
|
-
]) : (v(), w("span", { key: 1 }, H(e.currentPlaceholder), 1))
|
|
1112
|
-
], 2)) : L("v-if", !0)
|
|
1113
|
-
], 2),
|
|
1114
|
-
k("div", {
|
|
1115
|
-
ref: "suffixRef",
|
|
1116
|
-
class: b(e.nsSelect.e("suffix"))
|
|
1117
|
-
}, [
|
|
1118
|
-
e.iconComponent && !e.showClearBtn ? (v(), P(d, {
|
|
1119
|
-
key: 0,
|
|
1120
|
-
class: b([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
|
|
1121
|
-
}, {
|
|
1122
|
-
default: $(() => [
|
|
1123
|
-
(v(), P(Le(e.iconComponent)))
|
|
1124
|
-
]),
|
|
1125
|
-
_: 1
|
|
1126
|
-
}, 8, ["class"])) : L("v-if", !0),
|
|
1127
|
-
e.showClearBtn && e.clearIcon ? (v(), P(d, {
|
|
1128
|
-
key: 1,
|
|
1129
|
-
class: b([
|
|
1130
|
-
e.nsSelect.e("caret"),
|
|
1131
|
-
e.nsSelect.e("icon"),
|
|
1132
|
-
e.nsSelect.e("clear")
|
|
1133
|
-
]),
|
|
1134
|
-
onClick: e.handleClearClick
|
|
1135
|
-
}, {
|
|
1136
|
-
default: $(() => [
|
|
1137
|
-
(v(), P(Le(e.clearIcon)))
|
|
1138
|
-
]),
|
|
1139
|
-
_: 1
|
|
1140
|
-
}, 8, ["class", "onClick"])) : L("v-if", !0),
|
|
1141
|
-
e.validateState && e.validateIcon && e.needStatusIcon ? (v(), P(d, {
|
|
1142
|
-
key: 2,
|
|
1143
|
-
class: b([
|
|
1144
|
-
e.nsInput.e("icon"),
|
|
1145
|
-
e.nsInput.e("validateIcon"),
|
|
1146
|
-
e.nsInput.is("loading", e.validateState === "validating")
|
|
1147
|
-
])
|
|
1148
|
-
}, {
|
|
1149
|
-
default: $(() => [
|
|
1150
|
-
(v(), P(Le(e.validateIcon)))
|
|
1151
|
-
]),
|
|
1152
|
-
_: 1
|
|
1153
|
-
}, 8, ["class"])) : L("v-if", !0)
|
|
1154
|
-
], 2)
|
|
1155
|
-
], 10, ["onClick"])
|
|
1156
|
-
];
|
|
1157
|
-
}),
|
|
1158
|
-
content: $(() => [
|
|
1159
|
-
_(S, { ref: "menuRef" }, {
|
|
1160
|
-
default: $(() => [
|
|
1161
|
-
e.$slots.header ? (v(), w("div", {
|
|
1162
|
-
key: 0,
|
|
1163
|
-
class: b(e.nsSelect.be("dropdown", "header")),
|
|
1164
|
-
onClick: F(() => {
|
|
1165
|
-
}, ["stop"])
|
|
1166
|
-
}, [
|
|
1167
|
-
M(e.$slots, "header")
|
|
1168
|
-
], 10, ["onClick"])) : L("v-if", !0),
|
|
1169
|
-
ue(_(h, {
|
|
1170
|
-
id: e.contentId,
|
|
1171
|
-
ref: "scrollbarRef",
|
|
1172
|
-
tag: "ul",
|
|
1173
|
-
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
|
|
1174
|
-
"view-class": e.nsSelect.be("dropdown", "list"),
|
|
1175
|
-
class: b([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
|
|
1176
|
-
role: "listbox",
|
|
1177
|
-
"aria-label": e.ariaLabel,
|
|
1178
|
-
"aria-orientation": "vertical",
|
|
1179
|
-
onScroll: e.popupScroll
|
|
1180
|
-
}, {
|
|
1181
|
-
default: $(() => [
|
|
1182
|
-
e.showNewOption ? (v(), P(p, {
|
|
1183
|
-
key: 0,
|
|
1184
|
-
value: e.states.inputValue,
|
|
1185
|
-
created: !0
|
|
1186
|
-
}, null, 8, ["value"])) : L("v-if", !0),
|
|
1187
|
-
_(C, null, {
|
|
1188
|
-
default: $(() => [
|
|
1189
|
-
M(e.$slots, "default", {}, () => [
|
|
1190
|
-
(v(!0), w(se, null, Se(e.options, (m, s) => {
|
|
1191
|
-
var i;
|
|
1192
|
-
return v(), w(se, { key: s }, [
|
|
1193
|
-
(i = e.getOptions(m)) != null && i.length ? (v(), P(l, {
|
|
1194
|
-
key: 0,
|
|
1195
|
-
label: e.getLabel(m),
|
|
1196
|
-
disabled: e.getDisabled(m)
|
|
1197
|
-
}, {
|
|
1198
|
-
default: $(() => [
|
|
1199
|
-
(v(!0), w(se, null, Se(e.getOptions(m), (O) => (v(), P(p, at({
|
|
1200
|
-
key: e.getValue(O)
|
|
1201
|
-
}, e.getOptionProps(O)), null, 16))), 128))
|
|
1202
|
-
]),
|
|
1203
|
-
_: 2
|
|
1204
|
-
}, 1032, ["label", "disabled"])) : (v(), P(p, vl(at({ key: 1 }, e.getOptionProps(m))), null, 16))
|
|
1205
|
-
], 64);
|
|
1206
|
-
}), 128))
|
|
1207
|
-
])
|
|
1208
|
-
]),
|
|
1209
|
-
_: 3
|
|
1210
|
-
})
|
|
1211
|
-
]),
|
|
1212
|
-
_: 3
|
|
1213
|
-
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label", "onScroll"]), [
|
|
1214
|
-
[Pe, e.states.options.size > 0 && !e.loading]
|
|
1215
|
-
]),
|
|
1216
|
-
e.$slots.loading && e.loading ? (v(), w("div", {
|
|
1217
|
-
key: 1,
|
|
1218
|
-
class: b(e.nsSelect.be("dropdown", "loading"))
|
|
1219
|
-
}, [
|
|
1220
|
-
M(e.$slots, "loading")
|
|
1221
|
-
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (v(), w("div", {
|
|
1222
|
-
key: 2,
|
|
1223
|
-
class: b(e.nsSelect.be("dropdown", "empty"))
|
|
1224
|
-
}, [
|
|
1225
|
-
M(e.$slots, "empty", {}, () => [
|
|
1226
|
-
k("span", null, H(e.emptyText), 1)
|
|
1227
|
-
])
|
|
1228
|
-
], 2)) : L("v-if", !0),
|
|
1229
|
-
e.$slots.footer ? (v(), w("div", {
|
|
1230
|
-
key: 3,
|
|
1231
|
-
class: b(e.nsSelect.be("dropdown", "footer")),
|
|
1232
|
-
onClick: F(() => {
|
|
1233
|
-
}, ["stop"])
|
|
1234
|
-
}, [
|
|
1235
|
-
M(e.$slots, "footer")
|
|
1236
|
-
], 10, ["onClick"])) : L("v-if", !0)
|
|
1237
|
-
]),
|
|
1238
|
-
_: 3
|
|
1239
|
-
}, 512)
|
|
1240
|
-
]),
|
|
1241
|
-
_: 3
|
|
1242
|
-
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-style", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "show-arrow", "offset", "onBeforeShow", "onHide"])
|
|
1243
|
-
], 16, ["onMouseleave"])), [
|
|
1244
|
-
[y, e.handleClickOutside, e.popperRef]
|
|
1245
|
-
]);
|
|
1246
|
-
}
|
|
1247
|
-
var Sn = /* @__PURE__ */ Ve(gn, [["render", yn], ["__file", "select.vue"]]);
|
|
1248
|
-
const Wn = Rl(Sn, {
|
|
1249
|
-
Option: ze,
|
|
1250
|
-
OptionGroup: Ae
|
|
1251
|
-
}), Fn = bt(ze);
|
|
1252
|
-
bt(Ae);
|
|
1253
|
-
export {
|
|
1254
|
-
Fn as E,
|
|
1255
|
-
Wn as a
|
|
1256
|
-
};
|