st-comp 0.0.208 → 0.0.209
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 +74 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +56 -53
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +48 -45
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +118 -1
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +90 -87
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +28 -25
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +164 -161
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +114 -111
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +183 -180
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +143 -140
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -2
- package/es/Table.cjs +1 -1
- package/es/Table.js +58 -55
- package/es/User.cjs +1 -1
- package/es/User.js +88 -85
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +56 -53
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +17 -15
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +56 -53
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +34 -31
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +106 -103
- package/es/_initCloneObject-52b6a510.cjs +1 -0
- package/es/{_initCloneObject-c477c74d.js → _initCloneObject-eaef9418.js} +26 -25
- package/es/base-a5af3db3.js +288 -0
- package/es/base-ef747d02.cjs +5 -0
- package/es/castArray-35947698.cjs +1 -0
- package/es/{castArray-1eb17278.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-18c0a68a.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-49c17381.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/{debounce-33406a0d.js → debounce-8d53f4dd.js} +9 -9
- package/es/{dropdown-3f1fe325.cjs → dropdown-071c5d7e.cjs} +1 -1
- package/es/{dropdown-6e7b1df0.js → dropdown-a59bba73.js} +15 -15
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-87b7f461.js → el-autocomplete-ba808eb6.js} +53 -51
- package/es/{el-button-56624e61.js → el-button-c95adb85.js} +46 -45
- package/es/el-button-eec58cff.cjs +1 -0
- package/es/{el-checkbox-f13560e9.js → el-checkbox-7421ccd3.js} +40 -40
- package/es/{el-checkbox-09f3b57f.cjs → el-checkbox-c25236a6.cjs} +1 -1
- package/es/{el-dialog-1d5f5877.js → el-dialog-41ab8417.js} +10 -9
- package/es/el-dialog-ae86edb8.cjs +1 -0
- package/es/{el-divider-8a4c87e3.cjs → el-divider-4713d74c.cjs} +1 -1
- package/es/{el-divider-1cda1783.js → el-divider-4e059794.js} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-04682b5d.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/{el-form-item-505c0b70.js → el-form-item-c53c374d.js} +76 -75
- package/es/{el-input-262851e8.js → el-input-2f75c4ba.js} +85 -84
- package/es/el-input-7fd293af.cjs +1 -0
- package/es/el-input-number-22e21d16.cjs +1 -0
- package/es/{el-input-number-fdac2b86.js → el-input-number-5193fe6d.js} +83 -82
- package/es/{el-loading-3cf7b796.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-7440dc64.js → el-loading-f6022062.js} +2 -2
- package/es/el-menu-item-17dc717e.cjs +1 -0
- package/es/{el-menu-item-36c3004c.js → el-menu-item-7e881203.js} +54 -53
- package/es/el-message-5e6a6be9.cjs +1 -0
- package/es/{el-message-box-8f5e34ca.js → el-message-box-a93d2f6a.js} +22 -20
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-416bd265.js → el-message-e544a8f5.js} +29 -28
- package/es/{el-overlay-04426e36.js → el-overlay-09ad71cd.js} +53 -52
- package/es/el-overlay-9e34965f.cjs +1 -0
- package/es/el-popconfirm-70a976bf.cjs +1 -0
- package/es/{el-popconfirm-3790cda2.js → el-popconfirm-81dcd202.js} +39 -38
- package/es/{el-popper-49152708.js → el-popper-b4f97157.js} +192 -191
- package/es/el-popper-b6c99b28.cjs +1 -0
- package/es/{el-segmented-05509f9d.js → el-segmented-b868d074.js} +13 -12
- package/es/el-segmented-f8fce9ac.cjs +1 -0
- package/es/{el-select-700f3686.js → el-select-95627997.js} +295 -292
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/{el-table-column-44360700.js → el-table-column-376cd907.js} +57 -54
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-55a172c9.js → el-tag-66cab138.js} +31 -30
- package/es/el-tag-a33c4b22.cjs +1 -0
- package/es/{el-text-ab6bfc40.js → el-text-ac60d0f2.js} +4 -4
- package/es/{el-text-5bcaffb6.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/index-098c2447.cjs +1 -0
- package/es/{index-d8294b1a.cjs → index-11547a0c.cjs} +1 -1
- package/es/{index-0afedcbd.js → index-1f7d4f70.js} +12 -11
- package/es/{index-ae6c9d97.cjs → index-298075cf.cjs} +1 -1
- package/es/{index-4e46f96c.js → index-57672682.js} +13 -12
- package/es/{index-66ad0d6a.js → index-844bdd85.js} +34 -34
- package/es/{index-29418a8d.js → index-88546436.js} +18 -18
- package/es/index-960806da.js +314 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{base-aa512893.js → index-a871c3eb.js} +171 -454
- package/es/index-bb833443.cjs +1 -0
- package/es/index-c108567d.cjs +1 -0
- package/es/index-d77a7336.js +204 -0
- package/es/{index-cbbd78b4.js → index-d91dc23f.js} +12 -12
- package/es/index-e5566b94.js +368 -0
- package/es/index-f3562b52.cjs +1 -0
- package/es/{index-882d77d3.cjs → index-f967d6c1.cjs} +1 -1
- package/es/raf-80ef0c0a.js +6 -0
- package/es/{raf-336ef01e.cjs → raf-8249652f.cjs} +1 -1
- package/es/{scroll-0a48995c.js → scroll-679bd6bf.js} +5 -5
- package/es/{scroll-19533c53.cjs → scroll-b108dabd.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-815d48a6.js +364 -0
- package/es/use-form-common-props-fd9b61a0.cjs +1 -0
- package/es/use-global-config-30d7d8ce.cjs +1 -0
- package/es/use-global-config-b5e9d3d5.js +72 -0
- package/es/{validator-28b22907.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-e35f7978.js → validator-764a9db0.js} +1 -1
- package/es/{vnode-b62d0045.js → vnode-5ddb7ed1.js} +1 -1
- package/es/{vnode-8cb31692.cjs → vnode-b906ae6d.cjs} +1 -1
- package/es/{zh-cn-7c8640bb.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-346f3a73.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +105 -105
- package/lib/{index-da0f2951.js → index-e158c3d6.js} +1529 -1529
- package/lib/{python-c0a1e4ef.js → python-57033756.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/Kline/componentsNew/KlineTips/index.vue +4 -4
- package/packages/Kline/index.vue +4 -4
- package/packages/KlineNew/components/KlineTips/index.vue +8 -8
- package/packages/KlinePlus/index.vue +4 -4
- package/src/pages/KlineBasic/api.js +1 -1
- package/es/_initCloneObject-e660897e.cjs +0 -1
- package/es/base-7ba08794.cjs +0 -5
- package/es/castArray-efa457a5.cjs +0 -1
- package/es/debounce-4aa22feb.cjs +0 -1
- package/es/el-autocomplete-609ac86d.cjs +0 -1
- package/es/el-button-08310c06.cjs +0 -1
- package/es/el-dialog-ea480083.cjs +0 -1
- package/es/el-empty-b40fa7ea.cjs +0 -1
- package/es/el-form-item-338ea2f7.cjs +0 -12
- package/es/el-input-b04b5bfc.cjs +0 -1
- package/es/el-input-number-7242c8b5.cjs +0 -1
- package/es/el-menu-item-7aca344e.cjs +0 -1
- package/es/el-message-05cd85bf.cjs +0 -1
- package/es/el-message-box-b7e9917e.cjs +0 -1
- package/es/el-overlay-60bc5a02.cjs +0 -1
- package/es/el-popconfirm-24b622c5.cjs +0 -1
- package/es/el-popper-1dd8f5b4.cjs +0 -1
- package/es/el-segmented-a928d89b.cjs +0 -1
- package/es/el-select-5fd77a96.cjs +0 -1
- package/es/el-table-column-bf3ab2a6.cjs +0 -14
- package/es/el-tag-d59f3463.cjs +0 -1
- package/es/index-3d0bc5da.js +0 -566
- package/es/index-a206f6eb.cjs +0 -1
- package/es/index-b4700d83.cjs +0 -1
- package/es/index-c30cf7f9.cjs +0 -1
- package/es/raf-d8c44079.js +0 -6
- package/es/use-form-common-props-41182853.cjs +0 -1
- package/es/use-form-common-props-4cdda474.js +0 -671
- package/es/use-global-config-7bfbe48c.js +0 -71
- package/es/use-global-config-dc5527e8.cjs +0 -1
|
@@ -1,48 +1,51 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import {
|
|
3
|
-
import { s as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { g as z,
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
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-b4f97157.js";
|
|
3
|
+
import { s as Sl, E as Ol } from "./index-844bdd85.js";
|
|
4
|
+
import { t as rt, E as Cl } from "./index-57672682.js";
|
|
5
|
+
import { w as wl, f as El, E as Vl } from "./index-a871c3eb.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-e5566b94.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, w as zl } from "./use-form-common-props-815d48a6.js";
|
|
12
|
+
import { u as Al, a as Kl } from "./index-d91dc23f.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-66cab138.js";
|
|
16
|
+
import { f as Ql } from "./vnode-5ddb7ed1.js";
|
|
17
|
+
var ct = 1 / 0, Xl = 17976931348623157e292;
|
|
18
|
+
function Yl(e) {
|
|
16
19
|
if (!e)
|
|
17
20
|
return e === 0 ? e : 0;
|
|
18
|
-
if (e =
|
|
21
|
+
if (e = Gl(e), e === ct || e === -ct) {
|
|
19
22
|
var o = e < 0 ? -1 : 1;
|
|
20
|
-
return o *
|
|
23
|
+
return o * Xl;
|
|
21
24
|
}
|
|
22
25
|
return e === e ? e : 0;
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
var o =
|
|
27
|
+
function Zl(e) {
|
|
28
|
+
var o = Yl(e), a = o % 1;
|
|
26
29
|
return o === o ? a ? o - a : o : 0;
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function Jl(e, o, a, f) {
|
|
29
32
|
for (var d = e.length, p = a + (f ? 1 : -1); f ? p-- : ++p < d; )
|
|
30
33
|
if (o(e[p], p, e))
|
|
31
34
|
return p;
|
|
32
35
|
return -1;
|
|
33
36
|
}
|
|
34
|
-
var
|
|
37
|
+
var _l = Math.max, xl = Math.min;
|
|
35
38
|
function en(e, o, a) {
|
|
36
39
|
var f = e == null ? 0 : e.length;
|
|
37
40
|
if (!f)
|
|
38
41
|
return -1;
|
|
39
42
|
var d = f - 1;
|
|
40
|
-
return a !== void 0 && (d =
|
|
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);
|
|
41
44
|
}
|
|
42
|
-
const
|
|
43
|
-
function
|
|
44
|
-
const e =
|
|
45
|
-
minWidth: `${Math.max(o.value,
|
|
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`
|
|
46
49
|
}));
|
|
47
50
|
return ee(e, () => {
|
|
48
51
|
var d, p;
|
|
@@ -53,23 +56,23 @@ function tn() {
|
|
|
53
56
|
inputStyle: a
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
|
-
const
|
|
59
|
+
const yt = {
|
|
57
60
|
label: "label",
|
|
58
61
|
value: "value",
|
|
59
62
|
disabled: "disabled",
|
|
60
63
|
options: "options"
|
|
61
64
|
};
|
|
62
65
|
function nn(e) {
|
|
63
|
-
const o = u(() => ({ ...
|
|
66
|
+
const o = u(() => ({ ...yt, ...e.props }));
|
|
64
67
|
return {
|
|
65
68
|
aliasProps: o,
|
|
66
|
-
getLabel: (
|
|
67
|
-
getValue: (
|
|
68
|
-
getDisabled: (
|
|
69
|
-
getOptions: (
|
|
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)
|
|
70
73
|
};
|
|
71
74
|
}
|
|
72
|
-
const
|
|
75
|
+
const St = Symbol("ElSelectGroup"), Ie = Symbol("ElSelect"), Ne = "ElOption", on = mt({
|
|
73
76
|
value: {
|
|
74
77
|
type: [String, Number, Boolean, Object],
|
|
75
78
|
required: !0
|
|
@@ -82,34 +85,34 @@ const Sl = Symbol("ElSelectGroup"), Ie = Symbol("ElSelect"), Ne = "ElOption", on
|
|
|
82
85
|
}), an = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
83
86
|
function sn(e, o) {
|
|
84
87
|
const a = we(Ie);
|
|
85
|
-
a ||
|
|
86
|
-
const f = we(
|
|
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(() => {
|
|
87
90
|
var i;
|
|
88
91
|
if (a.props.multiple) {
|
|
89
92
|
const O = X((i = a.props.modelValue) != null ? i : []);
|
|
90
93
|
return !d.value && O.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
|
|
91
94
|
} else
|
|
92
95
|
return !1;
|
|
93
|
-
}),
|
|
96
|
+
}), l = u(() => {
|
|
94
97
|
var i;
|
|
95
98
|
return (i = e.label) != null ? i : U(e.value) ? "" : e.value;
|
|
96
99
|
}), C = u(() => e.value || e.label || ""), h = u(() => e.disabled || o.groupDisabled || p.value), S = Ee(), y = (i = [], O) => {
|
|
97
100
|
if (U(e.value)) {
|
|
98
101
|
const I = a.props.valueKey;
|
|
99
|
-
return i && i.some((R) =>
|
|
102
|
+
return i && i.some((R) => rl(z(R, I)) === z(O, I));
|
|
100
103
|
} else
|
|
101
104
|
return i && i.includes(O);
|
|
102
105
|
}, m = () => {
|
|
103
106
|
!e.disabled && !f.disabled && (a.states.hoveringIndex = a.optionsArray.indexOf(S.proxy));
|
|
104
107
|
}, s = (i) => {
|
|
105
108
|
const O = new RegExp(an(i), "i");
|
|
106
|
-
o.visible = O.test(String(
|
|
109
|
+
o.visible = O.test(String(l.value)) || e.created;
|
|
107
110
|
};
|
|
108
|
-
return G(() =>
|
|
111
|
+
return G(() => l.value, () => {
|
|
109
112
|
!e.created && !a.props.remote && a.setSelected();
|
|
110
113
|
}), G(() => e.value, (i, O) => {
|
|
111
114
|
const { remote: I, valueKey: R } = a.props;
|
|
112
|
-
if ((I ? i !== O : !
|
|
115
|
+
if ((I ? i !== O : !le(i, O)) && (a.onOptionDestroy(O, S.proxy), a.onOptionCreate(S.proxy)), !e.created && !I) {
|
|
113
116
|
if (R && U(i) && U(O) && i[R] === O[R])
|
|
114
117
|
return;
|
|
115
118
|
a.setSelected();
|
|
@@ -118,7 +121,7 @@ function sn(e, o) {
|
|
|
118
121
|
o.groupDisabled = f.disabled;
|
|
119
122
|
}, { immediate: !0 }), {
|
|
120
123
|
select: a,
|
|
121
|
-
currentLabel:
|
|
124
|
+
currentLabel: l,
|
|
122
125
|
currentValue: C,
|
|
123
126
|
itemSelected: d,
|
|
124
127
|
isDisabled: h,
|
|
@@ -131,10 +134,10 @@ const rn = pe({
|
|
|
131
134
|
componentName: Ne,
|
|
132
135
|
props: on,
|
|
133
136
|
setup(e) {
|
|
134
|
-
const o = ce("select"), a =
|
|
137
|
+
const o = ce("select"), a = ht(), f = u(() => [
|
|
135
138
|
o.be("dropdown", "item"),
|
|
136
139
|
o.is("disabled", $e(C)),
|
|
137
|
-
o.is("selected", $e(
|
|
140
|
+
o.is("selected", $e(l)),
|
|
138
141
|
o.is("hovering", $e(s))
|
|
139
142
|
]), d = de({
|
|
140
143
|
index: -1,
|
|
@@ -143,13 +146,13 @@ const rn = pe({
|
|
|
143
146
|
hover: !1
|
|
144
147
|
}), {
|
|
145
148
|
currentLabel: p,
|
|
146
|
-
itemSelected:
|
|
149
|
+
itemSelected: l,
|
|
147
150
|
isDisabled: C,
|
|
148
151
|
select: h,
|
|
149
152
|
hoverItem: S,
|
|
150
153
|
updateOption: y
|
|
151
154
|
} = sn(e, d), { visible: m, hover: s } = Be(d), i = Ee().proxy;
|
|
152
|
-
h.onOptionCreate(i),
|
|
155
|
+
h.onOptionCreate(i), ft(() => {
|
|
153
156
|
const I = i.value;
|
|
154
157
|
Q(() => {
|
|
155
158
|
const { selected: R } = h.states, g = R.some((c) => c.value === i.value);
|
|
@@ -164,7 +167,7 @@ const rn = pe({
|
|
|
164
167
|
id: a,
|
|
165
168
|
containerKls: f,
|
|
166
169
|
currentLabel: p,
|
|
167
|
-
itemSelected:
|
|
170
|
+
itemSelected: l,
|
|
168
171
|
isDisabled: C,
|
|
169
172
|
select: h,
|
|
170
173
|
visible: m,
|
|
@@ -199,13 +202,13 @@ const dn = pe({
|
|
|
199
202
|
componentName: "ElSelectDropdown",
|
|
200
203
|
setup() {
|
|
201
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("");
|
|
202
|
-
function
|
|
205
|
+
function l() {
|
|
203
206
|
var C;
|
|
204
207
|
const h = (C = e.selectRef) == null ? void 0 : C.offsetWidth;
|
|
205
|
-
h ? p.value = `${h -
|
|
208
|
+
h ? p.value = `${h - tn}px` : p.value = "";
|
|
206
209
|
}
|
|
207
210
|
return We(() => {
|
|
208
|
-
|
|
211
|
+
l(), ee(e.selectRef, l);
|
|
209
212
|
}), {
|
|
210
213
|
ns: o,
|
|
211
214
|
minWidth: p,
|
|
@@ -237,7 +240,7 @@ function cn(e, o, a, f, d, p) {
|
|
|
237
240
|
}
|
|
238
241
|
var pn = /* @__PURE__ */ Ve(dn, [["render", cn], ["__file", "select-dropdown.vue"]]);
|
|
239
242
|
const fn = (e, o) => {
|
|
240
|
-
const { t: a } =
|
|
243
|
+
const { t: a } = Il(), f = ht(), d = ce("select"), p = ce("input"), l = de({
|
|
241
244
|
inputValue: "",
|
|
242
245
|
options: /* @__PURE__ */ new Map(),
|
|
243
246
|
cachedOptions: /* @__PURE__ */ new Map(),
|
|
@@ -251,106 +254,106 @@ const fn = (e, o) => {
|
|
|
251
254
|
inputHovering: !1,
|
|
252
255
|
menuVisibleOnFocus: !1,
|
|
253
256
|
isBeforeHide: !1
|
|
254
|
-
}), 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 } =
|
|
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, {
|
|
255
258
|
formItemContext: B
|
|
256
|
-
}), { valueOnClear: Ke, isEmptyValue: Z } = $
|
|
259
|
+
}), { valueOnClear: Ke, isEmptyValue: Z } = $l(e), {
|
|
257
260
|
isComposing: He,
|
|
258
|
-
handleCompositionStart:
|
|
259
|
-
handleCompositionUpdate:
|
|
260
|
-
handleCompositionEnd:
|
|
261
|
-
} =
|
|
262
|
-
afterComposition: (
|
|
263
|
-
}), ne = u(() => e.disabled || !!(Y != null && Y.disabled)), { wrapperRef: Ge, isFocused: Te, handleBlur:
|
|
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, {
|
|
264
267
|
disabled: ne,
|
|
265
268
|
afterFocus() {
|
|
266
|
-
e.automaticDropdown && !c.value && (c.value = !0,
|
|
269
|
+
e.automaticDropdown && !c.value && (c.value = !0, l.menuVisibleOnFocus = !0);
|
|
267
270
|
},
|
|
268
|
-
beforeBlur(
|
|
271
|
+
beforeBlur(t) {
|
|
269
272
|
var n, r;
|
|
270
|
-
return ((n = S.value) == null ? void 0 : n.isFocusInsideContent(
|
|
273
|
+
return ((n = S.value) == null ? void 0 : n.isFocusInsideContent(t)) || ((r = y.value) == null ? void 0 : r.isFocusInsideContent(t));
|
|
271
274
|
},
|
|
272
275
|
afterBlur() {
|
|
273
|
-
var
|
|
274
|
-
c.value = !1,
|
|
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()));
|
|
275
278
|
}
|
|
276
|
-
}), ke = u(() => j(e.modelValue) ? e.modelValue.length > 0 : !Z(e.modelValue)),
|
|
277
|
-
var
|
|
278
|
-
return (
|
|
279
|
-
}),
|
|
280
|
-
const
|
|
281
|
-
return
|
|
282
|
-
const V =
|
|
283
|
-
V > -1 && n.push(
|
|
284
|
-
}), n.length >=
|
|
285
|
-
}), $
|
|
286
|
-
const
|
|
287
|
-
return e.filterable && e.allowCreate &&
|
|
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;
|
|
288
291
|
}), je = () => {
|
|
289
|
-
e.filterable && re(e.filterMethod) || e.filterable && e.remote && re(e.remoteMethod) || D.value.forEach((
|
|
292
|
+
e.filterable && re(e.filterMethod) || e.filterable && e.remote && re(e.remoteMethod) || D.value.forEach((t) => {
|
|
290
293
|
var n;
|
|
291
|
-
(n =
|
|
294
|
+
(n = t.updateOption) == null || n.call(t, l.inputValue);
|
|
292
295
|
});
|
|
293
|
-
}, qe =
|
|
296
|
+
}, qe = Wl(), Nt = u(() => ["small"].includes(qe.value) ? "small" : "default"), Qe = u({
|
|
294
297
|
get() {
|
|
295
|
-
return c.value && !
|
|
298
|
+
return c.value && !Mt.value;
|
|
296
299
|
},
|
|
297
|
-
set(
|
|
298
|
-
c.value =
|
|
300
|
+
set(t) {
|
|
301
|
+
c.value = t;
|
|
299
302
|
}
|
|
300
|
-
}),
|
|
303
|
+
}), Bt = u(() => {
|
|
301
304
|
if (e.multiple && !Oe(e.modelValue))
|
|
302
|
-
return X(e.modelValue).length === 0 && !
|
|
303
|
-
const
|
|
304
|
-
return e.filterable || Oe(
|
|
305
|
-
}),
|
|
306
|
-
var
|
|
307
|
-
const n = (
|
|
308
|
-
return e.multiple || !ke.value ? n :
|
|
309
|
-
}),
|
|
310
|
-
G(() => e.modelValue, (
|
|
311
|
-
e.multiple && e.filterable && !e.reserveKeyword && (
|
|
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()));
|
|
312
315
|
}, {
|
|
313
316
|
flush: "post",
|
|
314
317
|
deep: !0
|
|
315
|
-
}), G(() => c.value, (
|
|
316
|
-
|
|
317
|
-
}), G(() =>
|
|
318
|
-
|
|
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());
|
|
319
322
|
}, {
|
|
320
323
|
flush: "post"
|
|
321
|
-
}), G([() =>
|
|
322
|
-
|
|
324
|
+
}), G([() => l.hoveringIndex, D], ([t]) => {
|
|
325
|
+
kl(t) && t > -1 ? E.value = D.value[t] || {} : E.value = {}, D.value.forEach((n) => {
|
|
323
326
|
n.hover = E.value === n;
|
|
324
327
|
});
|
|
325
|
-
}),
|
|
326
|
-
|
|
328
|
+
}), ul(() => {
|
|
329
|
+
l.isBeforeHide || je();
|
|
327
330
|
});
|
|
328
|
-
const fe = (
|
|
329
|
-
|
|
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));
|
|
330
333
|
}, Xe = () => {
|
|
331
|
-
const
|
|
332
|
-
|
|
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);
|
|
333
336
|
}, ve = () => {
|
|
334
337
|
if (e.multiple)
|
|
335
|
-
|
|
338
|
+
l.selectedLabel = "";
|
|
336
339
|
else {
|
|
337
340
|
const n = j(e.modelValue) ? e.modelValue[0] : e.modelValue, r = Me(n);
|
|
338
|
-
|
|
341
|
+
l.selectedLabel = r.currentLabel, l.selected = [r];
|
|
339
342
|
return;
|
|
340
343
|
}
|
|
341
|
-
const
|
|
344
|
+
const t = [];
|
|
342
345
|
Oe(e.modelValue) || X(e.modelValue).forEach((n) => {
|
|
343
|
-
|
|
344
|
-
}),
|
|
345
|
-
}, Me = (
|
|
346
|
+
t.push(Me(n));
|
|
347
|
+
}), l.selected = t;
|
|
348
|
+
}, Me = (t) => {
|
|
346
349
|
let n;
|
|
347
|
-
const r =
|
|
348
|
-
for (let
|
|
349
|
-
const K = $
|
|
350
|
-
if (r ? z(K.value, e.valueKey) === z(
|
|
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) {
|
|
351
354
|
n = {
|
|
352
355
|
index: D.value.filter((J) => !J.created).indexOf(K),
|
|
353
|
-
value:
|
|
356
|
+
value: t,
|
|
354
357
|
currentLabel: K.currentLabel,
|
|
355
358
|
get isDisabled() {
|
|
356
359
|
return K.isDisabled;
|
|
@@ -361,100 +364,100 @@ const fn = (e, o) => {
|
|
|
361
364
|
}
|
|
362
365
|
if (n)
|
|
363
366
|
return n;
|
|
364
|
-
const V = r ?
|
|
367
|
+
const V = r ? t.label : t ?? "";
|
|
365
368
|
return {
|
|
366
369
|
index: -1,
|
|
367
|
-
value:
|
|
370
|
+
value: t,
|
|
368
371
|
currentLabel: V
|
|
369
372
|
};
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
|
|
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;
|
|
376
379
|
}, Re = () => {
|
|
377
|
-
var
|
|
378
|
-
(n = (
|
|
380
|
+
var t, n;
|
|
381
|
+
(n = (t = S.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
379
382
|
}, Ye = () => {
|
|
380
|
-
var
|
|
381
|
-
(n = (
|
|
383
|
+
var t, n;
|
|
384
|
+
(n = (t = y.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
382
385
|
}, Ze = () => {
|
|
383
|
-
|
|
384
|
-
}, Je = (
|
|
385
|
-
if (
|
|
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)
|
|
386
389
|
_e();
|
|
387
390
|
else
|
|
388
391
|
return Ze();
|
|
389
|
-
}, _e =
|
|
392
|
+
}, _e = Ul(() => {
|
|
390
393
|
Ze();
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
const r =
|
|
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);
|
|
395
398
|
return r && !r.disabled && !r.states.groupDisabled;
|
|
396
|
-
}),
|
|
397
|
-
if (e.multiple &&
|
|
398
|
-
const n = X(e.modelValue).slice(), r =
|
|
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);
|
|
399
402
|
if (r < 0)
|
|
400
403
|
return;
|
|
401
404
|
const V = n[r];
|
|
402
405
|
n.splice(r, 1), o(x, n), ae(n), o("remove-tag", V);
|
|
403
406
|
}
|
|
404
|
-
},
|
|
405
|
-
const r =
|
|
407
|
+
}, Gt = (t, n) => {
|
|
408
|
+
const r = l.selected.indexOf(n);
|
|
406
409
|
if (r > -1 && !ne.value) {
|
|
407
410
|
const V = X(e.modelValue).slice();
|
|
408
411
|
V.splice(r, 1), o(x, V), ae(V), o("remove-tag", n.value);
|
|
409
412
|
}
|
|
410
|
-
|
|
411
|
-
}, xe = (
|
|
412
|
-
|
|
413
|
+
t.stopPropagation(), be();
|
|
414
|
+
}, xe = (t) => {
|
|
415
|
+
t.stopPropagation();
|
|
413
416
|
const n = e.multiple ? [] : Ke.value;
|
|
414
417
|
if (e.multiple)
|
|
415
|
-
for (const r of
|
|
418
|
+
for (const r of l.selected)
|
|
416
419
|
r.isDisabled && n.push(r.value);
|
|
417
|
-
o(x, n), ae(n),
|
|
418
|
-
},
|
|
420
|
+
o(x, n), ae(n), l.hoveringIndex = -1, c.value = !1, o("clear"), be();
|
|
421
|
+
}, et = (t) => {
|
|
419
422
|
var n;
|
|
420
423
|
if (e.multiple) {
|
|
421
|
-
const r = X((n = e.modelValue) != null ? n : []).slice(), V =
|
|
422
|
-
V > -1 ? r.splice(V, 1) : (e.multipleLimit <= 0 || r.length < e.multipleLimit) && r.push(
|
|
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 = "");
|
|
423
426
|
} else
|
|
424
|
-
!
|
|
427
|
+
!le(e.modelValue, t.value) && o(x, t.value), ae(t.value), c.value = !1;
|
|
425
428
|
be(), !c.value && Q(() => {
|
|
426
|
-
me(
|
|
429
|
+
me(t);
|
|
427
430
|
});
|
|
428
|
-
},
|
|
429
|
-
var n, r, V, N,
|
|
430
|
-
const K = j(
|
|
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;
|
|
431
434
|
let ye = null;
|
|
432
435
|
if (K != null && K.value) {
|
|
433
|
-
const J = D.value.filter((
|
|
436
|
+
const J = D.value.filter((sl) => sl.value === K.value);
|
|
434
437
|
J.length > 0 && (ye = J[0].$el);
|
|
435
438
|
}
|
|
436
439
|
if (S.value && ye) {
|
|
437
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")}`);
|
|
438
|
-
J &&
|
|
441
|
+
J && Hl(J, ye);
|
|
439
442
|
}
|
|
440
|
-
(
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
var
|
|
447
|
-
return (n = (
|
|
448
|
-
}),
|
|
449
|
-
|
|
450
|
-
var
|
|
451
|
-
(
|
|
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);
|
|
452
455
|
});
|
|
453
456
|
}, be = () => {
|
|
454
|
-
var
|
|
455
|
-
(
|
|
456
|
-
},
|
|
457
|
-
var
|
|
457
|
+
var t;
|
|
458
|
+
(t = m.value) == null || t.focus();
|
|
459
|
+
}, Xt = () => {
|
|
460
|
+
var t;
|
|
458
461
|
if (c.value) {
|
|
459
462
|
c.value = !1, Q(() => {
|
|
460
463
|
var n;
|
|
@@ -462,50 +465,50 @@ const fn = (e, o) => {
|
|
|
462
465
|
});
|
|
463
466
|
return;
|
|
464
467
|
}
|
|
465
|
-
(
|
|
466
|
-
},
|
|
467
|
-
xe(
|
|
468
|
-
},
|
|
468
|
+
(t = m.value) == null || t.blur();
|
|
469
|
+
}, Yt = (t) => {
|
|
470
|
+
xe(t);
|
|
471
|
+
}, Zt = (t) => {
|
|
469
472
|
if (c.value = !1, Te.value) {
|
|
470
|
-
const n = new FocusEvent("blur",
|
|
471
|
-
Q(() =>
|
|
473
|
+
const n = new FocusEvent("blur", t);
|
|
474
|
+
Q(() => Et(n));
|
|
472
475
|
}
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
},
|
|
476
|
-
ne.value || (
|
|
477
|
-
},
|
|
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 = () => {
|
|
478
481
|
if (!c.value)
|
|
479
|
-
|
|
482
|
+
lt();
|
|
480
483
|
else {
|
|
481
|
-
const
|
|
482
|
-
|
|
484
|
+
const t = D.value[l.hoveringIndex];
|
|
485
|
+
t && !t.isDisabled && et(t);
|
|
483
486
|
}
|
|
484
|
-
}, he = (
|
|
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) => {
|
|
485
488
|
if (!c.value) {
|
|
486
489
|
c.value = !0;
|
|
487
490
|
return;
|
|
488
491
|
}
|
|
489
|
-
if (!(
|
|
490
|
-
|
|
491
|
-
const n = D.value[
|
|
492
|
-
(n.isDisabled || !n.visible) &&
|
|
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));
|
|
493
496
|
}
|
|
494
|
-
},
|
|
497
|
+
}, ll = () => {
|
|
495
498
|
if (!h.value)
|
|
496
499
|
return 0;
|
|
497
|
-
const
|
|
498
|
-
return Number.parseFloat(
|
|
499
|
-
},
|
|
500
|
-
const
|
|
501
|
-
return { maxWidth: `${R.value && e.maxCollapseTags === 1 ?
|
|
502
|
-
}),
|
|
503
|
-
o("popup-scroll",
|
|
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);
|
|
504
507
|
};
|
|
505
|
-
ee(h,
|
|
508
|
+
ee(h, zt), ee(Ge, Re), ee(I, Ye), ee(R, At);
|
|
506
509
|
let ge;
|
|
507
|
-
return G(() => Qe.value, (
|
|
508
|
-
|
|
510
|
+
return G(() => Qe.value, (t) => {
|
|
511
|
+
t ? ge = ee(O, Re).stop : (ge == null || ge(), ge = void 0);
|
|
509
512
|
}), We(() => {
|
|
510
513
|
ve();
|
|
511
514
|
}), {
|
|
@@ -513,7 +516,7 @@ const fn = (e, o) => {
|
|
|
513
516
|
contentId: f,
|
|
514
517
|
nsSelect: d,
|
|
515
518
|
nsInput: p,
|
|
516
|
-
states:
|
|
519
|
+
states: l,
|
|
517
520
|
isFocused: Te,
|
|
518
521
|
expanded: c,
|
|
519
522
|
optionsArray: D,
|
|
@@ -524,50 +527,50 @@ const fn = (e, o) => {
|
|
|
524
527
|
updateTagTooltip: Ye,
|
|
525
528
|
debouncedOnInputChange: _e,
|
|
526
529
|
onInput: Je,
|
|
527
|
-
deletePrevTag:
|
|
528
|
-
deleteTag:
|
|
530
|
+
deletePrevTag: Ht,
|
|
531
|
+
deleteTag: Gt,
|
|
529
532
|
deleteSelected: xe,
|
|
530
|
-
handleOptionSelect:
|
|
533
|
+
handleOptionSelect: et,
|
|
531
534
|
scrollToOption: me,
|
|
532
535
|
hasModelValue: ke,
|
|
533
|
-
shouldShowPlaceholder:
|
|
534
|
-
currentPlaceholder:
|
|
535
|
-
mouseEnterEventName:
|
|
536
|
-
needStatusIcon:
|
|
537
|
-
showClearBtn:
|
|
536
|
+
shouldShowPlaceholder: Bt,
|
|
537
|
+
currentPlaceholder: Pt,
|
|
538
|
+
mouseEnterEventName: Wt,
|
|
539
|
+
needStatusIcon: Vt,
|
|
540
|
+
showClearBtn: It,
|
|
538
541
|
iconComponent: Ue,
|
|
539
|
-
iconReverse:
|
|
542
|
+
iconReverse: Tt,
|
|
540
543
|
validateState: De,
|
|
541
|
-
validateIcon:
|
|
542
|
-
showNewOption:
|
|
544
|
+
validateIcon: kt,
|
|
545
|
+
showNewOption: Lt,
|
|
543
546
|
updateOptions: je,
|
|
544
|
-
collapseTagSize:
|
|
547
|
+
collapseTagSize: Nt,
|
|
545
548
|
setSelected: ve,
|
|
546
549
|
selectDisabled: ne,
|
|
547
|
-
emptyText:
|
|
548
|
-
handleCompositionStart:
|
|
549
|
-
handleCompositionUpdate:
|
|
550
|
-
handleCompositionEnd:
|
|
551
|
-
onOptionCreate:
|
|
552
|
-
onOptionDestroy:
|
|
553
|
-
handleMenuEnter:
|
|
550
|
+
emptyText: Rt,
|
|
551
|
+
handleCompositionStart: Ot,
|
|
552
|
+
handleCompositionUpdate: Ct,
|
|
553
|
+
handleCompositionEnd: wt,
|
|
554
|
+
onOptionCreate: Ut,
|
|
555
|
+
onOptionDestroy: jt,
|
|
556
|
+
handleMenuEnter: Qt,
|
|
554
557
|
focus: be,
|
|
555
|
-
blur:
|
|
556
|
-
handleClearClick:
|
|
557
|
-
handleClickOutside:
|
|
558
|
-
handleEsc:
|
|
559
|
-
toggleMenu:
|
|
560
|
-
selectOption:
|
|
558
|
+
blur: Xt,
|
|
559
|
+
handleClearClick: Yt,
|
|
560
|
+
handleClickOutside: Zt,
|
|
561
|
+
handleEsc: Jt,
|
|
562
|
+
toggleMenu: lt,
|
|
563
|
+
selectOption: _t,
|
|
561
564
|
getValueKey: he,
|
|
562
|
-
navigateOptions:
|
|
565
|
+
navigateOptions: nt,
|
|
563
566
|
dropdownMenuVisible: Qe,
|
|
564
|
-
showTagList:
|
|
565
|
-
collapseTagList:
|
|
566
|
-
popupScroll:
|
|
567
|
+
showTagList: el,
|
|
568
|
+
collapseTagList: tl,
|
|
569
|
+
popupScroll: al,
|
|
567
570
|
getOption: Me,
|
|
568
|
-
tagStyle:
|
|
569
|
-
collapseTagStyle:
|
|
570
|
-
popperRef:
|
|
571
|
+
tagStyle: nl,
|
|
572
|
+
collapseTagStyle: ol,
|
|
573
|
+
popperRef: qt,
|
|
571
574
|
inputRef: m,
|
|
572
575
|
tooltipRef: S,
|
|
573
576
|
tagTooltipRef: y,
|
|
@@ -589,19 +592,19 @@ var vn = pe({
|
|
|
589
592
|
let f = [];
|
|
590
593
|
return () => {
|
|
591
594
|
var d, p;
|
|
592
|
-
const
|
|
595
|
+
const l = (d = o.default) == null ? void 0 : d.call(o), C = [];
|
|
593
596
|
function h(S) {
|
|
594
597
|
j(S) && S.forEach((y) => {
|
|
595
598
|
var m, s, i, O;
|
|
596
599
|
const I = (m = (y == null ? void 0 : y.type) || {}) == null ? void 0 : m.name;
|
|
597
|
-
I === "ElOptionGroup" ? h(!
|
|
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);
|
|
598
601
|
});
|
|
599
602
|
}
|
|
600
|
-
return
|
|
603
|
+
return l.length && h((p = l[0]) == null ? void 0 : p.children), le(C, f) || (f = C, a && (a.states.optionValues = C)), l;
|
|
601
604
|
};
|
|
602
605
|
}
|
|
603
606
|
});
|
|
604
|
-
const mn =
|
|
607
|
+
const mn = mt({
|
|
605
608
|
name: String,
|
|
606
609
|
id: String,
|
|
607
610
|
modelValue: {
|
|
@@ -619,7 +622,7 @@ const mn = ml({
|
|
|
619
622
|
default: "off"
|
|
620
623
|
},
|
|
621
624
|
automaticDropdown: Boolean,
|
|
622
|
-
size:
|
|
625
|
+
size: Fl,
|
|
623
626
|
effect: {
|
|
624
627
|
type: W(String),
|
|
625
628
|
default: "light"
|
|
@@ -673,22 +676,22 @@ const mn = ml({
|
|
|
673
676
|
type: Number,
|
|
674
677
|
default: 1
|
|
675
678
|
},
|
|
676
|
-
teleported:
|
|
679
|
+
teleported: it.teleported,
|
|
677
680
|
persistent: {
|
|
678
681
|
type: Boolean,
|
|
679
682
|
default: !0
|
|
680
683
|
},
|
|
681
684
|
clearIcon: {
|
|
682
|
-
type:
|
|
683
|
-
default:
|
|
685
|
+
type: dt,
|
|
686
|
+
default: wl
|
|
684
687
|
},
|
|
685
688
|
fitInputWidth: Boolean,
|
|
686
689
|
suffixIcon: {
|
|
687
|
-
type:
|
|
688
|
-
default:
|
|
690
|
+
type: dt,
|
|
691
|
+
default: El
|
|
689
692
|
},
|
|
690
|
-
tagType: { ...
|
|
691
|
-
tagEffect: { ...
|
|
693
|
+
tagType: { ...rt.type, default: "info" },
|
|
694
|
+
tagEffect: { ...rt.effect, default: "light" },
|
|
692
695
|
validateEvent: {
|
|
693
696
|
type: Boolean,
|
|
694
697
|
default: !0
|
|
@@ -704,7 +707,7 @@ const mn = ml({
|
|
|
704
707
|
},
|
|
705
708
|
placement: {
|
|
706
709
|
type: W(String),
|
|
707
|
-
values:
|
|
710
|
+
values: hl,
|
|
708
711
|
default: "bottom-start"
|
|
709
712
|
},
|
|
710
713
|
fallbackPlacements: {
|
|
@@ -715,18 +718,18 @@ const mn = ml({
|
|
|
715
718
|
type: [String, Number],
|
|
716
719
|
default: 0
|
|
717
720
|
},
|
|
718
|
-
appendTo:
|
|
721
|
+
appendTo: it.appendTo,
|
|
719
722
|
options: {
|
|
720
723
|
type: W(Array)
|
|
721
724
|
},
|
|
722
725
|
props: {
|
|
723
726
|
type: W(Object),
|
|
724
|
-
default: () =>
|
|
727
|
+
default: () => yt
|
|
725
728
|
},
|
|
726
|
-
...
|
|
727
|
-
...
|
|
729
|
+
...Ll,
|
|
730
|
+
...gl(["ariaLabel"])
|
|
728
731
|
});
|
|
729
|
-
x + "", Fe + "",
|
|
732
|
+
x + "", Fe + "", Sl.scroll;
|
|
730
733
|
const bn = pe({
|
|
731
734
|
name: "ElOptionGroup",
|
|
732
735
|
componentName: "ElOptionGroup",
|
|
@@ -736,24 +739,24 @@ const bn = pe({
|
|
|
736
739
|
},
|
|
737
740
|
setup(e) {
|
|
738
741
|
const o = ce("select"), a = T(), f = Ee(), d = T([]);
|
|
739
|
-
|
|
742
|
+
vt(St, de({
|
|
740
743
|
...Be(e)
|
|
741
744
|
}));
|
|
742
|
-
const p = u(() => d.value.some((S) => S.visible === !0)),
|
|
745
|
+
const p = u(() => d.value.some((S) => S.visible === !0)), l = (S) => {
|
|
743
746
|
var y;
|
|
744
747
|
return S.type.name === "ElOption" && !!((y = S.component) != null && y.proxy);
|
|
745
748
|
}, C = (S) => {
|
|
746
749
|
const y = X(S), m = [];
|
|
747
750
|
return y.forEach((s) => {
|
|
748
751
|
var i;
|
|
749
|
-
|
|
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)));
|
|
750
753
|
}), m;
|
|
751
754
|
}, h = () => {
|
|
752
755
|
d.value = C(f.subTree);
|
|
753
756
|
};
|
|
754
757
|
return We(() => {
|
|
755
758
|
h();
|
|
756
|
-
}),
|
|
759
|
+
}), zl(a, h, {
|
|
757
760
|
attributes: !0,
|
|
758
761
|
subtree: !0,
|
|
759
762
|
childList: !0
|
|
@@ -784,20 +787,20 @@ function hn(e, o, a, f, d, p) {
|
|
|
784
787
|
]);
|
|
785
788
|
}
|
|
786
789
|
var Ae = /* @__PURE__ */ Ve(bn, [["render", hn], ["__file", "option-group.vue"]]);
|
|
787
|
-
const
|
|
788
|
-
name:
|
|
789
|
-
componentName:
|
|
790
|
+
const pt = "ElSelect", gn = pe({
|
|
791
|
+
name: pt,
|
|
792
|
+
componentName: pt,
|
|
790
793
|
components: {
|
|
791
794
|
ElSelectMenu: pn,
|
|
792
795
|
ElOption: ze,
|
|
793
796
|
ElOptions: vn,
|
|
794
797
|
ElOptionGroup: Ae,
|
|
795
|
-
ElTag:
|
|
796
|
-
ElScrollbar:
|
|
797
|
-
ElTooltip:
|
|
798
|
-
ElIcon:
|
|
798
|
+
ElTag: Cl,
|
|
799
|
+
ElScrollbar: Ol,
|
|
800
|
+
ElTooltip: yl,
|
|
801
|
+
ElIcon: Vl
|
|
799
802
|
},
|
|
800
|
-
directives: { ClickOutside:
|
|
803
|
+
directives: { ClickOutside: ql },
|
|
801
804
|
props: mn,
|
|
802
805
|
emits: [
|
|
803
806
|
x,
|
|
@@ -820,23 +823,23 @@ const pl = "ElSelect", gn = pe({
|
|
|
820
823
|
}), p = de({
|
|
821
824
|
...Be(e),
|
|
822
825
|
modelValue: d
|
|
823
|
-
}),
|
|
826
|
+
}), l = fn(p, o), { calculatorRef: C, inputStyle: h } = ln(), { getLabel: S, getValue: y, getOptions: m, getDisabled: s } = nn(e), i = (g) => ({
|
|
824
827
|
label: S(g),
|
|
825
828
|
value: y(g),
|
|
826
829
|
disabled: s(g)
|
|
827
830
|
}), O = (g) => g.reduce((c, E) => (c.push(E), E.children && E.children.length > 0 && c.push(...O(E.children)), c), []), I = (g) => {
|
|
828
|
-
|
|
831
|
+
Ql(g || []).forEach((E) => {
|
|
829
832
|
var Y;
|
|
830
833
|
if (U(E) && (E.type.name === "ElOption" || E.type.name === "ElTree")) {
|
|
831
834
|
const B = E.type.name;
|
|
832
835
|
if (B === "ElTree") {
|
|
833
836
|
const A = ((Y = E.props) == null ? void 0 : Y.data) || [];
|
|
834
837
|
O(A).forEach((Z) => {
|
|
835
|
-
Z.currentLabel = Z.label || (U(Z.value) ? "" : Z.value),
|
|
838
|
+
Z.currentLabel = Z.label || (U(Z.value) ? "" : Z.value), l.onOptionCreate(Z);
|
|
836
839
|
});
|
|
837
840
|
} else if (B === "ElOption") {
|
|
838
841
|
const A = { ...E.props };
|
|
839
|
-
A.currentLabel = A.label || (U(A.value) ? "" : A.value),
|
|
842
|
+
A.currentLabel = A.label || (U(A.value) ? "" : A.value), l.onOptionCreate(A);
|
|
840
843
|
}
|
|
841
844
|
}
|
|
842
845
|
});
|
|
@@ -848,21 +851,21 @@ const pl = "ElSelect", gn = pe({
|
|
|
848
851
|
e.persistent || I(g);
|
|
849
852
|
}, {
|
|
850
853
|
immediate: !0
|
|
851
|
-
}),
|
|
854
|
+
}), vt(Ie, de({
|
|
852
855
|
props: p,
|
|
853
|
-
states:
|
|
854
|
-
selectRef:
|
|
855
|
-
optionsArray:
|
|
856
|
-
setSelected:
|
|
857
|
-
handleOptionSelect:
|
|
858
|
-
onOptionCreate:
|
|
859
|
-
onOptionDestroy:
|
|
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
|
|
860
863
|
}));
|
|
861
|
-
const R = u(() => e.multiple ?
|
|
862
|
-
return
|
|
864
|
+
const R = u(() => e.multiple ? l.states.selected.map((g) => g.currentLabel) : l.states.selectedLabel);
|
|
865
|
+
return ft(() => {
|
|
863
866
|
f.appContext.config.warnHandler = void 0;
|
|
864
867
|
}), {
|
|
865
|
-
...
|
|
868
|
+
...l,
|
|
866
869
|
modelValue: d,
|
|
867
870
|
selectedLabel: R,
|
|
868
871
|
calculatorRef: C,
|
|
@@ -876,11 +879,11 @@ const pl = "ElSelect", gn = pe({
|
|
|
876
879
|
}
|
|
877
880
|
});
|
|
878
881
|
function yn(e, o) {
|
|
879
|
-
const a = q("el-tag"), f = q("el-tooltip"), d = q("el-icon"), p = q("el-option"),
|
|
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");
|
|
880
883
|
return ue((v(), w("div", {
|
|
881
884
|
ref: "selectRef",
|
|
882
885
|
class: b([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
|
|
883
|
-
[
|
|
886
|
+
[pl(e.mouseEnterEventName)]: (m) => e.states.inputHovering = !0,
|
|
884
887
|
onMouseleave: (m) => e.states.inputHovering = !1
|
|
885
888
|
}, [
|
|
886
889
|
_(f, {
|
|
@@ -961,7 +964,7 @@ function yn(e, o) {
|
|
|
961
964
|
label: s.currentLabel,
|
|
962
965
|
value: s.value
|
|
963
966
|
}, () => [
|
|
964
|
-
|
|
967
|
+
ot(H(s.currentLabel), 1)
|
|
965
968
|
])
|
|
966
969
|
], 2)
|
|
967
970
|
]),
|
|
@@ -1028,7 +1031,7 @@ function yn(e, o) {
|
|
|
1028
1031
|
label: s.currentLabel,
|
|
1029
1032
|
value: s.value
|
|
1030
1033
|
}, () => [
|
|
1031
|
-
|
|
1034
|
+
ot(H(s.currentLabel), 1)
|
|
1032
1035
|
])
|
|
1033
1036
|
], 2)
|
|
1034
1037
|
]),
|
|
@@ -1080,7 +1083,7 @@ function yn(e, o) {
|
|
|
1080
1083
|
onInput: e.onInput,
|
|
1081
1084
|
onClick: F(e.toggleMenu, ["stop"])
|
|
1082
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"]), [
|
|
1083
|
-
[
|
|
1086
|
+
[fl, e.states.inputValue]
|
|
1084
1087
|
]),
|
|
1085
1088
|
e.filterable ? (v(), w("span", {
|
|
1086
1089
|
key: 0,
|
|
@@ -1187,18 +1190,18 @@ function yn(e, o) {
|
|
|
1187
1190
|
(v(!0), w(se, null, Se(e.options, (m, s) => {
|
|
1188
1191
|
var i;
|
|
1189
1192
|
return v(), w(se, { key: s }, [
|
|
1190
|
-
(i = e.getOptions(m)) != null && i.length ? (v(), P(
|
|
1193
|
+
(i = e.getOptions(m)) != null && i.length ? (v(), P(l, {
|
|
1191
1194
|
key: 0,
|
|
1192
1195
|
label: e.getLabel(m),
|
|
1193
1196
|
disabled: e.getDisabled(m)
|
|
1194
1197
|
}, {
|
|
1195
1198
|
default: $(() => [
|
|
1196
|
-
(v(!0), w(se, null, Se(e.getOptions(m), (O) => (v(), P(p,
|
|
1199
|
+
(v(!0), w(se, null, Se(e.getOptions(m), (O) => (v(), P(p, at({
|
|
1197
1200
|
key: e.getValue(O)
|
|
1198
1201
|
}, e.getOptionProps(O)), null, 16))), 128))
|
|
1199
1202
|
]),
|
|
1200
1203
|
_: 2
|
|
1201
|
-
}, 1032, ["label", "disabled"])) : (v(), P(p,
|
|
1204
|
+
}, 1032, ["label", "disabled"])) : (v(), P(p, vl(at({ key: 1 }, e.getOptionProps(m))), null, 16))
|
|
1202
1205
|
], 64);
|
|
1203
1206
|
}), 128))
|
|
1204
1207
|
])
|
|
@@ -1242,12 +1245,12 @@ function yn(e, o) {
|
|
|
1242
1245
|
]);
|
|
1243
1246
|
}
|
|
1244
1247
|
var Sn = /* @__PURE__ */ Ve(gn, [["render", yn], ["__file", "select.vue"]]);
|
|
1245
|
-
const
|
|
1248
|
+
const Wn = Rl(Sn, {
|
|
1246
1249
|
Option: ze,
|
|
1247
1250
|
OptionGroup: Ae
|
|
1248
|
-
}),
|
|
1249
|
-
|
|
1251
|
+
}), Fn = bt(ze);
|
|
1252
|
+
bt(Ae);
|
|
1250
1253
|
export {
|
|
1251
|
-
|
|
1252
|
-
|
|
1254
|
+
Fn as E,
|
|
1255
|
+
Wn as a
|
|
1253
1256
|
};
|