st-comp 0.0.248 → 0.0.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.d.ts +1 -0
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +82 -80
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +36 -35
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +20 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +83 -82
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +19 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +22 -21
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +63 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +28 -26
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +121 -120
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -30
- package/es/User.cjs +1 -1
- package/es/User.js +157 -155
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +29 -27
- package/es/VarietyAiHelper.cjs +4 -0
- package/es/VarietyAiHelper.js +270 -0
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +13 -12
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +70 -68
- package/es/{VarietySelect-2fd501da.cjs → VarietySelect-5c845562.cjs} +1 -1
- package/es/{VarietySelect-b9fe3000.js → VarietySelect-9f267958.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +24 -22
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-3823a101.cjs → _initCloneObject-2b82e9f7.cjs} +1 -1
- package/es/{_initCloneObject-382335b2.js → _initCloneObject-69c8ae23.js} +7 -7
- package/es/aiTools.js +36 -0
- package/es/{base-ff0e366f.js → base-29f73b05.js} +40 -40
- package/es/{castArray-15070be9.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-2182708a.cjs → config-provider-2ae47cc8.cjs} +1 -1
- package/es/{config-provider-2e85eee8.js → config-provider-7860903c.js} +6 -6
- package/es/{debounce-e9e47f9a.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-2b35a683.js → dropdown-497442b7.js} +30 -29
- package/es/dropdown-eba9eaf5.cjs +1 -0
- package/es/{el-autocomplete-18be2c5a.js → el-autocomplete-27c60cc8.js} +24 -23
- package/es/el-autocomplete-b59eb529.cjs +1 -0
- package/es/{el-button-68baab7b.cjs → el-button-974ff9e9.cjs} +1 -1
- package/es/{el-button-f08c0639.js → el-button-e2c63c08.js} +39 -39
- package/es/el-checkbox-08185353.cjs +1 -0
- package/es/{el-checkbox-058dba2d.js → el-checkbox-71ebd862.js} +31 -31
- package/es/el-dialog-1b185570.cjs +1 -0
- package/es/{el-dialog-d328e0d8.js → el-dialog-eedcfd3e.js} +15 -15
- package/es/{el-divider-4fe55ebe.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-ceecb81c.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-cb328886.js → el-form-item-bdcfd297.js} +36 -36
- package/es/{el-form-item-4076e55f.cjs → el-form-item-c997b4fa.cjs} +1 -1
- package/es/{el-input-0f6ead19.js → el-input-d47281da.js} +91 -91
- package/es/el-input-fa18ef84.cjs +1 -0
- package/es/el-input-number-3d94fa58.cjs +1 -0
- package/es/{el-input-number-66e68609.js → el-input-number-c8018cb1.js} +28 -28
- package/es/{el-loading-412370c7.js → el-loading-0cd81d05.js} +5 -5
- package/es/{el-loading-05826e64.cjs → el-loading-969a79ca.cjs} +1 -1
- package/es/el-menu-item-26071fd6.cjs +1 -0
- package/es/{el-menu-item-0ee8ad18.js → el-menu-item-dac65bb3.js} +31 -30
- package/es/el-message-0ea8fbf8.cjs +1 -0
- package/es/el-message-4ed993c7.js +1 -0
- package/es/el-message-box-31e0aa98.cjs +1 -0
- package/es/{el-message-box-6db52b29.js → el-message-box-fea4fca8.js} +11 -11
- package/es/{el-overlay-981f8d49.js → el-overlay-1ee0338d.js} +63 -63
- package/es/el-overlay-ea65cb05.cjs +1 -0
- package/es/{el-popconfirm-005013fa.js → el-popconfirm-089b8bec.js} +17 -16
- package/es/el-popconfirm-9e232436.cjs +1 -0
- package/es/el-popper-2d3914e4.cjs +1 -0
- package/es/el-popper-c9b3d3cf.js +1662 -0
- package/es/el-segmented-140ac042.cjs +1 -0
- package/es/{el-segmented-050d0090.js → el-segmented-9d3a9e11.js} +8 -8
- package/es/el-select-a11f33e8.cjs +1 -0
- package/es/{el-select-23a1f302.js → el-select-e51e11c1.js} +92 -91
- package/es/{el-table-column-d0c374cf.js → el-table-column-05d292a8.js} +25 -24
- package/es/el-table-column-98570a4d.cjs +14 -0
- package/es/{el-tag-f13f463b.js → el-tag-17cd04a1.js} +14 -14
- package/es/el-tag-6d8e653e.cjs +1 -0
- package/es/{el-text-27cef2be.js → el-text-2710fff3.js} +2 -2
- package/es/{el-text-1470de46.cjs → el-text-a18106cb.cjs} +1 -1
- package/es/{index-09bd2621.js → index-0ee486ad.js} +43 -43
- package/es/index-0f79095c.js +440 -0
- package/es/{index-e0901394.js → index-1d9b50de.js} +34 -34
- package/es/index-28e03bad.cjs +1 -0
- package/es/{index-269b22da.cjs → index-299ee017.cjs} +1 -1
- package/es/{index-cebc7160.cjs → index-33f80550.cjs} +1 -1
- package/es/{index-4f48940d.cjs → index-37b8d3c6.cjs} +1 -1
- package/es/{index-2375023e.cjs → index-5befc414.cjs} +4 -4
- package/es/{index-696b6a94.cjs → index-6b99def3.cjs} +1 -1
- package/es/index-6ca95c8a.cjs +1 -0
- package/es/index-7dce9f59.cjs +1 -0
- package/es/{index-269b8a8c.js → index-8391a3df.js} +37 -37
- package/es/{index-c266c23a.js → index-8f9d0d17.js} +16 -15
- package/es/{index-15b9603e.js → index-95e5d454.js} +3 -3
- package/es/{index-b937ea22.js → index-b0117ba2.js} +2 -2
- package/es/{index-80a7ad32.js → index-bcd895a0.js} +17 -17
- package/es/{index-ec7ad93f.js → index-c2b9bbfd.js} +95 -65
- package/es/{index-4a3f30c5.js → index-c71e37dc.js} +11 -11
- package/es/{index-93a8960e.js → index-de24705f.js} +1 -1
- package/es/index-e8eeea22.cjs +1 -0
- package/es/{index-ee977f79.cjs → index-eb99b188.cjs} +1 -1
- package/es/{el-message-e6c755df.js → index-f30561d3.js} +33 -33
- package/es/{python-c67c8901.cjs → python-27ece6fa.cjs} +2 -2
- package/es/{python-823b276b.js → python-656db04f.js} +30 -28
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-41b4f625.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-631cacae.js → use-form-common-props-cb0ca65c.js} +72 -72
- package/es/{use-form-common-props-344056f9.cjs → use-form-common-props-d3ed62c6.cjs} +1 -1
- package/es/{use-global-config-cf78ebac.cjs → use-global-config-c80f33a4.cjs} +1 -1
- package/es/{use-global-config-5d001623.js → use-global-config-cdaeca54.js} +14 -14
- package/es/{validator-3cad04b2.cjs → validator-07160325.cjs} +1 -1
- package/es/{validator-4160d9e7.js → validator-4ab9774f.js} +1 -1
- package/es/{vnode-06571d5b.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-aabfaa94.cjs → zh-cn-6a0f844c.cjs} +1 -1
- package/es/{zh-cn-5df98ac2.js → zh-cn-8a6390a4.js} +2 -2
- package/lib/aiTools.js +36 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +157 -154
- package/lib/{index-f00d1e1f.js → index-6ac0579e.js} +16077 -15806
- package/lib/{python-0f34e2e6.js → python-0432340a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/index.ts +8 -0
- package/packages/VarietyAiHelper/index.vue +430 -0
- package/packages/index.ts +2 -0
- package/public/aiTools.js +36 -0
- package/src/App.vue +24 -14
- package/src/pages/VarietyAiHelper/index.vue +20 -0
- package/src/pages/VarietySearch/index.vue +75 -51
- package/src/router/routes.ts +5 -0
- package/es/dropdown-89b74bc9.cjs +0 -1
- package/es/el-autocomplete-b9a3054a.cjs +0 -1
- package/es/el-checkbox-b982e2ef.cjs +0 -1
- package/es/el-dialog-ad7309e9.cjs +0 -1
- package/es/el-input-172c49f8.cjs +0 -1
- package/es/el-input-number-c2e71528.cjs +0 -1
- package/es/el-menu-item-7f986598.cjs +0 -1
- package/es/el-message-a86c0efa.cjs +0 -1
- package/es/el-message-box-40ff2af5.cjs +0 -1
- package/es/el-overlay-d7a6e4a9.cjs +0 -1
- package/es/el-popconfirm-737a015b.cjs +0 -1
- package/es/el-popper-7ba87e05.cjs +0 -1
- package/es/el-popper-fdc7c793.js +0 -2094
- package/es/el-segmented-3fd66a0e.cjs +0 -1
- package/es/el-select-12f6deb7.cjs +0 -1
- package/es/el-table-column-516a0ed9.cjs +0 -14
- package/es/el-tag-789f05d3.cjs +0 -1
- package/es/index-8de94a49.cjs +0 -1
- package/es/index-c04f444f.cjs +0 -1
- package/es/raf-8e05a7f4.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./use-form-common-props-d3ed62c6.cjs"),n=require("./base-ef747d02.cjs"),c=require("./index-28e03bad.cjs"),q=require("./index-9780a537.cjs"),y={label:"label",value:"value",disabled:"disabled"},D=n.buildProps({direction:{type:n.definePropType(String),default:"horizontal"},options:{type:n.definePropType(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:n.definePropType(Object),default:()=>y},block:Boolean,size:d.useSizeProp,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...c.useAriaProps(["ariaLabel"])}),F={[c.UPDATE_MODEL_EVENT]:o=>n.isString(o)||n.isNumber(o)||n.isBoolean(o),[c.CHANGE_EVENT]:o=>n.isString(o)||n.isNumber(o)||n.isBoolean(o)},$=e.defineComponent({name:"ElSegmented"}),x=e.defineComponent({...$,props:D,emits:F,setup(o,{emit:v}){const l=o,a=n.useNamespace("segmented"),S=q.useId(),C=d.useFormSize(),I=d.useFormDisabled(),{formItem:u}=d.useFormItem(),{inputId:V,isLabeledByFormItem:h}=d.useFormItemInputId(l,{formItemContext:u}),m=e.ref(null),_=d.useActiveElement(),s=e.reactive({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),N=t=>{const r=p(t);v(c.UPDATE_MODEL_EVENT,r),v(c.CHANGE_EVENT,r)},f=e.computed(()=>({...y,...l.props})),k=t=>t,p=t=>n.isObject(t)?t[f.value.value]:t,z=t=>n.isObject(t)?t[f.value.label]:t,b=t=>!!(I.value||n.isObject(t)&&t[f.value.disabled]),E=t=>l.modelValue===p(t),B=t=>l.options.find(r=>p(r)===t),P=t=>[a.e("item"),a.is("selected",E(t)),a.is("disabled",b(t))],g=()=>{if(!m.value)return;const t=m.value.querySelector(".is-selected"),r=m.value.querySelector(".is-selected input");if(!t||!r){s.width=0,s.height=0,s.translateX=0,s.translateY=0,s.focusVisible=!1;return}s.isInit=!0,l.direction==="vertical"?(s.height=t.offsetHeight,s.translateY=t.offsetTop):(s.width=t.offsetWidth,s.translateX=t.offsetLeft);try{s.focusVisible=r.matches(":focus-visible")}catch{}},T=e.computed(()=>[a.b(),a.m(C.value),a.is("block",l.block)]),w=e.computed(()=>({width:l.direction==="vertical"?"100%":`${s.width}px`,height:l.direction==="vertical"?`${s.height}px`:"100%",transform:l.direction==="vertical"?`translateY(${s.translateY}px)`:`translateX(${s.translateX}px)`,display:s.isInit?"block":"none"})),A=e.computed(()=>[a.e("item-selected"),a.is("disabled",b(B(l.modelValue))),a.is("focus-visible",s.focusVisible)]),L=e.computed(()=>l.name||S.value);return d.useResizeObserver(m,g),e.watch(_,g),e.watch(()=>l.modelValue,()=>{var t;g(),l.validateEvent&&((t=u==null?void 0:u.validate)==null||t.call(u,"change").catch(r=>c.debugWarn()))},{flush:"post"}),(t,r)=>t.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(V),ref_key:"segmentedRef",ref:m,class:e.normalizeClass(e.unref(T)),role:"radiogroup","aria-label":e.unref(h)?void 0:t.ariaLabel||"segmented","aria-labelledby":e.unref(h)?e.unref(u).labelId:void 0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("group"),e.unref(a).m(l.direction)])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(w)),class:e.normalizeClass(e.unref(A))},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,O)=>(e.openBlock(),e.createElementBlock("label",{key:O,class:e.normalizeClass(P(i))},[e.createElementVNode("input",{class:e.normalizeClass(e.unref(a).e("item-input")),type:"radio",name:e.unref(L),disabled:b(i),checked:E(i),onChange:j=>N(i)},null,42,["name","disabled","checked","onChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("item-label"))},[e.renderSlot(t.$slots,"default",{item:k(i)},()=>[e.createTextVNode(e.toDisplayString(z(i)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):e.createCommentVNode("v-if",!0)}});var X=n._export_sfc(x,[["__file","segmented.vue"]]);const Y=n.withInstall(X);exports.ElSegmented=Y;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as w, ref as W, reactive as G, computed as u, watch as V, openBlock as v, createElementBlock as h, unref as l, normalizeClass as r, createElementVNode as m, normalizeStyle as M, Fragment as J, renderList as K, renderSlot as Q, createTextVNode as Z, toDisplayString as ee, createCommentVNode as te } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { b as de,
|
|
4
|
-
import { u as pe, U as z, C as B, d as fe } from "./
|
|
5
|
-
import { u as be } from "./index-
|
|
2
|
+
import { h as se, e as ae, g as le, d as ne, f as oe, j as ie, u as re } from "./use-form-common-props-cb0ca65c.js";
|
|
3
|
+
import { b as de, e as y, c as C, p as k, o as N, u as ce, _ as ue, f as S, w as me } from "./base-29f73b05.js";
|
|
4
|
+
import { u as pe, U as z, C as B, d as fe } from "./index-0f79095c.js";
|
|
5
|
+
import { u as be } from "./index-8391a3df.js";
|
|
6
6
|
const P = {
|
|
7
7
|
label: "label",
|
|
8
8
|
value: "value",
|
|
@@ -73,11 +73,11 @@ const P = {
|
|
|
73
73
|
t.focusVisible = o.matches(":focus-visible");
|
|
74
74
|
} catch {
|
|
75
75
|
}
|
|
76
|
-
},
|
|
76
|
+
}, j = u(() => [
|
|
77
77
|
a.b(),
|
|
78
78
|
a.m(A.value),
|
|
79
79
|
a.is("block", s.block)
|
|
80
|
-
]),
|
|
80
|
+
]), R = u(() => ({
|
|
81
81
|
width: s.direction === "vertical" ? "100%" : `${t.width}px`,
|
|
82
82
|
height: s.direction === "vertical" ? `${t.height}px` : "100%",
|
|
83
83
|
transform: s.direction === "vertical" ? `translateY(${t.translateY}px)` : `translateX(${t.translateX}px)`,
|
|
@@ -97,7 +97,7 @@ const P = {
|
|
|
97
97
|
id: l(T),
|
|
98
98
|
ref_key: "segmentedRef",
|
|
99
99
|
ref: c,
|
|
100
|
-
class: r(l(
|
|
100
|
+
class: r(l(j)),
|
|
101
101
|
role: "radiogroup",
|
|
102
102
|
"aria-label": l(E) ? void 0 : e.ariaLabel || "segmented",
|
|
103
103
|
"aria-labelledby": l(E) ? l(d).labelId : void 0
|
|
@@ -106,7 +106,7 @@ const P = {
|
|
|
106
106
|
class: r([l(a).e("group"), l(a).m(s.direction)])
|
|
107
107
|
}, [
|
|
108
108
|
m("div", {
|
|
109
|
-
style: M(l(
|
|
109
|
+
style: M(l(R)),
|
|
110
110
|
class: r(l(q))
|
|
111
111
|
}, null, 6),
|
|
112
112
|
(v(!0), h(J, null, K(e.options, (i, U) => (v(), h("label", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),Z=require("./el-popper-2d3914e4.cjs"),Be=require("./index-e8eeea22.cjs"),ne=require("./index-6b99def3.cjs"),oe=require("./index-33f80550.cjs"),D=require("./index-bb833443.cjs"),a=require("./base-ef747d02.cjs"),k=require("./index-28e03bad.cjs"),R=require("./castArray-35947698.cjs"),P=require("./index-37b8d3c6.cjs"),Ie=require("./index-9780a537.cjs"),T=require("./use-form-common-props-d3ed62c6.cjs"),Ve=require("./index-7dce9f59.cjs"),St=require("./scroll-b108dabd.cjs"),Ne=require("./debounce-62f5b6e8.cjs"),De=require("./el-tag-6d8e653e.cjs"),Et=require("./vnode-b906ae6d.cjs");var ke=1/0,Ot=17976931348623157e292;function wt(e){if(!e)return e===0?e:0;if(e=Ne.toNumber(e),e===ke||e===-ke){var s=e<0?-1:1;return s*Ot}return e===e?e:0}function Vt(e){var s=wt(e),i=s%1;return s===s?i?s-i:s:0}function kt(e,s,i,f){for(var d=e.length,v=i+(f?1:-1);f?v--:++v<d;)if(s(e[v],v,e))return v;return-1}var Tt=Math.max,Bt=Math.min;function It(e,s,i){var f=e==null?0:e.length;if(!f)return-1;var d=f-1;return i!==void 0&&(d=Vt(i),d=i<0?Tt(f+d,0):Bt(d,f-1)),kt(e,De.baseIteratee(s),d,!0)}const Me=11,Nt=2;function Dt(){const e=t.shallowRef(),s=t.ref(0),i=t.computed(()=>({minWidth:`${Math.max(s.value,Me)}px`})),f=()=>{var d,v;s.value=(v=(d=e.value)==null?void 0:d.getBoundingClientRect().width)!=null?v:0};return T.useResizeObserver(e,f),{calculatorRef:e,calculatorWidth:s,inputStyle:i}}const ze={label:"label",value:"value",disabled:"disabled",options:"options"};function Mt(e){const s=t.computed(()=>({...ze,...e.props}));return{aliasProps:s,getLabel:n=>D.get(n,s.value.label),getValue:n=>D.get(n,s.value.value),getDisabled:n=>D.get(n,s.value.disabled),getOptions:n=>D.get(n,s.value.options)}}const Re=Symbol("ElSelectGroup"),J=Symbol("ElSelect"),ae="ElOption",zt=a.buildProps({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean}),Rt=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");function Pt(e,s){const i=t.inject(J);i||k.throwError(ae,"usage: <el-select><el-option /></el-select/>");const f=t.inject(Re,{disabled:!1}),d=t.computed(()=>g(R.castArray(i.props.modelValue),e.value)),v=t.computed(()=>{var u;if(i.props.multiple){const C=R.castArray((u=i.props.modelValue)!=null?u:[]);return!d.value&&C.length>=i.props.multipleLimit&&i.props.multipleLimit>0}else return!1}),n=t.computed(()=>{var u;return(u=e.label)!=null?u:a.isObject(e.value)?"":e.value}),S=t.computed(()=>e.value||e.label||""),h=t.computed(()=>e.disabled||s.groupDisabled||v.value),y=t.getCurrentInstance(),g=(u=[],C)=>{if(a.isObject(e.value)){const w=i.props.valueKey;return u&&u.some(B=>t.toRaw(D.get(B,w))===D.get(C,w))}else return u&&u.includes(C)},m=()=>{!e.disabled&&!f.disabled&&(i.states.hoveringIndex=i.optionsArray.indexOf(y.proxy))},r=u=>{const C=new RegExp(Rt(u),"i");s.visible=C.test(String(n.value))||e.created};return t.watch(()=>n.value,()=>{!e.created&&!i.props.remote&&i.setSelected()}),t.watch(()=>e.value,(u,C)=>{const{remote:w,valueKey:B}=i.props;if((w?u!==C:!P.isEqual(u,C))&&(i.onOptionDestroy(C,y.proxy),i.onOptionCreate(y.proxy)),!e.created&&!w){if(B&&a.isObject(u)&&a.isObject(C)&&u[B]===C[B])return;i.setSelected()}}),t.watch(()=>f.disabled,()=>{s.groupDisabled=f.disabled},{immediate:!0}),{select:i,currentLabel:n,currentValue:S,itemSelected:d,isDisabled:h,hoverItem:m,updateOption:r}}const $t=t.defineComponent({name:ae,componentName:ae,props:zt,setup(e){const s=a.useNamespace("select"),i=Ie.useId(),f=t.computed(()=>[s.be("dropdown","item"),s.is("disabled",t.unref(S)),s.is("selected",t.unref(n)),s.is("hovering",t.unref(r))]),d=t.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:v,itemSelected:n,isDisabled:S,select:h,hoverItem:y,updateOption:g}=Pt(e,d),{visible:m,hover:r}=t.toRefs(d),u=t.getCurrentInstance().proxy;h.onOptionCreate(u),t.onBeforeUnmount(()=>{const w=u.value;t.nextTick(()=>{const{selected:B}=h.states,b=B.some(p=>p.value===u.value);h.states.cachedOptions.get(w)===u&&!b&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,u)});function C(){S.value||h.handleOptionSelect(u)}return{ns:s,id:i,containerKls:f,currentLabel:v,itemSelected:n,isDisabled:S,select:h,visible:m,hover:r,states:d,hoverItem:y,updateOption:g,selectOptionClick:C}}});function Lt(e,s){return t.withDirectives((t.openBlock(),t.createElementBlock("li",{id:e.id,class:t.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:t.withModifiers(e.selectOptionClick,["stop"])},[t.renderSlot(e.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[t.vShow,e.visible]])}var se=a._export_sfc($t,[["render",Lt],["__file","option.vue"]]);const At=t.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=t.inject(J),s=a.useNamespace("select"),i=t.computed(()=>e.props.popperClass),f=t.computed(()=>e.props.multiple),d=t.computed(()=>e.props.fitInputWidth),v=t.ref("");function n(){var S;const h=(S=e.selectRef)==null?void 0:S.offsetWidth;h?v.value=`${h-Nt}px`:v.value=""}return t.onMounted(()=>{n(),T.useResizeObserver(e.selectRef,n)}),{ns:s,minWidth:v,popperClass:i,isMultiple:f,isFitInputWidth:d}}});function Ft(e,s,i,f,d,v){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:t.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.ns.be("dropdown","header"))},[t.renderSlot(e.$slots,"header")],2)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default"),e.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.ns.be("dropdown","footer"))},[t.renderSlot(e.$slots,"footer")],2)):t.createCommentVNode("v-if",!0)],6)}var Wt=a._export_sfc(At,[["render",Ft],["__file","select-dropdown.vue"]]);const qt=(e,s)=>{const{t:i}=D.useLocale(),f=Ie.useId(),d=a.useNamespace("select"),v=a.useNamespace("input"),n=t.reactive({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),S=t.ref(),h=t.ref(),y=t.ref(),g=t.ref(),m=t.ref(),r=t.ref(),u=t.ref(),C=t.ref(),w=t.ref(),B=t.ref(),b=t.ref(),p=t.ref(!1),E=t.ref(),{form:$,formItem:N}=T.useFormItem(),{inputId:M}=T.useFormItemInputId(e,{formItemContext:N}),{valueOnClear:re,isEmptyValue:L}=P.useEmptyValues(e),{isComposing:ue,handleCompositionStart:Pe,handleCompositionUpdate:$e,handleCompositionEnd:Le}=Ve.useComposition({afterComposition:l=>ge(l)}),W=t.computed(()=>e.disabled||!!($!=null&&$.disabled)),{wrapperRef:ce,isFocused:_,handleBlur:Ae}=Ve.useFocusController(m,{disabled:W,afterFocus(){e.automaticDropdown&&!p.value&&(p.value=!0,n.menuVisibleOnFocus=!0)},beforeBlur(l){var o,c;return((o=y.value)==null?void 0:o.isFocusInsideContent(l))||((c=g.value)==null?void 0:c.isFocusInsideContent(l))},afterBlur(){var l;p.value=!1,n.menuVisibleOnFocus=!1,e.validateEvent&&((l=N==null?void 0:N.validate)==null||l.call(N,"blur").catch(o=>k.debugWarn()))}}),x=t.computed(()=>a.isArray(e.modelValue)?e.modelValue.length>0:!L(e.modelValue)),Fe=t.computed(()=>{var l;return(l=$==null?void 0:$.statusIcon)!=null?l:!1}),We=t.computed(()=>e.clearable&&!W.value&&x.value&&(_.value||n.inputHovering)),de=t.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),qe=t.computed(()=>d.is("reverse",!!(de.value&&p.value))),ee=t.computed(()=>(N==null?void 0:N.validateState)||""),Ke=t.computed(()=>ee.value&&T.ValidateComponentsMap[ee.value]),He=t.computed(()=>e.remote?300:0),je=t.computed(()=>e.remote&&!n.inputValue&&n.options.size===0),Ue=t.computed(()=>e.loading?e.loadingText||i("el.select.loading"):e.filterable&&n.inputValue&&n.options.size>0&&q.value===0?e.noMatchText||i("el.select.noMatch"):n.options.size===0?e.noDataText||i("el.select.noData"):null),q=t.computed(()=>V.value.filter(l=>l.visible).length),V=t.computed(()=>{const l=Array.from(n.options.values()),o=[];return n.optionValues.forEach(c=>{const O=l.findIndex(I=>I.value===c);O>-1&&o.push(l[O])}),o.length>=l.length?o:l}),Ge=t.computed(()=>Array.from(n.cachedOptions.values())),Qe=t.computed(()=>{const l=V.value.filter(o=>!o.created).some(o=>o.currentLabel===n.inputValue);return e.filterable&&e.allowCreate&&n.inputValue!==""&&!l}),pe=()=>{e.filterable&&a.isFunction(e.filterMethod)||e.filterable&&e.remote&&a.isFunction(e.remoteMethod)||V.value.forEach(l=>{var o;(o=l.updateOption)==null||o.call(l,n.inputValue)})},fe=T.useFormSize(),Xe=t.computed(()=>["small"].includes(fe.value)?"small":"default"),ve=t.computed({get(){return p.value&&!je.value},set(l){p.value=l}}),Ye=t.computed(()=>{if(e.multiple&&!a.isUndefined(e.modelValue))return R.castArray(e.modelValue).length===0&&!n.inputValue;const l=a.isArray(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||a.isUndefined(l)?!n.inputValue:!0}),Ze=t.computed(()=>{var l;const o=(l=e.placeholder)!=null?l:i("el.select.placeholder");return e.multiple||!x.value?o:n.selectedLabel}),Je=t.computed(()=>a.isIOS?null:"mouseenter");t.watch(()=>e.modelValue,(l,o)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(n.inputValue="",H("")),j(),!P.isEqual(l,o)&&e.validateEvent&&(N==null||N.validate("change").catch(c=>k.debugWarn()))},{flush:"post",deep:!0}),t.watch(()=>p.value,l=>{l?H(n.inputValue):(n.inputValue="",n.previousQuery=null,n.isBeforeHide=!0),s("visible-change",l)}),t.watch(()=>n.options.entries(),()=>{a.isClient&&(j(),e.defaultFirstOption&&(e.filterable||e.remote)&&q.value&&me())},{flush:"post"}),t.watch([()=>n.hoveringIndex,V],([l])=>{a.isNumber(l)&&l>-1?E.value=V.value[l]||{}:E.value={},V.value.forEach(o=>{o.hover=E.value===o})}),t.watchEffect(()=>{n.isBeforeHide||pe()});const H=l=>{n.previousQuery===l||ue.value||(n.previousQuery=l,e.filterable&&a.isFunction(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&a.isFunction(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&q.value?t.nextTick(me):t.nextTick(_e))},me=()=>{const l=V.value.filter(I=>I.visible&&!I.disabled&&!I.states.groupDisabled),o=l.find(I=>I.created),c=l[0],O=V.value.map(I=>I.value);n.hoveringIndex=Ee(O,o||c)},j=()=>{if(e.multiple)n.selectedLabel="";else{const o=a.isArray(e.modelValue)?e.modelValue[0]:e.modelValue,c=te(o);n.selectedLabel=c.currentLabel,n.selected=[c];return}const l=[];a.isUndefined(e.modelValue)||R.castArray(e.modelValue).forEach(o=>{l.push(te(o))}),n.selected=l},te=l=>{let o;const c=a.isPlainObject(l);for(let F=n.cachedOptions.size-1;F>=0;F--){const z=Ge.value[F];if(c?D.get(z.value,e.valueKey)===D.get(l,e.valueKey):z.value===l){o={index:V.value.filter(A=>!A.created).indexOf(z),value:l,currentLabel:z.currentLabel,get isDisabled(){return z.isDisabled}};break}}if(o)return o;const O=c?l.label:l??"";return{index:-1,value:l,currentLabel:O}},_e=()=>{n.hoveringIndex=V.value.findIndex(l=>n.selected.some(o=>Q(o)===Q(l)))},xe=()=>{n.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},et=()=>{n.collapseItemWidth=B.value.getBoundingClientRect().width},le=()=>{var l,o;(o=(l=y.value)==null?void 0:l.updatePopper)==null||o.call(l)},he=()=>{var l,o;(o=(l=g.value)==null?void 0:l.updatePopper)==null||o.call(l)},be=()=>{n.inputValue.length>0&&!p.value&&(p.value=!0),H(n.inputValue)},ge=l=>{if(n.inputValue=l.target.value,e.remote)ye();else return be()},ye=Ne.debounce(()=>{be()},He.value),K=l=>{P.isEqual(e.modelValue,l)||s(k.CHANGE_EVENT,l)},tt=l=>It(l,o=>{const c=n.cachedOptions.get(o);return c&&!c.disabled&&!c.states.groupDisabled}),lt=l=>{if(e.multiple&&l.code!==k.EVENT_CODE.delete&&l.target.value.length<=0){const o=R.castArray(e.modelValue).slice(),c=tt(o);if(c<0)return;const O=o[c];o.splice(c,1),s(k.UPDATE_MODEL_EVENT,o),K(o),s("remove-tag",O)}},nt=(l,o)=>{const c=n.selected.indexOf(o);if(c>-1&&!W.value){const O=R.castArray(e.modelValue).slice();O.splice(c,1),s(k.UPDATE_MODEL_EVENT,O),K(O),s("remove-tag",o.value)}l.stopPropagation(),G()},Ce=l=>{l.stopPropagation();const o=e.multiple?[]:re.value;if(e.multiple)for(const c of n.selected)c.isDisabled&&o.push(c.value);s(k.UPDATE_MODEL_EVENT,o),K(o),n.hoveringIndex=-1,p.value=!1,s("clear"),G()},Se=l=>{var o;if(e.multiple){const c=R.castArray((o=e.modelValue)!=null?o:[]).slice(),O=Ee(c,l);O>-1?c.splice(O,1):(e.multipleLimit<=0||c.length<e.multipleLimit)&&c.push(l.value),s(k.UPDATE_MODEL_EVENT,c),K(c),l.created&&H(""),e.filterable&&!e.reserveKeyword&&(n.inputValue="")}else!P.isEqual(e.modelValue,l.value)&&s(k.UPDATE_MODEL_EVENT,l.value),K(l.value),p.value=!1;G(),!p.value&&t.nextTick(()=>{U(l)})},Ee=(l,o)=>a.isUndefined(o)?-1:a.isObject(o.value)?l.findIndex(c=>P.isEqual(D.get(c,e.valueKey),Q(o))):l.indexOf(o.value),U=l=>{var o,c,O,I,F;const z=a.isArray(l)?l[0]:l;let Y=null;if(z!=null&&z.value){const A=V.value.filter(Ct=>Ct.value===z.value);A.length>0&&(Y=A[0].$el)}if(y.value&&Y){const A=(I=(O=(c=(o=y.value)==null?void 0:o.popperRef)==null?void 0:c.contentRef)==null?void 0:O.querySelector)==null?void 0:I.call(O,`.${d.be("dropdown","wrap")}`);A&&St.scrollIntoView(A,Y)}(F=b.value)==null||F.handleScroll()},ot=l=>{n.options.set(l.value,l),n.cachedOptions.set(l.value,l)},at=(l,o)=>{n.options.get(l)===o&&n.options.delete(l)},st=t.computed(()=>{var l,o;return(o=(l=y.value)==null?void 0:l.popperRef)==null?void 0:o.contentRef}),it=()=>{n.isBeforeHide=!1,t.nextTick(()=>{var l;(l=b.value)==null||l.update(),U(n.selected)})},G=()=>{var l;(l=m.value)==null||l.focus()},rt=()=>{var l;if(p.value){p.value=!1,t.nextTick(()=>{var o;return(o=m.value)==null?void 0:o.blur()});return}(l=m.value)==null||l.blur()},ut=l=>{Ce(l)},ct=l=>{if(p.value=!1,_.value){const o=new FocusEvent("blur",l);t.nextTick(()=>Ae(o))}},dt=()=>{n.inputValue.length>0?n.inputValue="":p.value=!1},Oe=()=>{W.value||(a.isIOS&&(n.inputHovering=!0),n.menuVisibleOnFocus?n.menuVisibleOnFocus=!1:p.value=!p.value)},pt=()=>{if(!p.value)Oe();else{const l=V.value[n.hoveringIndex];l&&!l.isDisabled&&Se(l)}},Q=l=>a.isObject(l.value)?D.get(l.value,e.valueKey):l.value,ft=t.computed(()=>V.value.filter(l=>l.visible).every(l=>l.isDisabled)),vt=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(0,e.maxCollapseTags):n.selected:[]),mt=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(e.maxCollapseTags):[]:[]),we=l=>{if(!p.value){p.value=!0;return}if(!(n.options.size===0||q.value===0||ue.value)&&!ft.value){l==="next"?(n.hoveringIndex++,n.hoveringIndex===n.options.size&&(n.hoveringIndex=0)):l==="prev"&&(n.hoveringIndex--,n.hoveringIndex<0&&(n.hoveringIndex=n.options.size-1));const o=V.value[n.hoveringIndex];(o.isDisabled||!o.visible)&&we(l),t.nextTick(()=>U(E.value))}},ht=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},bt=t.computed(()=>{const l=ht(),o=e.filterable?l+Me:0;return{maxWidth:`${B.value&&e.maxCollapseTags===1?n.selectionWidth-n.collapseItemWidth-l-o:n.selectionWidth-o}px`}}),gt=t.computed(()=>({maxWidth:`${n.selectionWidth}px`})),yt=l=>{s("popup-scroll",l)};T.useResizeObserver(h,xe),T.useResizeObserver(ce,le),T.useResizeObserver(w,he),T.useResizeObserver(B,et);let X;return t.watch(()=>ve.value,l=>{l?X=T.useResizeObserver(C,le).stop:(X==null||X(),X=void 0)}),t.onMounted(()=>{j()}),{inputId:M,contentId:f,nsSelect:d,nsInput:v,states:n,isFocused:_,expanded:p,optionsArray:V,hoverOption:E,selectSize:fe,filteredOptionsCount:q,updateTooltip:le,updateTagTooltip:he,debouncedOnInputChange:ye,onInput:ge,deletePrevTag:lt,deleteTag:nt,deleteSelected:Ce,handleOptionSelect:Se,scrollToOption:U,hasModelValue:x,shouldShowPlaceholder:Ye,currentPlaceholder:Ze,mouseEnterEventName:Je,needStatusIcon:Fe,showClearBtn:We,iconComponent:de,iconReverse:qe,validateState:ee,validateIcon:Ke,showNewOption:Qe,updateOptions:pe,collapseTagSize:Xe,setSelected:j,selectDisabled:W,emptyText:Ue,handleCompositionStart:Pe,handleCompositionUpdate:$e,handleCompositionEnd:Le,onOptionCreate:ot,onOptionDestroy:at,handleMenuEnter:it,focus:G,blur:rt,handleClearClick:ut,handleClickOutside:ct,handleEsc:dt,toggleMenu:Oe,selectOption:pt,getValueKey:Q,navigateOptions:we,dropdownMenuVisible:ve,showTagList:vt,collapseTagList:mt,popupScroll:yt,getOption:te,tagStyle:bt,collapseTagStyle:gt,popperRef:st,inputRef:m,tooltipRef:y,tagTooltipRef:g,prefixRef:r,suffixRef:u,selectRef:S,wrapperRef:ce,selectionRef:h,scrollbarRef:b,menuRef:C,tagMenuRef:w,collapseItemRef:B}};var Kt=t.defineComponent({name:"ElOptions",setup(e,{slots:s}){const i=t.inject(J);let f=[];return()=>{var d,v;const n=(d=s.default)==null?void 0:d.call(s),S=[];function h(y){a.isArray(y)&&y.forEach(g=>{var m,r,u,C;const w=(m=(g==null?void 0:g.type)||{})==null?void 0:m.name;w==="ElOptionGroup"?h(!a.isString(g.children)&&!a.isArray(g.children)&&a.isFunction((r=g.children)==null?void 0:r.default)?(u=g.children)==null?void 0:u.default():g.children):w==="ElOption"?S.push((C=g.props)==null?void 0:C.value):a.isArray(g.children)&&h(g.children)})}return n.length&&h((v=n[0])==null?void 0:v.children),P.isEqual(S,f)||(f=S,i&&(i.states.optionValues=S)),n}}});const Ht=a.buildProps({name:String,id:String,modelValue:{type:a.definePropType([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:T.useSizeProp,effect:{type:a.definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:a.definePropType([String,Object])},popperOptions:{type:a.definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:a.definePropType(Function)},filterMethod:{type:a.definePropType(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Z.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:T.iconPropType,default:oe.circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:T.iconPropType,default:oe.arrow_down_default},tagType:{...ne.tagProps.type,default:"info"},tagEffect:{...ne.tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:a.definePropType(String),values:Z.Ee,default:"bottom-start"},fallbackPlacements:{type:a.definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Z.useTooltipContentProps.appendTo,options:{type:a.definePropType(Array)},props:{type:a.definePropType(Object),default:()=>ze},...P.useEmptyValuesProps,...k.useAriaProps(["ariaLabel"])});k.UPDATE_MODEL_EVENT+"",k.CHANGE_EVENT+"",Be.scrollbarEmits.scroll;const jt=t.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const s=a.useNamespace("select"),i=t.ref(),f=t.getCurrentInstance(),d=t.ref([]);t.provide(Re,t.reactive({...t.toRefs(e)}));const v=t.computed(()=>d.value.some(y=>y.visible===!0)),n=y=>{var g;return y.type.name==="ElOption"&&!!((g=y.component)!=null&&g.proxy)},S=y=>{const g=R.castArray(y),m=[];return g.forEach(r=>{var u;t.isVNode(r)&&(n(r)?m.push(r.component.proxy):a.isArray(r.children)&&r.children.length?m.push(...S(r.children)):(u=r.component)!=null&&u.subTree&&m.push(...S(r.component.subTree)))}),m},h=()=>{d.value=S(f.subTree)};return t.onMounted(()=>{h()}),T.useMutationObserver(i,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:i,visible:v,ns:s}}});function Ut(e,s,i,f,d,v){return t.withDirectives((t.openBlock(),t.createElementBlock("ul",{ref:"groupRef",class:t.normalizeClass(e.ns.be("group","wrap"))},[t.createElementVNode("li",{class:t.normalizeClass(e.ns.be("group","title"))},t.toDisplayString(e.label),3),t.createElementVNode("li",null,[t.createElementVNode("ul",{class:t.normalizeClass(e.ns.b("group"))},[t.renderSlot(e.$slots,"default")],2)])],2)),[[t.vShow,e.visible]])}var ie=a._export_sfc(jt,[["render",Ut],["__file","option-group.vue"]]);const Te="ElSelect",Gt=t.defineComponent({name:Te,componentName:Te,components:{ElSelectMenu:Wt,ElOption:se,ElOptions:Kt,ElOptionGroup:ie,ElTag:ne.ElTag,ElScrollbar:Be.ElScrollbar,ElTooltip:Z.ElTooltip,ElIcon:oe.ElIcon},directives:{ClickOutside:De.ClickOutside},props:Ht,emits:[k.UPDATE_MODEL_EVENT,k.CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:s,slots:i}){const f=t.getCurrentInstance();f.appContext.config.warnHandler=(...b)=>{!b[0]||b[0].includes('Slot "default" invoked outside of the render function')||console.warn(...b)};const d=t.computed(()=>{const{modelValue:b,multiple:p}=e,E=p?[]:void 0;return a.isArray(b)?p?b:E:p?E:b}),v=t.reactive({...t.toRefs(e),modelValue:d}),n=qt(v,s),{calculatorRef:S,inputStyle:h}=Dt(),{getLabel:y,getValue:g,getOptions:m,getDisabled:r}=Mt(e),u=b=>({label:y(b),value:g(b),disabled:r(b)}),C=b=>b.reduce((p,E)=>(p.push(E),E.children&&E.children.length>0&&p.push(...C(E.children)),p),[]),w=b=>{Et.flattedChildren(b||[]).forEach(E=>{var $;if(a.isObject(E)&&(E.type.name==="ElOption"||E.type.name==="ElTree")){const N=E.type.name;if(N==="ElTree"){const M=(($=E.props)==null?void 0:$.data)||[];C(M).forEach(L=>{L.currentLabel=L.label||(a.isObject(L.value)?"":L.value),n.onOptionCreate(L)})}else if(N==="ElOption"){const M={...E.props};M.currentLabel=M.label||(a.isObject(M.value)?"":M.value),n.onOptionCreate(M)}}})};t.watch(()=>{var b;return(b=i.default)==null?void 0:b.call(i)},b=>{e.persistent||w(b)},{immediate:!0}),t.provide(J,t.reactive({props:v,states:n.states,selectRef:n.selectRef,optionsArray:n.optionsArray,setSelected:n.setSelected,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy}));const B=t.computed(()=>e.multiple?n.states.selected.map(b=>b.currentLabel):n.states.selectedLabel);return t.onBeforeUnmount(()=>{f.appContext.config.warnHandler=void 0}),{...n,modelValue:d,selectedLabel:B,calculatorRef:S,inputStyle:h,getLabel:y,getValue:g,getOptions:m,getDisabled:r,getOptionProps:u}}});function Qt(e,s){const i=t.resolveComponent("el-tag"),f=t.resolveComponent("el-tooltip"),d=t.resolveComponent("el-icon"),v=t.resolveComponent("el-option"),n=t.resolveComponent("el-option-group"),S=t.resolveComponent("el-options"),h=t.resolveComponent("el-scrollbar"),y=t.resolveComponent("el-select-menu"),g=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"selectRef",class:t.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[t.toHandlerKey(e.mouseEnterEventName)]:m=>e.states.inputHovering=!0,onMouseleave:m=>e.states.inputHovering=!1},[t.createVNode(f,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:m=>e.states.isBeforeHide=!1},{default:t.withCtx(()=>{var m;return[t.createElementVNode("div",{ref:"wrapperRef",class:t.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"prefixRef",class:t.normalizeClass(e.nsSelect.e("prefix"))},[t.renderSlot(e.$slots,"prefix")],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref:"selectionRef",class:t.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?t.renderSlot(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.showTagList,r=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(r),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{closable:!e.selectDisabled&&!r.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.tagStyle),onClose:u=>e.deleteTag(u,r)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:r.index,label:r.currentLabel,value:r.value},()=>[t.createTextVNode(t.toDisplayString(r.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(t.openBlock(),t.createBlock(f,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,"popper-style":e.popperStyle,teleported:e.teleported},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"collapseItemRef",class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.collapseTagStyle)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))}," + "+t.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:t.withCtx(()=>[t.createElementVNode("div",{ref:"tagMenuRef",class:t.normalizeClass(e.nsSelect.e("selection"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.collapseTagList,r=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(r),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{class:"in-tooltip",closable:!e.selectDisabled&&!r.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:u=>e.deleteTag(u,r)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:r.index,label:r.currentLabel,value:r.value},()=>[t.createTextVNode(t.toDisplayString(r.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","popper-style","teleported"])):t.createCommentVNode("v-if",!0)]):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[t.withDirectives(t.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":r=>e.states.inputValue=r,type:"text",name:e.name,class:t.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:t.normalizeStyle(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[t.withKeys(t.withModifiers(r=>e.navigateOptions("next"),["stop","prevent"]),["down"]),t.withKeys(t.withModifiers(r=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),t.withKeys(t.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),t.withKeys(t.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),t.withKeys(t.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:t.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[t.vModelText,e.states.inputValue]]),e.filterable?(t.openBlock(),t.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:t.normalizeClass(e.nsSelect.e("input-calculator")),textContent:t.toDisplayString(e.states.inputValue)},null,10,["textContent"])):t.createCommentVNode("v-if",!0)],2),e.shouldShowPlaceholder?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?t.renderSlot(e.$slots,"label",{key:0,index:e.getOption(e.modelValue).index,label:e.currentPlaceholder,value:e.modelValue},()=>[t.createElementVNode("span",null,t.toDisplayString(e.currentPlaceholder),1)]):(t.openBlock(),t.createElementBlock("span",{key:1},t.toDisplayString(e.currentPlaceholder),1))],2)):t.createCommentVNode("v-if",!0)],2),t.createElementVNode("div",{ref:"suffixRef",class:t.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClearBtn?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),e.showClearBtn&&e.clearIcon?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):t.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(t.openBlock(),t.createBlock(d,{key:2,class:t.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:t.withCtx(()=>[t.createVNode(y,{ref:"menuRef"},{default:t.withCtx(()=>[e.$slots.header?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:t.withModifiers(()=>{},["stop"])},[t.renderSlot(e.$slots,"header")],10,["onClick"])):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode(h,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:t.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:t.withCtx(()=>[e.showNewOption?(t.openBlock(),t.createBlock(v,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):t.createCommentVNode("v-if",!0),t.createVNode(S,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(m,r)=>{var u;return t.openBlock(),t.createElementBlock(t.Fragment,{key:r},[(u=e.getOptions(m))!=null&&u.length?(t.openBlock(),t.createBlock(n,{key:0,label:e.getLabel(m),disabled:e.getDisabled(m)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getOptions(m),C=>(t.openBlock(),t.createBlock(v,t.mergeProps({key:e.getValue(C)},e.getOptionProps(C)),null,16))),128))]),_:2},1032,["label","disabled"])):(t.openBlock(),t.createBlock(v,t.normalizeProps(t.mergeProps({key:1},e.getOptionProps(m))),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[t.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.nsSelect.be("dropdown","loading"))},[t.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.nsSelect.be("dropdown","empty"))},[t.renderSlot(e.$slots,"empty",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.emptyText),1)])],2)):t.createCommentVNode("v-if",!0),e.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:t.withModifiers(()=>{},["stop"])},[t.renderSlot(e.$slots,"footer")],10,["onClick"])):t.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[g,e.handleClickOutside,e.popperRef]])}var Xt=a._export_sfc(Gt,[["render",Qt],["__file","select.vue"]]);const Yt=a.withInstall(Xt,{Option:se,OptionGroup:ie}),Zt=a.withNoopInstall(se);a.withNoopInstall(ie);exports.ElOption=Zt;exports.ElSelect=Yt;
|
|
@@ -1,34 +1,35 @@
|
|
|
1
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 {
|
|
3
|
-
import { s as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { g as z, u as
|
|
7
|
-
import { b as mt,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { u as st, b as ml, E as bl } from "./el-popper-c9b3d3cf.js";
|
|
3
|
+
import { s as hl, E as gl } from "./index-1d9b50de.js";
|
|
4
|
+
import { t as it, E as yl } from "./index-95e5d454.js";
|
|
5
|
+
import { z as Sl, f as Ol, E as Cl } from "./index-c2b9bbfd.js";
|
|
6
|
+
import { g as z, u as wl } from "./index-de24705f.js";
|
|
7
|
+
import { b as mt, f as U, u as ce, _ as Ve, j, i as Oe, C as rt, s as El, p as Vl, x as re, D as Il, c as Tl, e as W, w as kl, l as bt } from "./base-29f73b05.js";
|
|
8
|
+
import { a as Dl, d as ut, E as Ml, U as x, C as Fe, u as Rl } from "./index-0f79095c.js";
|
|
9
|
+
import { c as X } from "./castArray-609a313e.js";
|
|
10
|
+
import { i as le, u as $l, m as Ll } from "./index-0ee486ad.js";
|
|
11
|
+
import { u as ht } from "./index-8391a3df.js";
|
|
12
|
+
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-cb0ca65c.js";
|
|
13
|
+
import { u as Al, a as Kl } from "./index-c71e37dc.js";
|
|
14
|
+
import { s as Hl } from "./scroll-6799bafc.js";
|
|
15
|
+
import { t as Gl, d as Ul } from "./debounce-a09ce9a3.js";
|
|
16
|
+
import { b as jl, C as ql } from "./el-tag-17cd04a1.js";
|
|
17
|
+
import { f as Ql } from "./vnode-a83e6de8.js";
|
|
18
|
+
var ct = 1 / 0, Xl = 17976931348623157e292;
|
|
19
|
+
function Yl(e) {
|
|
19
20
|
if (!e)
|
|
20
21
|
return e === 0 ? e : 0;
|
|
21
22
|
if (e = Gl(e), e === ct || e === -ct) {
|
|
22
23
|
var o = e < 0 ? -1 : 1;
|
|
23
|
-
return o *
|
|
24
|
+
return o * Xl;
|
|
24
25
|
}
|
|
25
26
|
return e === e ? e : 0;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
var o =
|
|
28
|
+
function Zl(e) {
|
|
29
|
+
var o = Yl(e), a = o % 1;
|
|
29
30
|
return o === o ? a ? o - a : o : 0;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function Jl(e, o, a, f) {
|
|
32
33
|
for (var d = e.length, p = a + (f ? 1 : -1); f ? p-- : ++p < d; )
|
|
33
34
|
if (o(e[p], p, e))
|
|
34
35
|
return p;
|
|
@@ -40,7 +41,7 @@ function en(e, o, a) {
|
|
|
40
41
|
if (!f)
|
|
41
42
|
return -1;
|
|
42
43
|
var d = f - 1;
|
|
43
|
-
return a !== void 0 && (d =
|
|
44
|
+
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
|
}
|
|
45
46
|
const gt = 11, tn = 2;
|
|
46
47
|
function ln() {
|
|
@@ -85,11 +86,11 @@ const St = Symbol("ElSelectGroup"), Ie = Symbol("ElSelect"), Ne = "ElOption", on
|
|
|
85
86
|
}), an = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
86
87
|
function sn(e, o) {
|
|
87
88
|
const a = we(Ie);
|
|
88
|
-
a ||
|
|
89
|
-
const f = we(St, { disabled: !1 }), d = u(() => y(
|
|
89
|
+
a || Dl(Ne, "usage: <el-select><el-option /></el-select/>");
|
|
90
|
+
const f = we(St, { disabled: !1 }), d = u(() => y(X(a.props.modelValue), e.value)), p = u(() => {
|
|
90
91
|
var i;
|
|
91
92
|
if (a.props.multiple) {
|
|
92
|
-
const O =
|
|
93
|
+
const O = X((i = a.props.modelValue) != null ? i : []);
|
|
93
94
|
return !d.value && O.length >= a.props.multipleLimit && a.props.multipleLimit > 0;
|
|
94
95
|
} else
|
|
95
96
|
return !1;
|
|
@@ -240,7 +241,7 @@ function cn(e, o, a, f, d, p) {
|
|
|
240
241
|
}
|
|
241
242
|
var pn = /* @__PURE__ */ Ve(dn, [["render", cn], ["__file", "select-dropdown.vue"]]);
|
|
242
243
|
const fn = (e, o) => {
|
|
243
|
-
const { t: a } =
|
|
244
|
+
const { t: a } = wl(), f = ht(), d = ce("select"), p = ce("input"), l = de({
|
|
244
245
|
inputValue: "",
|
|
245
246
|
options: /* @__PURE__ */ new Map(),
|
|
246
247
|
cachedOptions: /* @__PURE__ */ new Map(),
|
|
@@ -254,16 +255,16 @@ const fn = (e, o) => {
|
|
|
254
255
|
inputHovering: !1,
|
|
255
256
|
menuVisibleOnFocus: !1,
|
|
256
257
|
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:
|
|
258
|
+
}), 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
259
|
formItemContext: B
|
|
259
|
-
}), { valueOnClear: Ke, isEmptyValue:
|
|
260
|
+
}), { valueOnClear: Ke, isEmptyValue: Z } = $l(e), {
|
|
260
261
|
isComposing: He,
|
|
261
262
|
handleCompositionStart: Ot,
|
|
262
263
|
handleCompositionUpdate: Ct,
|
|
263
264
|
handleCompositionEnd: wt
|
|
264
265
|
} = Al({
|
|
265
|
-
afterComposition: (t) =>
|
|
266
|
-
}), ne = u(() => e.disabled || !!(
|
|
266
|
+
afterComposition: (t) => Je(t)
|
|
267
|
+
}), ne = u(() => e.disabled || !!(Y != null && Y.disabled)), { wrapperRef: Ge, isFocused: Te, handleBlur: Et } = Kl(m, {
|
|
267
268
|
disabled: ne,
|
|
268
269
|
afterFocus() {
|
|
269
270
|
e.automaticDropdown && !c.value && (c.value = !0, l.menuVisibleOnFocus = !0);
|
|
@@ -274,11 +275,11 @@ const fn = (e, o) => {
|
|
|
274
275
|
},
|
|
275
276
|
afterBlur() {
|
|
276
277
|
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) =>
|
|
278
|
+
c.value = !1, l.menuVisibleOnFocus = !1, e.validateEvent && ((t = B == null ? void 0 : B.validate) == null || t.call(B, "blur").catch((n) => ut()));
|
|
278
279
|
}
|
|
279
|
-
}), ke = u(() => j(e.modelValue) ? e.modelValue.length > 0 : !
|
|
280
|
+
}), ke = u(() => j(e.modelValue) ? e.modelValue.length > 0 : !Z(e.modelValue)), Vt = u(() => {
|
|
280
281
|
var t;
|
|
281
|
-
return (t =
|
|
282
|
+
return (t = Y == null ? void 0 : Y.statusIcon) != null ? t : !1;
|
|
282
283
|
}), 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
284
|
const t = Array.from(l.options.values()), n = [];
|
|
284
285
|
return l.optionValues.forEach((r) => {
|
|
@@ -302,35 +303,35 @@ const fn = (e, o) => {
|
|
|
302
303
|
}
|
|
303
304
|
}), Bt = u(() => {
|
|
304
305
|
if (e.multiple && !Oe(e.modelValue))
|
|
305
|
-
return
|
|
306
|
+
return X(e.modelValue).length === 0 && !l.inputValue;
|
|
306
307
|
const t = j(e.modelValue) ? e.modelValue[0] : e.modelValue;
|
|
307
308
|
return e.filterable || Oe(t) ? !l.inputValue : !0;
|
|
308
309
|
}), Pt = u(() => {
|
|
309
310
|
var t;
|
|
310
311
|
const n = (t = e.placeholder) != null ? t : a("el.select.placeholder");
|
|
311
312
|
return e.multiple || !ke.value ? n : l.selectedLabel;
|
|
312
|
-
}), Wt = u(() =>
|
|
313
|
+
}), Wt = u(() => rt ? null : "mouseenter");
|
|
313
314
|
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) =>
|
|
315
|
+
e.multiple && e.filterable && !e.reserveKeyword && (l.inputValue = "", fe("")), ve(), !le(t, n) && e.validateEvent && (B == null || B.validate("change").catch((r) => ut()));
|
|
315
316
|
}, {
|
|
316
317
|
flush: "post",
|
|
317
318
|
deep: !0
|
|
318
319
|
}), G(() => c.value, (t) => {
|
|
319
320
|
t ? fe(l.inputValue) : (l.inputValue = "", l.previousQuery = null, l.isBeforeHide = !0), o("visible-change", t);
|
|
320
321
|
}), G(() => l.options.entries(), () => {
|
|
321
|
-
|
|
322
|
+
El && (ve(), e.defaultFirstOption && (e.filterable || e.remote) && oe.value && Xe());
|
|
322
323
|
}, {
|
|
323
324
|
flush: "post"
|
|
324
325
|
}), G([() => l.hoveringIndex, D], ([t]) => {
|
|
325
|
-
|
|
326
|
+
Vl(t) && t > -1 ? E.value = D.value[t] || {} : E.value = {}, D.value.forEach((n) => {
|
|
326
327
|
n.hover = E.value === n;
|
|
327
328
|
});
|
|
328
329
|
}), ul(() => {
|
|
329
330
|
l.isBeforeHide || je();
|
|
330
331
|
});
|
|
331
332
|
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(
|
|
333
|
-
},
|
|
333
|
+
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));
|
|
334
|
+
}, Xe = () => {
|
|
334
335
|
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
336
|
l.hoveringIndex = tt(V, n || r);
|
|
336
337
|
}, ve = () => {
|
|
@@ -342,17 +343,17 @@ const fn = (e, o) => {
|
|
|
342
343
|
return;
|
|
343
344
|
}
|
|
344
345
|
const t = [];
|
|
345
|
-
Oe(e.modelValue) ||
|
|
346
|
+
Oe(e.modelValue) || X(e.modelValue).forEach((n) => {
|
|
346
347
|
t.push(Me(n));
|
|
347
348
|
}), l.selected = t;
|
|
348
349
|
}, Me = (t) => {
|
|
349
350
|
let n;
|
|
350
|
-
const r =
|
|
351
|
+
const r = Il(t);
|
|
351
352
|
for (let te = l.cachedOptions.size - 1; te >= 0; te--) {
|
|
352
353
|
const K = $t.value[te];
|
|
353
354
|
if (r ? z(K.value, e.valueKey) === z(t, e.valueKey) : K.value === t) {
|
|
354
355
|
n = {
|
|
355
|
-
index: D.value.filter((
|
|
356
|
+
index: D.value.filter((J) => !J.created).indexOf(K),
|
|
356
357
|
value: t,
|
|
357
358
|
currentLabel: K.currentLabel,
|
|
358
359
|
get isDisabled() {
|
|
@@ -379,26 +380,26 @@ const fn = (e, o) => {
|
|
|
379
380
|
}, Re = () => {
|
|
380
381
|
var t, n;
|
|
381
382
|
(n = (t = S.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
382
|
-
},
|
|
383
|
+
}, Ye = () => {
|
|
383
384
|
var t, n;
|
|
384
385
|
(n = (t = y.value) == null ? void 0 : t.updatePopper) == null || n.call(t);
|
|
385
|
-
},
|
|
386
|
+
}, Ze = () => {
|
|
386
387
|
l.inputValue.length > 0 && !c.value && (c.value = !0), fe(l.inputValue);
|
|
387
|
-
},
|
|
388
|
+
}, Je = (t) => {
|
|
388
389
|
if (l.inputValue = t.target.value, e.remote)
|
|
389
390
|
_e();
|
|
390
391
|
else
|
|
391
|
-
return
|
|
392
|
+
return Ze();
|
|
392
393
|
}, _e = Ul(() => {
|
|
393
|
-
|
|
394
|
+
Ze();
|
|
394
395
|
}, Dt.value), ae = (t) => {
|
|
395
396
|
le(e.modelValue, t) || o(Fe, t);
|
|
396
397
|
}, Kt = (t) => en(t, (n) => {
|
|
397
398
|
const r = l.cachedOptions.get(n);
|
|
398
399
|
return r && !r.disabled && !r.states.groupDisabled;
|
|
399
400
|
}), Ht = (t) => {
|
|
400
|
-
if (e.multiple && t.code !==
|
|
401
|
-
const n =
|
|
401
|
+
if (e.multiple && t.code !== Ml.delete && t.target.value.length <= 0) {
|
|
402
|
+
const n = X(e.modelValue).slice(), r = Kt(n);
|
|
402
403
|
if (r < 0)
|
|
403
404
|
return;
|
|
404
405
|
const V = n[r];
|
|
@@ -407,7 +408,7 @@ const fn = (e, o) => {
|
|
|
407
408
|
}, Gt = (t, n) => {
|
|
408
409
|
const r = l.selected.indexOf(n);
|
|
409
410
|
if (r > -1 && !ne.value) {
|
|
410
|
-
const V =
|
|
411
|
+
const V = X(e.modelValue).slice();
|
|
411
412
|
V.splice(r, 1), o(x, V), ae(V), o("remove-tag", n.value);
|
|
412
413
|
}
|
|
413
414
|
t.stopPropagation(), be();
|
|
@@ -421,7 +422,7 @@ const fn = (e, o) => {
|
|
|
421
422
|
}, et = (t) => {
|
|
422
423
|
var n;
|
|
423
424
|
if (e.multiple) {
|
|
424
|
-
const r =
|
|
425
|
+
const r = X((n = e.modelValue) != null ? n : []).slice(), V = tt(r, t);
|
|
425
426
|
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
427
|
} else
|
|
427
428
|
!le(e.modelValue, t.value) && o(x, t.value), ae(t.value), c.value = !1;
|
|
@@ -433,12 +434,12 @@ const fn = (e, o) => {
|
|
|
433
434
|
const K = j(t) ? t[0] : t;
|
|
434
435
|
let ye = null;
|
|
435
436
|
if (K != null && K.value) {
|
|
436
|
-
const
|
|
437
|
-
|
|
437
|
+
const J = D.value.filter((sl) => sl.value === K.value);
|
|
438
|
+
J.length > 0 && (ye = J[0].$el);
|
|
438
439
|
}
|
|
439
440
|
if (S.value && ye) {
|
|
440
|
-
const
|
|
441
|
-
|
|
441
|
+
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")}`);
|
|
442
|
+
J && Hl(J, ye);
|
|
442
443
|
}
|
|
443
444
|
(te = g.value) == null || te.handleScroll();
|
|
444
445
|
}, Ut = (t) => {
|
|
@@ -456,7 +457,7 @@ const fn = (e, o) => {
|
|
|
456
457
|
}, be = () => {
|
|
457
458
|
var t;
|
|
458
459
|
(t = m.value) == null || t.focus();
|
|
459
|
-
},
|
|
460
|
+
}, Xt = () => {
|
|
460
461
|
var t;
|
|
461
462
|
if (c.value) {
|
|
462
463
|
c.value = !1, Q(() => {
|
|
@@ -466,17 +467,17 @@ const fn = (e, o) => {
|
|
|
466
467
|
return;
|
|
467
468
|
}
|
|
468
469
|
(t = m.value) == null || t.blur();
|
|
469
|
-
}, Xt = (t) => {
|
|
470
|
-
xe(t);
|
|
471
470
|
}, Yt = (t) => {
|
|
471
|
+
xe(t);
|
|
472
|
+
}, Zt = (t) => {
|
|
472
473
|
if (c.value = !1, Te.value) {
|
|
473
474
|
const n = new FocusEvent("blur", t);
|
|
474
475
|
Q(() => Et(n));
|
|
475
476
|
}
|
|
476
|
-
},
|
|
477
|
+
}, Jt = () => {
|
|
477
478
|
l.inputValue.length > 0 ? l.inputValue = "" : c.value = !1;
|
|
478
479
|
}, lt = () => {
|
|
479
|
-
ne.value || (
|
|
480
|
+
ne.value || (rt && (l.inputHovering = !0), l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : c.value = !c.value);
|
|
480
481
|
}, _t = () => {
|
|
481
482
|
if (!c.value)
|
|
482
483
|
lt();
|
|
@@ -505,7 +506,7 @@ const fn = (e, o) => {
|
|
|
505
506
|
}), ol = u(() => ({ maxWidth: `${l.selectionWidth}px` })), al = (t) => {
|
|
506
507
|
o("popup-scroll", t);
|
|
507
508
|
};
|
|
508
|
-
ee(h, zt), ee(Ge, Re), ee(I,
|
|
509
|
+
ee(h, zt), ee(Ge, Re), ee(I, Ye), ee(R, At);
|
|
509
510
|
let ge;
|
|
510
511
|
return G(() => Qe.value, (t) => {
|
|
511
512
|
t ? ge = ee(O, Re).stop : (ge == null || ge(), ge = void 0);
|
|
@@ -524,9 +525,9 @@ const fn = (e, o) => {
|
|
|
524
525
|
selectSize: qe,
|
|
525
526
|
filteredOptionsCount: oe,
|
|
526
527
|
updateTooltip: Re,
|
|
527
|
-
updateTagTooltip:
|
|
528
|
+
updateTagTooltip: Ye,
|
|
528
529
|
debouncedOnInputChange: _e,
|
|
529
|
-
onInput:
|
|
530
|
+
onInput: Je,
|
|
530
531
|
deletePrevTag: Ht,
|
|
531
532
|
deleteTag: Gt,
|
|
532
533
|
deleteSelected: xe,
|
|
@@ -555,10 +556,10 @@ const fn = (e, o) => {
|
|
|
555
556
|
onOptionDestroy: jt,
|
|
556
557
|
handleMenuEnter: Qt,
|
|
557
558
|
focus: be,
|
|
558
|
-
blur:
|
|
559
|
-
handleClearClick:
|
|
560
|
-
handleClickOutside:
|
|
561
|
-
handleEsc:
|
|
559
|
+
blur: Xt,
|
|
560
|
+
handleClearClick: Yt,
|
|
561
|
+
handleClickOutside: Zt,
|
|
562
|
+
handleEsc: Jt,
|
|
562
563
|
toggleMenu: lt,
|
|
563
564
|
selectOption: _t,
|
|
564
565
|
getValueKey: he,
|
|
@@ -597,7 +598,7 @@ var vn = pe({
|
|
|
597
598
|
j(S) && S.forEach((y) => {
|
|
598
599
|
var m, s, i, O;
|
|
599
600
|
const I = (m = (y == null ? void 0 : y.type) || {}) == null ? void 0 : m.name;
|
|
600
|
-
I === "ElOptionGroup" ? h(!
|
|
601
|
+
I === "ElOptionGroup" ? h(!Tl(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
|
});
|
|
602
603
|
}
|
|
603
604
|
return l.length && h((p = l[0]) == null ? void 0 : p.children), le(C, f) || (f = C, a && (a.states.optionValues = C)), l;
|
|
@@ -676,22 +677,22 @@ const mn = mt({
|
|
|
676
677
|
type: Number,
|
|
677
678
|
default: 1
|
|
678
679
|
},
|
|
679
|
-
teleported:
|
|
680
|
+
teleported: st.teleported,
|
|
680
681
|
persistent: {
|
|
681
682
|
type: Boolean,
|
|
682
683
|
default: !0
|
|
683
684
|
},
|
|
684
685
|
clearIcon: {
|
|
685
686
|
type: dt,
|
|
686
|
-
default:
|
|
687
|
+
default: Sl
|
|
687
688
|
},
|
|
688
689
|
fitInputWidth: Boolean,
|
|
689
690
|
suffixIcon: {
|
|
690
691
|
type: dt,
|
|
691
|
-
default:
|
|
692
|
+
default: Ol
|
|
692
693
|
},
|
|
693
|
-
tagType: { ...
|
|
694
|
-
tagEffect: { ...
|
|
694
|
+
tagType: { ...it.type, default: "info" },
|
|
695
|
+
tagEffect: { ...it.effect, default: "light" },
|
|
695
696
|
validateEvent: {
|
|
696
697
|
type: Boolean,
|
|
697
698
|
default: !0
|
|
@@ -707,7 +708,7 @@ const mn = mt({
|
|
|
707
708
|
},
|
|
708
709
|
placement: {
|
|
709
710
|
type: W(String),
|
|
710
|
-
values:
|
|
711
|
+
values: ml,
|
|
711
712
|
default: "bottom-start"
|
|
712
713
|
},
|
|
713
714
|
fallbackPlacements: {
|
|
@@ -718,7 +719,7 @@ const mn = mt({
|
|
|
718
719
|
type: [String, Number],
|
|
719
720
|
default: 0
|
|
720
721
|
},
|
|
721
|
-
appendTo:
|
|
722
|
+
appendTo: st.appendTo,
|
|
722
723
|
options: {
|
|
723
724
|
type: W(Array)
|
|
724
725
|
},
|
|
@@ -727,9 +728,9 @@ const mn = mt({
|
|
|
727
728
|
default: () => yt
|
|
728
729
|
},
|
|
729
730
|
...Ll,
|
|
730
|
-
...
|
|
731
|
+
...Rl(["ariaLabel"])
|
|
731
732
|
});
|
|
732
|
-
x + "", Fe + "",
|
|
733
|
+
x + "", Fe + "", hl.scroll;
|
|
733
734
|
const bn = pe({
|
|
734
735
|
name: "ElOptionGroup",
|
|
735
736
|
componentName: "ElOptionGroup",
|
|
@@ -746,7 +747,7 @@ const bn = pe({
|
|
|
746
747
|
var y;
|
|
747
748
|
return S.type.name === "ElOption" && !!((y = S.component) != null && y.proxy);
|
|
748
749
|
}, C = (S) => {
|
|
749
|
-
const y =
|
|
750
|
+
const y = X(S), m = [];
|
|
750
751
|
return y.forEach((s) => {
|
|
751
752
|
var i;
|
|
752
753
|
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)));
|
|
@@ -795,10 +796,10 @@ const pt = "ElSelect", gn = pe({
|
|
|
795
796
|
ElOption: ze,
|
|
796
797
|
ElOptions: vn,
|
|
797
798
|
ElOptionGroup: Ae,
|
|
798
|
-
ElTag:
|
|
799
|
-
ElScrollbar:
|
|
800
|
-
ElTooltip:
|
|
801
|
-
ElIcon:
|
|
799
|
+
ElTag: yl,
|
|
800
|
+
ElScrollbar: gl,
|
|
801
|
+
ElTooltip: bl,
|
|
802
|
+
ElIcon: Cl
|
|
802
803
|
},
|
|
803
804
|
directives: { ClickOutside: ql },
|
|
804
805
|
props: mn,
|
|
@@ -829,13 +830,13 @@ const pt = "ElSelect", gn = pe({
|
|
|
829
830
|
disabled: s(g)
|
|
830
831
|
}), O = (g) => g.reduce((c, E) => (c.push(E), E.children && E.children.length > 0 && c.push(...O(E.children)), c), []), I = (g) => {
|
|
831
832
|
Ql(g || []).forEach((E) => {
|
|
832
|
-
var
|
|
833
|
+
var Y;
|
|
833
834
|
if (U(E) && (E.type.name === "ElOption" || E.type.name === "ElTree")) {
|
|
834
835
|
const B = E.type.name;
|
|
835
836
|
if (B === "ElTree") {
|
|
836
|
-
const A = ((
|
|
837
|
-
O(A).forEach((
|
|
838
|
-
|
|
837
|
+
const A = ((Y = E.props) == null ? void 0 : Y.data) || [];
|
|
838
|
+
O(A).forEach((Z) => {
|
|
839
|
+
Z.currentLabel = Z.label || (U(Z.value) ? "" : Z.value), l.onOptionCreate(Z);
|
|
839
840
|
});
|
|
840
841
|
} else if (B === "ElOption") {
|
|
841
842
|
const A = { ...E.props };
|
|
@@ -1245,12 +1246,12 @@ function yn(e, o) {
|
|
|
1245
1246
|
]);
|
|
1246
1247
|
}
|
|
1247
1248
|
var Sn = /* @__PURE__ */ Ve(gn, [["render", yn], ["__file", "select.vue"]]);
|
|
1248
|
-
const
|
|
1249
|
+
const Fn = kl(Sn, {
|
|
1249
1250
|
Option: ze,
|
|
1250
1251
|
OptionGroup: Ae
|
|
1251
|
-
}),
|
|
1252
|
+
}), zn = bt(ze);
|
|
1252
1253
|
bt(Ae);
|
|
1253
1254
|
export {
|
|
1254
|
-
|
|
1255
|
-
|
|
1255
|
+
zn as E,
|
|
1256
|
+
Fn as a
|
|
1256
1257
|
};
|