st-comp 0.0.115 → 0.0.116
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/auto-imports.d.ts +1 -0
- package/components.d.ts +1 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +11 -11
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +1070 -272
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +13 -13
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +12 -12
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +30 -30
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -31
- package/es/User.cjs +1 -1
- package/es/User.js +84 -84
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +1116 -936
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +56 -56
- package/es/base-ec05f348.cjs +9 -0
- package/es/{base-a3fcf99a.js → base-f7877059.js} +345 -328
- package/es/{castArray-0e8e51f9.js → castArray-18f43497.js} +1 -1
- package/es/{castArray-e6cd255c.cjs → castArray-a45823fe.cjs} +1 -1
- package/es/{config-provider-e4ebacca.js → config-provider-6479d795.js} +6 -6
- package/es/{config-provider-957c280a.cjs → config-provider-7cdfca4d.cjs} +1 -1
- package/es/{debounce-7f3a3471.js → debounce-2336e546.js} +14 -14
- package/es/{debounce-3ad03224.cjs → debounce-b2ff12bd.cjs} +1 -1
- package/es/{dropdown-c505d260.js → dropdown-46daf582.js} +4 -4
- package/es/{dropdown-e73864c0.cjs → dropdown-9a974876.cjs} +1 -1
- package/es/{el-button-e389429d.cjs → el-button-196807af.cjs} +1 -1
- package/es/{el-button-fe99fee6.js → el-button-802f579a.js} +6 -6
- package/es/{el-empty-848e4e08.cjs → el-empty-19ea04f4.cjs} +1 -1
- package/es/{el-empty-a338aa98.js → el-empty-3c5ec277.js} +5 -5
- package/es/el-form-item-84099d46.js +1599 -0
- package/es/el-form-item-c39f717e.cjs +12 -0
- package/es/{el-input-65ed0dba.cjs → el-input-6c6f5bda.cjs} +1 -1
- package/es/{el-input-35c8ebc3.js → el-input-fac5b401.js} +39 -39
- package/es/{el-overlay-851ea246.js → el-overlay-69e9ae49.js} +105 -101
- package/es/el-overlay-891dcc40.cjs +1 -0
- package/es/{el-popover-246eb710.js → el-popover-694ded47.js} +22 -22
- package/es/{el-popover-b0deb095.cjs → el-popover-8735b1fa.cjs} +1 -1
- package/es/{el-popper-e052fb84.js → el-popper-6126b1f6.js} +91 -91
- package/es/{el-popper-4da22fdc.cjs → el-popper-f62316cd.cjs} +1 -1
- package/es/el-scrollbar-d1c3e7f7.cjs +1 -0
- package/es/el-scrollbar-e0493906.js +201 -0
- package/es/el-select-513126a5.js +1128 -0
- package/es/el-select-928f8c19.cjs +1 -0
- package/es/{el-table-column-661deade.js → el-table-column-3c920bdd.js} +69 -69
- package/es/{el-table-column-d636a7d6.cjs → el-table-column-dd8b62aa.cjs} +1 -1
- package/es/{el-tag-a45bdd1e.cjs → el-tag-3b03d13e.cjs} +1 -1
- package/es/{el-tag-7601f7e6.js → el-tag-5becabc9.js} +74 -74
- package/es/index-048dca7e.js +303 -0
- package/es/{index-28cd5fde.js → index-35117549.js} +25 -25
- package/es/{index-fc652f21.js → index-57f8f7b9.js} +15 -1
- package/es/index-7e40be25.js +167 -0
- package/es/index-80a2b137.cjs +1 -0
- package/es/{index-35665af5.cjs → index-8a0b1c53.cjs} +1 -1
- package/es/{index-25aca205.cjs → index-dc273ea2.cjs} +1 -1
- package/es/index-e1e83173.cjs +1 -0
- package/es/{raf-a97e05a3.js → raf-07da7cdf.js} +1 -1
- package/es/{raf-da075499.cjs → raf-8fc301fd.cjs} +1 -1
- package/es/{refs-f0ee592c.js → refs-1b1fe6ca.js} +1 -1
- package/es/{refs-34a69f8c.cjs → refs-d00b710b.cjs} +1 -1
- package/es/{scroll-1e0c8fab.js → scroll-3b521d81.js} +1 -1
- package/es/{scroll-c7ef9180.cjs → scroll-41224831.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-96d2ea48.cjs → use-form-common-props-1b84d8f4.cjs} +1 -1
- package/es/{use-form-common-props-d0739feb.js → use-form-common-props-f3a520d0.js} +53 -53
- package/es/{vnode-8f40662d.js → vnode-25d7c2f5.js} +1 -1
- package/es/{vnode-562e063c.cjs → vnode-7fbc61e1.cjs} +1 -1
- package/es/{zh-cn-0ab4aa73.js → zh-cn-74781bbd.js} +2 -2
- package/es/{zh-cn-bf58db71.cjs → zh-cn-ab9a583d.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +192 -192
- package/lib/{index-a981dd97.js → index-c6ba3bcd.js} +30058 -29227
- package/lib/{python-72fd599d.js → python-49e22e65.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +296 -97
- package/packages/FactorWarning/tools.js +10 -0
- package/src/pages/FactorWarning/index.vue +69 -25
- package/es/base-adc4e34e.cjs +0 -9
- package/es/el-overlay-84e3cb6c.cjs +0 -1
- package/es/el-radio-button-12b07ac2.js +0 -1782
- package/es/el-radio-button-5259a46b.cjs +0 -12
- package/es/el-scrollbar-8cb3663b.cjs +0 -1
- package/es/el-scrollbar-c23060d5.js +0 -193
- package/es/el-select-4987a187.cjs +0 -1
- package/es/el-select-d1a33fbe.js +0 -1233
- package/es/index-4090cb2c.cjs +0 -1
- package/es/index-af687c16.js +0 -302
- package/es/index-b4bbc58d.js +0 -59
- package/es/index-f14354e6.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),F=require("./el-popper-f62316cd.cjs"),W=require("./index-80a2b137.cjs"),k=require("./use-form-common-props-1b84d8f4.cjs"),a=require("./base-ec05f348.cjs"),B=require("./castArray-a45823fe.cjs"),N=require("./el-scrollbar-d1c3e7f7.cjs"),pt=require("./index-e1e83173.cjs"),T=require("./event-61f49698.cjs"),ft=require("./scroll-41224831.cjs"),M=require("./el-tag-3b03d13e.cjs"),Ce=require("./debounce-b2ff12bd.cjs");var be=1/0,mt=17976931348623157e292;function vt(e){if(!e)return e===0?e:0;if(e=Ce.toNumber(e),e===be||e===-be){var s=e<0?-1:1;return s*mt}return e===e?e:0}function ht(e){var s=vt(e),i=s%1;return s===s?i?s-i:s:0}function bt(e,s,i,p){for(var r=e.length,m=i+(p?1:-1);p?m--:++m<r;)if(s(e[m],m,e))return m;return-1}var gt=Math.max,Ct=Math.min;function yt(e,s,i){var p=e==null?0:e.length;if(!p)return-1;var r=p-1;return i!==void 0&&(r=ht(i),r=i<0?gt(p+r,0):Ct(r,p-1)),bt(e,M.baseIteratee(s),r,!0)}const St=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");function Et(){const e=t.shallowRef(),s=t.ref(0),i=11,p=t.computed(()=>({minWidth:`${Math.max(s.value,i)}px`})),r=()=>{var m,n;s.value=(n=(m=e.value)==null?void 0:m.getBoundingClientRect().width)!=null?n:0};return N.useResizeObserver(e,r),{calculatorRef:e,calculatorWidth:s,inputStyle:p}}const ye=Symbol("ElSelectGroup"),J=Symbol("ElSelect");function wt(e,s){const i=t.inject(J),p=t.inject(ye,{disabled:!1}),r=t.computed(()=>h(B.castArray(i.props.modelValue),e.value)),m=t.computed(()=>{var f;if(i.props.multiple){const b=B.castArray((f=i.props.modelValue)!=null?f:[]);return!r.value&&b.length>=i.props.multipleLimit&&i.props.multipleLimit>0}else return!1}),n=t.computed(()=>e.label||(a.isObject(e.value)?"":e.value)),g=t.computed(()=>e.value||e.label||""),c=t.computed(()=>e.disabled||s.groupDisabled||m.value),v=t.getCurrentInstance(),h=(f=[],b)=>{if(a.isObject(e.value)){const d=i.props.valueKey;return f&&f.some(w=>t.toRaw(a.get(w,d))===a.get(b,d))}else return f&&f.includes(b)},C=()=>{!e.disabled&&!p.disabled&&(i.states.hoveringIndex=i.optionsArray.indexOf(v.proxy))},E=f=>{const b=new RegExp(St(f),"i");s.visible=b.test(n.value)||e.created};return t.watch(()=>n.value,()=>{!e.created&&!i.props.remote&&i.setSelected()}),t.watch(()=>e.value,(f,b)=>{const{remote:d,valueKey:w}=i.props;if(f!==b&&(i.onOptionDestroy(b,v.proxy),i.onOptionCreate(v.proxy)),!e.created&&!d){if(w&&a.isObject(f)&&a.isObject(b)&&f[w]===b[w])return;i.setSelected()}}),t.watch(()=>p.disabled,()=>{s.groupDisabled=p.disabled},{immediate:!0}),{select:i,currentLabel:n,currentValue:g,itemSelected:r,isDisabled:c,hoverItem:C,updateOption:E}}const Vt=t.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const s=a.useNamespace("select"),i=a.useId(),p=t.computed(()=>[s.be("dropdown","item"),s.is("disabled",t.unref(g)),s.is("selected",t.unref(n)),s.is("hovering",t.unref(E))]),r=t.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:m,itemSelected:n,isDisabled:g,select:c,hoverItem:v,updateOption:h}=wt(e,r),{visible:C,hover:E}=t.toRefs(r),f=t.getCurrentInstance().proxy;c.onOptionCreate(f),t.onBeforeUnmount(()=>{const d=f.value,{selected:w}=c.states,K=w.some(q=>q.value===f.value);t.nextTick(()=>{c.states.cachedOptions.get(d)===f&&!K&&c.states.cachedOptions.delete(d)}),c.onOptionDestroy(d,f)});function b(){g.value||c.handleOptionSelect(f)}return{ns:s,id:i,containerKls:p,currentLabel:m,itemSelected:n,isDisabled:g,select:c,hoverItem:v,updateOption:h,visible:C,hover:E,selectOptionClick:b,states:r}}});function Ot(e,s,i,p,r,m){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 x=a._export_sfc(Vt,[["render",Ot],["__file","option.vue"]]);const kt=t.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=t.inject(J),s=a.useNamespace("select"),i=t.computed(()=>e.props.popperClass),p=t.computed(()=>e.props.multiple),r=t.computed(()=>e.props.fitInputWidth),m=t.ref("");function n(){var g;m.value=`${(g=e.selectRef)==null?void 0:g.offsetWidth}px`}return t.onMounted(()=>{n(),N.useResizeObserver(e.selectRef,n)}),{ns:s,minWidth:m,popperClass:i,isMultiple:p,isFitInputWidth:r}}});function It(e,s,i,p,r,m){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 Tt=a._export_sfc(kt,[["render",It],["__file","select-dropdown.vue"]]);const Bt=(e,s)=>{const{t:i}=a.useLocale(),p=a.useId(),r=a.useNamespace("select"),m=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}),g=t.ref(null),c=t.ref(null),v=t.ref(null),h=t.ref(null),C=t.ref(null),E=t.ref(null),f=t.ref(null),b=t.ref(null),d=t.ref(null),w=t.ref(null),K=t.ref(null),{isComposing:q,handleCompositionStart:Ee,handleCompositionUpdate:we,handleCompositionEnd:Ve}=W.useComposition({afterComposition:l=>ce(l)}),{wrapperRef:ee,isFocused:te,handleBlur:Oe}=W.useFocusController(C,{beforeFocus(){return $.value},afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,n.menuVisibleOnFocus=!0)},beforeBlur(l){var o,u;return((o=v.value)==null?void 0:o.isFocusInsideContent(l))||((u=h.value)==null?void 0:u.isFocusInsideContent(l))},afterBlur(){y.value=!1,n.menuVisibleOnFocus=!1}}),y=t.ref(!1),z=t.ref(),{form:H,formItem:R}=k.useFormItem(),{inputId:ke}=k.useFormItemInputId(e,{formItemContext:R}),{valueOnClear:Ie,isEmptyValue:Te}=k.useEmptyValues(e),$=t.computed(()=>e.disabled||(H==null?void 0:H.disabled)),Z=t.computed(()=>a.isArray(e.modelValue)?e.modelValue.length>0:!Te(e.modelValue)),Be=t.computed(()=>{var l;return(l=H==null?void 0:H.statusIcon)!=null?l:!1}),Ne=t.computed(()=>e.clearable&&!$.value&&n.inputHovering&&Z.value),le=t.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),De=t.computed(()=>r.is("reverse",le.value&&y.value)),ne=t.computed(()=>(R==null?void 0:R.validateState)||""),Me=t.computed(()=>k.ValidateComponentsMap[ne.value]),ze=t.computed(()=>e.remote?300:0),Re=t.computed(()=>e.remote&&!n.inputValue&&n.options.size===0),$e=t.computed(()=>e.loading?e.loadingText||i("el.select.loading"):e.filterable&&n.inputValue&&n.options.size>0&&L.value===0?e.noMatchText||i("el.select.noMatch"):n.options.size===0?e.noDataText||i("el.select.noData"):null),L=t.computed(()=>V.value.filter(l=>l.visible).length),V=t.computed(()=>{const l=Array.from(n.options.values()),o=[];return n.optionValues.forEach(u=>{const S=l.findIndex(O=>O.value===u);S>-1&&o.push(l[S])}),o.length>=l.length?o:l}),Le=t.computed(()=>Array.from(n.cachedOptions.values())),Ae=t.computed(()=>{const l=V.value.filter(o=>!o.created).some(o=>o.currentLabel===n.inputValue);return e.filterable&&e.allowCreate&&n.inputValue!==""&&!l}),oe=()=>{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)})},ae=k.useFormSize(),Pe=t.computed(()=>["small"].includes(ae.value)?"small":"default"),Fe=t.computed({get(){return y.value&&!Re.value},set(l){y.value=l}}),We=t.computed(()=>{if(e.multiple&&!a.isUndefined(e.modelValue))return B.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}),Ke=t.computed(()=>{var l;const o=(l=e.placeholder)!=null?l:i("el.select.placeholder");return e.multiple||!Z.value?o:n.selectedLabel}),qe=t.computed(()=>a.isIOS?null:"mouseenter");t.watch(()=>e.modelValue,(l,o)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(n.inputValue="",U("")),j(),!M.isEqual(l,o)&&e.validateEvent&&(R==null||R.validate("change").catch(u=>a.debugWarn(u)))},{flush:"post",deep:!0}),t.watch(()=>y.value,l=>{l?U(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)&&L.value&&se())},{flush:"post"}),t.watch(()=>n.hoveringIndex,l=>{a.isNumber(l)&&l>-1?z.value=V.value[l]||{}:z.value={},V.value.forEach(o=>{o.hover=z.value===o})}),t.watchEffect(()=>{n.isBeforeHide||oe()});const U=l=>{n.previousQuery===l||q.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)&&L.value?t.nextTick(se):t.nextTick(He))},se=()=>{const l=V.value.filter(O=>O.visible&&!O.disabled&&!O.states.groupDisabled),o=l.find(O=>O.created),u=l[0],S=V.value.map(O=>O.value);n.hoveringIndex=me(S,o||u)},j=()=>{if(e.multiple)n.selectedLabel="";else{const o=a.isArray(e.modelValue)?e.modelValue[0]:e.modelValue,u=ie(o);n.selectedLabel=u.currentLabel,n.selected=[u];return}const l=[];a.isUndefined(e.modelValue)||B.castArray(e.modelValue).forEach(o=>{l.push(ie(o))}),n.selected=l},ie=l=>{let o;const u=a.isPlainObject(l);for(let D=n.cachedOptions.size-1;D>=0;D--){const I=Le.value[D];if(u?a.get(I.value,e.valueKey)===a.get(l,e.valueKey):I.value===l){o={value:l,currentLabel:I.currentLabel,get isDisabled(){return I.isDisabled}};break}}if(o)return o;const S=u?l.label:l??"";return{value:l,currentLabel:S}},He=()=>{n.hoveringIndex=V.value.findIndex(l=>n.selected.some(o=>X(o)===X(l)))},Ue=()=>{n.selectionWidth=c.value.getBoundingClientRect().width},je=()=>{n.collapseItemWidth=w.value.getBoundingClientRect().width},_=()=>{var l,o;(o=(l=v.value)==null?void 0:l.updatePopper)==null||o.call(l)},re=()=>{var l,o;(o=(l=h.value)==null?void 0:l.updatePopper)==null||o.call(l)},ue=()=>{n.inputValue.length>0&&!y.value&&(y.value=!0),U(n.inputValue)},ce=l=>{if(n.inputValue=l.target.value,e.remote)de();else return ue()},de=Ce.debounce(()=>{ue()},ze.value),A=l=>{M.isEqual(e.modelValue,l)||s(T.CHANGE_EVENT,l)},Ge=l=>yt(l,o=>{const u=n.cachedOptions.get(o);return u&&!u.disabled&&!u.states.groupDisabled}),Qe=l=>{if(e.multiple&&l.code!==pt.EVENT_CODE.delete&&l.target.value.length<=0){const o=B.castArray(e.modelValue).slice(),u=Ge(o);if(u<0)return;const S=o[u];o.splice(u,1),s(T.UPDATE_MODEL_EVENT,o),A(o),s("remove-tag",S)}},Xe=(l,o)=>{const u=n.selected.indexOf(o);if(u>-1&&!$.value){const S=B.castArray(e.modelValue).slice();S.splice(u,1),s(T.UPDATE_MODEL_EVENT,S),A(S),s("remove-tag",o.value)}l.stopPropagation(),Q()},pe=l=>{l.stopPropagation();const o=e.multiple?[]:Ie.value;if(e.multiple)for(const u of n.selected)u.isDisabled&&o.push(u.value);s(T.UPDATE_MODEL_EVENT,o),A(o),n.hoveringIndex=-1,y.value=!1,s("clear"),Q()},fe=l=>{var o;if(e.multiple){const u=B.castArray((o=e.modelValue)!=null?o:[]).slice(),S=me(u,l);S>-1?u.splice(S,1):(e.multipleLimit<=0||u.length<e.multipleLimit)&&u.push(l.value),s(T.UPDATE_MODEL_EVENT,u),A(u),l.created&&U(""),e.filterable&&!e.reserveKeyword&&(n.inputValue="")}else s(T.UPDATE_MODEL_EVENT,l.value),A(l.value),y.value=!1;Q(),!y.value&&t.nextTick(()=>{G(l)})},me=(l=[],o)=>a.isUndefined(o)?-1:a.isObject(o.value)?l.findIndex(u=>M.isEqual(a.get(u,e.valueKey),X(o))):l.indexOf(o.value),G=l=>{var o,u,S,O,D;const I=a.isArray(l)?l[0]:l;let Y=null;if(I!=null&&I.value){const P=V.value.filter(dt=>dt.value===I.value);P.length>0&&(Y=P[0].$el)}if(v.value&&Y){const P=(O=(S=(u=(o=v.value)==null?void 0:o.popperRef)==null?void 0:u.contentRef)==null?void 0:S.querySelector)==null?void 0:O.call(S,`.${r.be("dropdown","wrap")}`);P&&ft.scrollIntoView(P,Y)}(D=K.value)==null||D.handleScroll()},Ye=l=>{n.options.set(l.value,l),n.cachedOptions.set(l.value,l)},Je=(l,o)=>{n.options.get(l)===o&&n.options.delete(l)},Ze=t.computed(()=>{var l,o;return(o=(l=v.value)==null?void 0:l.popperRef)==null?void 0:o.contentRef}),_e=()=>{n.isBeforeHide=!1,t.nextTick(()=>G(n.selected))},Q=()=>{var l;(l=C.value)==null||l.focus()},xe=()=>{var l;if(y.value){y.value=!1,t.nextTick(()=>{var o;return(o=C.value)==null?void 0:o.blur()});return}(l=C.value)==null||l.blur()},et=l=>{pe(l)},tt=l=>{if(y.value=!1,te.value){const o=new FocusEvent("focus",l);t.nextTick(()=>Oe(o))}},lt=()=>{n.inputValue.length>0?n.inputValue="":y.value=!1},ve=()=>{$.value||(a.isIOS&&(n.inputHovering=!0),n.menuVisibleOnFocus?n.menuVisibleOnFocus=!1:y.value=!y.value)},nt=()=>{if(!y.value)ve();else{const l=V.value[n.hoveringIndex];l&&!l.isDisabled&&fe(l)}},X=l=>a.isObject(l.value)?a.get(l.value,e.valueKey):l.value,ot=t.computed(()=>V.value.filter(l=>l.visible).every(l=>l.isDisabled)),at=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(0,e.maxCollapseTags):n.selected:[]),st=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(e.maxCollapseTags):[]:[]),he=l=>{if(!y.value){y.value=!0;return}if(!(n.options.size===0||L.value===0||q.value)&&!ot.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)&&he(l),t.nextTick(()=>G(z.value))}},it=()=>{if(!c.value)return 0;const l=window.getComputedStyle(c.value);return Number.parseFloat(l.gap||"6px")},rt=t.computed(()=>{const l=it();return{maxWidth:`${w.value&&e.maxCollapseTags===1?n.selectionWidth-n.collapseItemWidth-l:n.selectionWidth}px`}}),ut=t.computed(()=>({maxWidth:`${n.selectionWidth}px`})),ct=l=>{s("popup-scroll",l)};return N.useResizeObserver(c,Ue),N.useResizeObserver(b,_),N.useResizeObserver(ee,_),N.useResizeObserver(d,re),N.useResizeObserver(w,je),t.onMounted(()=>{j()}),{inputId:ke,contentId:p,nsSelect:r,nsInput:m,states:n,isFocused:te,expanded:y,optionsArray:V,hoverOption:z,selectSize:ae,filteredOptionsCount:L,updateTooltip:_,updateTagTooltip:re,debouncedOnInputChange:de,onInput:ce,deletePrevTag:Qe,deleteTag:Xe,deleteSelected:pe,handleOptionSelect:fe,scrollToOption:G,hasModelValue:Z,shouldShowPlaceholder:We,currentPlaceholder:Ke,mouseEnterEventName:qe,needStatusIcon:Be,showClose:Ne,iconComponent:le,iconReverse:De,validateState:ne,validateIcon:Me,showNewOption:Ae,updateOptions:oe,collapseTagSize:Pe,setSelected:j,selectDisabled:$,emptyText:$e,handleCompositionStart:Ee,handleCompositionUpdate:we,handleCompositionEnd:Ve,onOptionCreate:Ye,onOptionDestroy:Je,handleMenuEnter:_e,focus:Q,blur:xe,handleClearClick:et,handleClickOutside:tt,handleEsc:lt,toggleMenu:ve,selectOption:nt,getValueKey:X,navigateOptions:he,dropdownMenuVisible:Fe,showTagList:at,collapseTagList:st,popupScroll:ct,tagStyle:rt,collapseTagStyle:ut,popperRef:Ze,inputRef:C,tooltipRef:v,tagTooltipRef:h,prefixRef:E,suffixRef:f,selectRef:g,wrapperRef:ee,selectionRef:c,scrollbarRef:K,menuRef:b,tagMenuRef:d,collapseItemRef:w}};var Nt=t.defineComponent({name:"ElOptions",setup(e,{slots:s}){const i=t.inject(J);let p=[];return()=>{var r,m;const n=(r=s.default)==null?void 0:r.call(s),g=[];function c(v){a.isArray(v)&&v.forEach(h=>{var C,E,f,b;const d=(C=(h==null?void 0:h.type)||{})==null?void 0:C.name;d==="ElOptionGroup"?c(!a.isString(h.children)&&!a.isArray(h.children)&&a.isFunction((E=h.children)==null?void 0:E.default)?(f=h.children)==null?void 0:f.default():h.children):d==="ElOption"?g.push((b=h.props)==null?void 0:b.value):a.isArray(h.children)&&c(h.children)})}return n.length&&c((m=n[0])==null?void 0:m.children),M.isEqual(g,p)||(p=g,i&&(i.states.optionValues=g)),n}}});const Dt=a.buildProps({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:k.useSizeProp,effect:{type:a.definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:a.definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod: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:F.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:k.iconPropType,default:k.circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:k.iconPropType,default:k.arrow_down_default},tagType:{...W.tagProps.type,default:"info"},tagEffect:{...W.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:F.Ee,default:"bottom-start"},fallbackPlacements:{type:a.definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:String,...k.useEmptyValuesProps,...F.useAriaProps(["ariaLabel"])}),ge="ElSelect",Mt=t.defineComponent({name:ge,componentName:ge,components:{ElSelectMenu:Tt,ElOption:x,ElOptions:Nt,ElTag:W.ElTag,ElScrollbar:F.ElScrollbar,ElTooltip:F.ElTooltip,ElIcon:k.ElIcon},directives:{ClickOutside:M.ClickOutside},props:Dt,emits:[T.UPDATE_MODEL_EVENT,T.CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:s}){const i=t.computed(()=>{const{modelValue:c,multiple:v}=e,h=v?[]:void 0;return a.isArray(c)?v?c:h:v?h:c}),p=t.reactive({...t.toRefs(e),modelValue:i}),r=Bt(p,s),{calculatorRef:m,inputStyle:n}=Et();t.provide(J,t.reactive({props:p,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected}));const g=t.computed(()=>e.multiple?r.states.selected.map(c=>c.currentLabel):r.states.selectedLabel);return{...r,modelValue:i,selectedLabel:g,calculatorRef:m,inputStyle:n}}});function zt(e,s,i,p,r,m){const n=t.resolveComponent("el-tag"),g=t.resolveComponent("el-tooltip"),c=t.resolveComponent("el-icon"),v=t.resolveComponent("el-option"),h=t.resolveComponent("el-options"),C=t.resolveComponent("el-scrollbar"),E=t.resolveComponent("el-select-menu"),f=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)]:b=>e.states.inputHovering=!0,onMouseleave:b=>e.states.inputHovering=!1},[t.createVNode(g,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"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:b=>e.states.isBeforeHide=!1},{default:t.withCtx(()=>{var b;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},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.showTagList,d=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(d),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(n,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.tagStyle),onClose:w=>e.deleteTag(w,d)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[t.createTextVNode(t.toDisplayString(d.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(g,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"collapseItemRef",class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(n,{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,d=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(d),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(n,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:w=>e.deleteTag(w,d)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[t.createTextVNode(t.toDisplayString(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","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":d=>e.states.inputValue=d,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":((b=e.hoverOption)==null?void 0:b.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[t.withKeys(t.withModifiers(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),t.withKeys(t.withModifiers(d=>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,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.showClose?(t.openBlock(),t.createBlock(c,{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.showClose&&e.clearIcon?(t.openBlock(),t.createBlock(c,{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(c,{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(E,{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(C,{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(h,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_: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-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[f,e.handleClickOutside,e.popperRef]])}var Rt=a._export_sfc(Mt,[["render",zt],["__file","select.vue"]]);const $t=t.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const s=a.useNamespace("select"),i=t.ref(null),p=t.getCurrentInstance(),r=t.ref([]);t.provide(ye,t.reactive({...t.toRefs(e)}));const m=t.computed(()=>r.value.some(v=>v.visible===!0)),n=v=>{var h,C;return((h=v.type)==null?void 0:h.name)==="ElOption"&&!!((C=v.component)!=null&&C.proxy)},g=v=>{const h=B.castArray(v),C=[];return h.forEach(E=>{var f,b;n(E)?C.push(E.component.proxy):(f=E.children)!=null&&f.length?C.push(...g(E.children)):(b=E.component)!=null&&b.subTree&&C.push(...g(E.component.subTree))}),C},c=()=>{r.value=g(p.subTree)};return t.onMounted(()=>{c()}),N.useMutationObserver(i,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:i,visible:m,ns:s}}});function Lt(e,s,i,p,r,m){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 Se=a._export_sfc($t,[["render",Lt],["__file","option-group.vue"]]);const At=a.withInstall(Rt,{Option:x,OptionGroup:Se}),Pt=a.withNoopInstall(x);a.withNoopInstall(Se);exports.ElOption=Pt;exports.ElSelect=At;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { inject as re, computed as T, getCurrentInstance as ne, watch as de, nextTick as Me, ref as L, toRaw as _t, defineComponent as he, useSlots as dl, openBlock as z, createBlock as Fe, resolveDynamicComponent as fl, unref as O, normalizeClass as B, withCtx as Re, createElementVNode as ae, withDirectives as Oe, createElementBlock as X, isRef as _e, withModifiers as st, vModelCheckbox as it, renderSlot as Le, Fragment as ut, createTextVNode as ht, toDisplayString as Ne, createCommentVNode as xe, normalizeStyle as He, provide as hl, toRefs as vl, createVNode as we, render as
|
|
2
|
-
import { s as Rn, o as Nn, i as Fn, g as Yt, h as On,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { h as Qe, j as kl, l as Kn, o as In, U as Xt, k as zn, d as Dn, m as _n, S as
|
|
6
|
-
import {
|
|
7
|
-
import { d as dt } from "./debounce-
|
|
1
|
+
import { inject as re, computed as T, getCurrentInstance as ne, watch as de, nextTick as Me, ref as L, toRaw as _t, defineComponent as he, useSlots as dl, openBlock as z, createBlock as Fe, resolveDynamicComponent as fl, unref as O, normalizeClass as B, withCtx as Re, createElementVNode as ae, withDirectives as Oe, createElementBlock as X, isRef as _e, withModifiers as st, vModelCheckbox as it, renderSlot as Le, Fragment as ut, createTextVNode as ht, toDisplayString as Ne, createCommentVNode as xe, normalizeStyle as He, provide as hl, toRefs as vl, createVNode as we, render as Ut, isVNode as xn, resolveComponent as be, resolveDirective as pl, renderList as jt, onBeforeMount as ml, onMounted as qe, onUpdated as En, onUnmounted as Mt, reactive as Ln, h as A, watchEffect as Ie, onBeforeUnmount as gl, vShow as Gt, Comment as kn } from "vue";
|
|
2
|
+
import { s as Rn, o as Nn, i as Fn, g as Yt, h as On, u as bl, p as Tn, E as yl, d as Cl } from "./el-popper-6126b1f6.js";
|
|
3
|
+
import { F as Xe, O as wl, E as Sl, P as Mn, Q as Wn, G as bt, R as $n, T as Hn, i as fe, a as Te, c as Ee, l as Ce, f as Wt, s as ee, C as $e, g as Ue, u as ve, _ as Be, b as Pn, d as An, w as xl, v as $t, k as je, h as ye, t as Bn, K as qt, j as Ge, x as El, n as ct, m as Vn, o as Ke, r as Ye } from "./base-f7877059.js";
|
|
4
|
+
import { a as pt, g as Ll } from "./index-35117549.js";
|
|
5
|
+
import { h as Qe, j as kl, l as Kn, o as In, U as Xt, k as zn, d as Dn, m as _n, S as Un, f as jn, i as Gn, C as Yn } from "./el-tag-5becabc9.js";
|
|
6
|
+
import { L as Rl, x as qn, M as Xn, u as Ht, b as Qn, d as Pt, a as yt, e as Nl, E as At, g as Jn, B as Zn, h as Fl, l as eo } from "./use-form-common-props-f3a520d0.js";
|
|
7
|
+
import { d as dt } from "./debounce-2336e546.js";
|
|
8
8
|
import { U as vt } from "./event-09e37cc8.js";
|
|
9
|
-
import { r as to } from "./raf-
|
|
10
|
-
import {
|
|
9
|
+
import { r as to } from "./raf-07da7cdf.js";
|
|
10
|
+
import { b as Qt, a as Jt } from "./el-scrollbar-e0493906.js";
|
|
11
11
|
var Zt = Object.create, lo = function() {
|
|
12
12
|
function e() {
|
|
13
13
|
}
|
|
@@ -161,7 +161,7 @@ function $o(e, t, l, n, r, s, i) {
|
|
|
161
161
|
}
|
|
162
162
|
function Hl(e, t, l, n, r) {
|
|
163
163
|
e !== t && $l(t, function(s, i) {
|
|
164
|
-
if (r || (r = new
|
|
164
|
+
if (r || (r = new Un()), Xe(s))
|
|
165
165
|
$o(e, t, i, l, Hl, n, r);
|
|
166
166
|
else {
|
|
167
167
|
var o = n ? n(wt(e, i), s, i + "", e, t, r) : void 0;
|
|
@@ -177,7 +177,7 @@ function Ho(e, t) {
|
|
|
177
177
|
}
|
|
178
178
|
function Po(e, t) {
|
|
179
179
|
var l = bt(e) ? Hn : Ho;
|
|
180
|
-
return l(e,
|
|
180
|
+
return l(e, jn(t));
|
|
181
181
|
}
|
|
182
182
|
function Ao(e, t) {
|
|
183
183
|
return On(Po(e, t), 1);
|
|
@@ -302,7 +302,7 @@ const Pl = Bo, Al = {
|
|
|
302
302
|
}, zo = (e, t, { model: l }) => {
|
|
303
303
|
const n = re(Ve, void 0), r = L(!1), s = T(() => $e(e.value) ? e.label : e.value), i = T(() => {
|
|
304
304
|
const c = l.value;
|
|
305
|
-
return Ee(c) ? c : ee(c) ?
|
|
305
|
+
return Ee(c) ? c : ee(c) ? Ue(s.value) ? c.map(_t).some((h) => Gn(h, s.value)) : c.map(_t).includes(s.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
|
|
306
306
|
}), o = yt(T(() => {
|
|
307
307
|
var c;
|
|
308
308
|
return (c = n == null ? void 0 : n.size) == null ? void 0 : c.value;
|
|
@@ -477,11 +477,11 @@ const Pl = Bo, Al = {
|
|
|
477
477
|
}, 8, ["class", "aria-controls", "onClick"]));
|
|
478
478
|
}
|
|
479
479
|
});
|
|
480
|
-
var
|
|
481
|
-
const
|
|
480
|
+
var Uo = /* @__PURE__ */ Be(_o, [["__file", "checkbox.vue"]]);
|
|
481
|
+
const jo = he({
|
|
482
482
|
name: "ElCheckboxButton"
|
|
483
483
|
}), Go = /* @__PURE__ */ he({
|
|
484
|
-
...
|
|
484
|
+
...jo,
|
|
485
485
|
props: Al,
|
|
486
486
|
emits: Bl,
|
|
487
487
|
setup(e) {
|
|
@@ -636,7 +636,7 @@ const Yo = Pn({
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
var Il = /* @__PURE__ */ Be(Qo, [["__file", "checkbox-group.vue"]]);
|
|
639
|
-
const Pe = xl(
|
|
639
|
+
const Pe = xl(Uo, {
|
|
640
640
|
CheckboxButton: Kl,
|
|
641
641
|
CheckboxGroup: Il
|
|
642
642
|
});
|
|
@@ -649,7 +649,7 @@ const br = $t(Il), mt = function(e) {
|
|
|
649
649
|
return e;
|
|
650
650
|
fe(l) ? l = l === "descending" ? -1 : 1 : l = l && l < 0 ? -1 : 1;
|
|
651
651
|
const s = n ? null : function(o, a) {
|
|
652
|
-
return r ? (ee(r) || (r = [r]), r.map((u) => fe(u) ? qt(o, u) : u(o, a, e))) : (t !== "$key" &&
|
|
652
|
+
return r ? (ee(r) || (r = [r]), r.map((u) => fe(u) ? qt(o, u) : u(o, a, e))) : (t !== "$key" && Ue(o) && "$value" in o && (o = o.$value), [Ue(o) ? qt(o, t) : o]);
|
|
653
653
|
}, i = function(o, a) {
|
|
654
654
|
if (n)
|
|
655
655
|
return n(o.value, a.value);
|
|
@@ -712,7 +712,7 @@ function ea(e, t) {
|
|
|
712
712
|
for (n in e)
|
|
713
713
|
l[n] = e[n];
|
|
714
714
|
for (n in t)
|
|
715
|
-
if (
|
|
715
|
+
if (je(t, n)) {
|
|
716
716
|
const r = t[n];
|
|
717
717
|
Ce(r) || (l[n] = r);
|
|
718
718
|
}
|
|
@@ -814,10 +814,10 @@ function aa(e, t, l, n, r, s) {
|
|
|
814
814
|
} : void 0);
|
|
815
815
|
c.appContext = { ...s.appContext, ...s };
|
|
816
816
|
const h = document.createElement("div");
|
|
817
|
-
|
|
817
|
+
Ut(c, h), c.component.exposed.onOpen();
|
|
818
818
|
const v = a == null ? void 0 : a.querySelector(`.${u}-scrollbar__wrap`);
|
|
819
819
|
ce = () => {
|
|
820
|
-
|
|
820
|
+
Ut(null, h), v == null || v.removeEventListener("scroll", ce), ce = null;
|
|
821
821
|
}, ce.trigger = r, ce.vm = c, v == null || v.addEventListener("scroll", ce);
|
|
822
822
|
}
|
|
823
823
|
function _l(e) {
|
|
@@ -826,7 +826,7 @@ function _l(e) {
|
|
|
826
826
|
function ol(e, t) {
|
|
827
827
|
return e + t.colSpan;
|
|
828
828
|
}
|
|
829
|
-
const
|
|
829
|
+
const Ul = (e, t, l, n) => {
|
|
830
830
|
let r = 0, s = e;
|
|
831
831
|
const i = l.states.columns.value;
|
|
832
832
|
if (n) {
|
|
@@ -851,7 +851,7 @@ const jl = (e, t, l, n) => {
|
|
|
851
851
|
after: s
|
|
852
852
|
} : {};
|
|
853
853
|
}, Vt = (e, t, l, n, r, s = 0) => {
|
|
854
|
-
const i = [], { direction: o, start: a, after: u } =
|
|
854
|
+
const i = [], { direction: o, start: a, after: u } = Ul(t, l, n, r);
|
|
855
855
|
if (o) {
|
|
856
856
|
const c = o === "left";
|
|
857
857
|
i.push(`${e}-fixed-column--${o}`), c && u + s === n.states.fixedLeafColumnsLength.value - 1 ? i.push("is-last-column") : !c && a - s === n.states.columns.value.length - n.states.rightFixedLeafColumnsLength.value && i.push("is-first-column");
|
|
@@ -866,7 +866,7 @@ const Kt = (e, t, l, n) => {
|
|
|
866
866
|
direction: r,
|
|
867
867
|
start: s = 0,
|
|
868
868
|
after: i = 0
|
|
869
|
-
} =
|
|
869
|
+
} = Ul(e, t, l, n);
|
|
870
870
|
if (!r)
|
|
871
871
|
return;
|
|
872
872
|
const o = {}, a = r === "left", u = l.states.columns.value;
|
|
@@ -1001,8 +1001,8 @@ function ia(e) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
W[V] = G;
|
|
1003
1003
|
});
|
|
1004
|
-
const
|
|
1005
|
-
r.value &&
|
|
1004
|
+
const j = Object.keys(E);
|
|
1005
|
+
r.value && j.length && H.length && j.forEach((V) => {
|
|
1006
1006
|
const _ = K[V], G = E[V].children;
|
|
1007
1007
|
if (H.includes(V)) {
|
|
1008
1008
|
if (W[V].children.length !== 0)
|
|
@@ -1089,7 +1089,7 @@ const ua = (e, t) => {
|
|
|
1089
1089
|
};
|
|
1090
1090
|
function ca() {
|
|
1091
1091
|
var e;
|
|
1092
|
-
const t = ne(), { size: l } = vl((e = t.proxy) == null ? void 0 : e.$props), n = L(null), r = L([]), s = L([]), i = L(!1), o = L([]), a = L([]), u = L([]), c = L([]), h = L([]), v = L([]), y = L([]), f = L([]), b = [], g = L(0), C = L(0), k = L(0), x = L(!1), d = L([]), p = L(!1), w = L(!1), m = L(null), E = L({}), R = L(null), W = L(null), K = L(null), H = L(null), D = L(null),
|
|
1092
|
+
const t = ne(), { size: l } = vl((e = t.proxy) == null ? void 0 : e.$props), n = L(null), r = L([]), s = L([]), i = L(!1), o = L([]), a = L([]), u = L([]), c = L([]), h = L([]), v = L([]), y = L([]), f = L([]), b = [], g = L(0), C = L(0), k = L(0), x = L(!1), d = L([]), p = L(!1), w = L(!1), m = L(null), E = L({}), R = L(null), W = L(null), K = L(null), H = L(null), D = L(null), j = T(() => n.value ? ze(d.value, n.value) : void 0);
|
|
1093
1093
|
de(r, () => {
|
|
1094
1094
|
var N;
|
|
1095
1095
|
t.state && (F(!1), t.props.tableLayout === "auto" && ((N = t.refs.tableHeaderRef) == null || N.updateFixedColumnStyle()));
|
|
@@ -1106,22 +1106,22 @@ function ca() {
|
|
|
1106
1106
|
});
|
|
1107
1107
|
}, G = () => {
|
|
1108
1108
|
var N, $;
|
|
1109
|
-
o.value.forEach((
|
|
1110
|
-
_(
|
|
1111
|
-
}), c.value = o.value.filter((
|
|
1109
|
+
o.value.forEach((U) => {
|
|
1110
|
+
_(U);
|
|
1111
|
+
}), c.value = o.value.filter((U) => U.type !== "selection" && [!0, "left"].includes(U.fixed));
|
|
1112
1112
|
let P;
|
|
1113
1113
|
if ((($ = (N = o.value) == null ? void 0 : N[0]) == null ? void 0 : $.type) === "selection") {
|
|
1114
|
-
const
|
|
1115
|
-
P = [!0, "left"].includes(
|
|
1114
|
+
const U = o.value[0];
|
|
1115
|
+
P = [!0, "left"].includes(U.fixed) || c.value.length && U.fixed !== "right", P && c.value.unshift(U);
|
|
1116
1116
|
}
|
|
1117
|
-
h.value = o.value.filter((
|
|
1118
|
-
const I = o.value.filter((
|
|
1117
|
+
h.value = o.value.filter((U) => U.fixed === "right");
|
|
1118
|
+
const I = o.value.filter((U) => (P ? U.type !== "selection" : !0) && !U.fixed);
|
|
1119
1119
|
a.value = [].concat(c.value).concat(I).concat(h.value);
|
|
1120
1120
|
const Y = nt(I), Z = nt(c.value), ie = nt(h.value);
|
|
1121
1121
|
g.value = Y.length, C.value = Z.length, k.value = ie.length, u.value = [].concat(Z).concat(Y).concat(ie), i.value = c.value.length > 0 || h.value.length > 0;
|
|
1122
1122
|
}, F = (N, $ = !1) => {
|
|
1123
1123
|
N && G(), $ ? t.state.doLayout() : t.state.debouncedUpdateLayout();
|
|
1124
|
-
}, S = (N) =>
|
|
1124
|
+
}, S = (N) => j.value ? !!j.value[le(N, n.value)] : d.value.includes(N), M = () => {
|
|
1125
1125
|
x.value = !1;
|
|
1126
1126
|
const N = d.value;
|
|
1127
1127
|
d.value = [], N.length && t.emit("selection-change", []);
|
|
@@ -1130,8 +1130,8 @@ function ca() {
|
|
|
1130
1130
|
if (n.value) {
|
|
1131
1131
|
N = [];
|
|
1132
1132
|
const $ = ze(r.value, n.value);
|
|
1133
|
-
for (const P in
|
|
1134
|
-
|
|
1133
|
+
for (const P in j.value)
|
|
1134
|
+
je(j.value, P) && !$[P] && N.push(j.value[P].row);
|
|
1135
1135
|
} else
|
|
1136
1136
|
N = d.value.filter(($) => !r.value.includes($));
|
|
1137
1137
|
if (N.length) {
|
|
@@ -1139,10 +1139,10 @@ function ca() {
|
|
|
1139
1139
|
d.value = $, t.emit("selection-change", $.slice());
|
|
1140
1140
|
}
|
|
1141
1141
|
}, Q = () => (d.value || []).slice(), J = (N, $, P = !0, I = !1) => {
|
|
1142
|
-
var Y, Z, ie,
|
|
1142
|
+
var Y, Z, ie, U;
|
|
1143
1143
|
const ke = {
|
|
1144
1144
|
children: (Z = (Y = t == null ? void 0 : t.store) == null ? void 0 : Y.states) == null ? void 0 : Z.childrenColumnName.value,
|
|
1145
|
-
checkStrictly: (
|
|
1145
|
+
checkStrictly: (U = (ie = t == null ? void 0 : t.store) == null ? void 0 : ie.states) == null ? void 0 : U.checkStrictly.value
|
|
1146
1146
|
};
|
|
1147
1147
|
if (ft(d.value, N, $, ke, I ? void 0 : m.value, r.value.indexOf(N))) {
|
|
1148
1148
|
const tt = (d.value || []).slice();
|
|
@@ -1153,17 +1153,17 @@ function ca() {
|
|
|
1153
1153
|
const P = w.value ? !x.value : !(x.value || d.value.length);
|
|
1154
1154
|
x.value = P;
|
|
1155
1155
|
let I = !1, Y = 0;
|
|
1156
|
-
const Z = ($ = (N = t == null ? void 0 : t.store) == null ? void 0 : N.states) == null ? void 0 : $.rowKey.value, { childrenColumnName: ie } = t.store.states,
|
|
1156
|
+
const Z = ($ = (N = t == null ? void 0 : t.store) == null ? void 0 : N.states) == null ? void 0 : $.rowKey.value, { childrenColumnName: ie } = t.store.states, U = {
|
|
1157
1157
|
children: ie.value,
|
|
1158
1158
|
checkStrictly: !1
|
|
1159
1159
|
};
|
|
1160
1160
|
r.value.forEach((ke, et) => {
|
|
1161
1161
|
const tt = et + Y;
|
|
1162
|
-
ft(d.value, ke, P,
|
|
1162
|
+
ft(d.value, ke, P, U, m.value, tt) && (I = !0), Y += te(le(ke, Z));
|
|
1163
1163
|
}), I && t.emit("selection-change", d.value ? d.value.slice() : []), t.emit("select-all", (d.value || []).slice());
|
|
1164
1164
|
}, se = () => {
|
|
1165
1165
|
r.value.forEach((N) => {
|
|
1166
|
-
const $ = le(N, n.value), P =
|
|
1166
|
+
const $ = le(N, n.value), P = j.value[$];
|
|
1167
1167
|
P && (d.value[P.index] = N);
|
|
1168
1168
|
});
|
|
1169
1169
|
}, ge = () => {
|
|
@@ -1175,14 +1175,14 @@ function ca() {
|
|
|
1175
1175
|
const { childrenColumnName: $ } = t.store.states;
|
|
1176
1176
|
let P = 0, I = 0;
|
|
1177
1177
|
const Y = (ie) => {
|
|
1178
|
-
var
|
|
1178
|
+
var U;
|
|
1179
1179
|
for (const ke of ie) {
|
|
1180
1180
|
const et = m.value && m.value.call(null, ke, P);
|
|
1181
1181
|
if (S(ke))
|
|
1182
1182
|
I++;
|
|
1183
1183
|
else if (!m.value || et)
|
|
1184
1184
|
return !1;
|
|
1185
|
-
if (P++, (
|
|
1185
|
+
if (P++, (U = ke[$.value]) != null && U.length && !Y(ke[$.value]))
|
|
1186
1186
|
return !1;
|
|
1187
1187
|
}
|
|
1188
1188
|
return !0;
|
|
@@ -1236,7 +1236,7 @@ function ca() {
|
|
|
1236
1236
|
columns: u.value
|
|
1237
1237
|
}, Z));
|
|
1238
1238
|
I.forEach((Z) => {
|
|
1239
|
-
const ie = Y.find((
|
|
1239
|
+
const ie = Y.find((U) => U.id === Z);
|
|
1240
1240
|
ie && (ie.filteredValue = []);
|
|
1241
1241
|
}), t.store.commit("filterChange", {
|
|
1242
1242
|
column: Y,
|
|
@@ -1471,19 +1471,19 @@ function fa(e, t) {
|
|
|
1471
1471
|
throw new Error("Table is required.");
|
|
1472
1472
|
const l = da();
|
|
1473
1473
|
return l.toggleAllSelection = dt(l._toggleAllSelection, 10), Object.keys(De).forEach((n) => {
|
|
1474
|
-
|
|
1474
|
+
jl(Gl(t, n), n, l);
|
|
1475
1475
|
}), ha(l, t), l;
|
|
1476
1476
|
}
|
|
1477
1477
|
function ha(e, t) {
|
|
1478
1478
|
Object.keys(De).forEach((l) => {
|
|
1479
1479
|
de(() => Gl(t, l), (n) => {
|
|
1480
|
-
|
|
1480
|
+
jl(n, l, e);
|
|
1481
1481
|
});
|
|
1482
1482
|
});
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function jl(e, t, l) {
|
|
1485
1485
|
let n = e, r = De[t];
|
|
1486
|
-
|
|
1486
|
+
Ue(De[t]) && (r = r.key, n = n || De[t].default), l.states[r].value = n;
|
|
1487
1487
|
}
|
|
1488
1488
|
function Gl(e, t) {
|
|
1489
1489
|
if (t.includes(".")) {
|
|
@@ -1499,7 +1499,7 @@ class va {
|
|
|
1499
1499
|
constructor(t) {
|
|
1500
1500
|
this.observers = [], this.table = null, this.store = null, this.columns = [], this.fit = !0, this.showHeader = !0, this.height = L(null), this.scrollX = L(!1), this.scrollY = L(!1), this.bodyWidth = L(null), this.fixedWidth = L(null), this.rightFixedWidth = L(null), this.gutterWidth = 0;
|
|
1501
1501
|
for (const l in t)
|
|
1502
|
-
|
|
1502
|
+
je(t, l) && (_e(this[l]) ? this[l].value = t[l] : this[l] = t[l]);
|
|
1503
1503
|
if (!this.table)
|
|
1504
1504
|
throw new Error("Table is required for Table Layout");
|
|
1505
1505
|
if (!this.store)
|
|
@@ -1749,7 +1749,7 @@ function ga(e, t, l, n, r, s) {
|
|
|
1749
1749
|
class: B(e.ns.e("checkbox-group"))
|
|
1750
1750
|
}, {
|
|
1751
1751
|
default: Re(() => [
|
|
1752
|
-
(z(!0), X(ut, null,
|
|
1752
|
+
(z(!0), X(ut, null, jt(e.filters, (f) => (z(), Fe(i, {
|
|
1753
1753
|
key: f.value,
|
|
1754
1754
|
value: f.value
|
|
1755
1755
|
}, {
|
|
@@ -1792,7 +1792,7 @@ function ga(e, t, l, n, r, s) {
|
|
|
1792
1792
|
]),
|
|
1793
1793
|
onClick: (f) => e.handleSelect(null)
|
|
1794
1794
|
}, Ne(e.t("el.table.clearFilter")), 11, ["onClick"]),
|
|
1795
|
-
(z(!0), X(ut, null,
|
|
1795
|
+
(z(!0), X(ut, null, jt(e.filters, (f) => (z(), X("li", {
|
|
1796
1796
|
key: f.value,
|
|
1797
1797
|
class: B([e.ns.e("list-item"), e.ns.is("active", e.isActive(f))]),
|
|
1798
1798
|
label: f.value,
|
|
@@ -2276,7 +2276,7 @@ function xa(e) {
|
|
|
2276
2276
|
return;
|
|
2277
2277
|
const R = document.createRange();
|
|
2278
2278
|
R.setStart(E, 0), R.setEnd(E, E.childNodes.length);
|
|
2279
|
-
const { width: W, height: K } = R.getBoundingClientRect(), { width: H, height: D } = E.getBoundingClientRect(), { top:
|
|
2279
|
+
const { width: W, height: K } = R.getBoundingClientRect(), { width: H, height: D } = E.getBoundingClientRect(), { top: j, left: V, right: _, bottom: G } = c(E), F = V + _, S = j + G;
|
|
2280
2280
|
gt(W + F, H) || gt(K + S, D) || gt(E.scrollWidth, H) ? aa(g, p.innerText || p.textContent, b, m, p, d) : ((k = ce) == null ? void 0 : k.trigger) === p && ((x = ce) == null || x());
|
|
2281
2281
|
},
|
|
2282
2282
|
handleCellMouseLeave: (f) => {
|
|
@@ -2341,7 +2341,7 @@ function Ea(e) {
|
|
|
2341
2341
|
rowIndex: h,
|
|
2342
2342
|
columnIndex: v
|
|
2343
2343
|
});
|
|
2344
|
-
ee(g) ? (y = g[0], f = g[1]) :
|
|
2344
|
+
ee(g) ? (y = g[0], f = g[1]) : Ue(g) && (y = g.rowspan, f = g.colspan);
|
|
2345
2345
|
}
|
|
2346
2346
|
return { rowspan: y, colspan: f };
|
|
2347
2347
|
},
|
|
@@ -2399,7 +2399,7 @@ function Na(e) {
|
|
|
2399
2399
|
const R = t.props.rowKey;
|
|
2400
2400
|
return R ? le(m, R) : E;
|
|
2401
2401
|
}, d = (m, E, R, W = !1) => {
|
|
2402
|
-
const { tooltipEffect: K, tooltipOptions: H, store: D } = e, { indent:
|
|
2402
|
+
const { tooltipEffect: K, tooltipOptions: H, store: D } = e, { indent: j, columns: V } = D.states, _ = y(m, E);
|
|
2403
2403
|
let G = !0;
|
|
2404
2404
|
return R && (_.push(l.em("row", `level-${R.level}`)), G = R.display), A("tr", {
|
|
2405
2405
|
style: [G ? null : {
|
|
@@ -2428,7 +2428,7 @@ function Na(e) {
|
|
|
2428
2428
|
expanded: W
|
|
2429
2429
|
};
|
|
2430
2430
|
M === k.value && R && (oe.treeNode = {
|
|
2431
|
-
indent: R.level *
|
|
2431
|
+
indent: R.level * j.value,
|
|
2432
2432
|
level: R.level
|
|
2433
2433
|
}, Ee(R.expanded) && (oe.treeNode.expanded = R.expanded, "loading" in R && (oe.treeNode.loading = R.loading), "noLazyChildren" in R && (oe.treeNode.noLazyChildren = R.noLazyChildren)));
|
|
2434
2434
|
const se = `${x(m, E)},${M}`, ge = J.columnKey || J.rawColumnKey || "", te = S.showOverflowTooltip && Pl({
|
|
@@ -2449,7 +2449,7 @@ function Na(e) {
|
|
|
2449
2449
|
}, p = (m, E, R) => E.renderCell(R);
|
|
2450
2450
|
return {
|
|
2451
2451
|
wrappedRowRender: (m, E) => {
|
|
2452
|
-
const R = e.store, { isRowExpanded: W, assertRowKey: K } = R, { treeData: H, lazyTreeNodeMap: D, childrenColumnName:
|
|
2452
|
+
const R = e.store, { isRowExpanded: W, assertRowKey: K } = R, { treeData: H, lazyTreeNodeMap: D, childrenColumnName: j, rowKey: V } = R.states, _ = R.states.columns.value;
|
|
2453
2453
|
if (_.some(({ type: F }) => F === "expand")) {
|
|
2454
2454
|
const F = W(m), S = d(m, E, void 0, F), M = t.renderExpanded;
|
|
2455
2455
|
return F ? M ? [
|
|
@@ -2489,13 +2489,13 @@ function Na(e) {
|
|
|
2489
2489
|
if ($e(me))
|
|
2490
2490
|
throw new Error("For nested data item, row-key is required.");
|
|
2491
2491
|
if (S = { ...H.value[me] }, S && (pe.expanded = S.expanded, S.level = S.level || pe.level, S.display = !!(S.expanded && pe.display), Ee(S.lazy) && (Ee(S.loaded) && S.loaded && (pe.noLazyChildren = !(S.children && S.children.length)), pe.loading = S.loading)), Q++, q.push(d(te, E + Q, pe)), S) {
|
|
2492
|
-
const Ze = D.value[me] || te[
|
|
2492
|
+
const Ze = D.value[me] || te[j.value];
|
|
2493
2493
|
J(Ze, S);
|
|
2494
2494
|
}
|
|
2495
2495
|
});
|
|
2496
2496
|
};
|
|
2497
2497
|
S.display = !0;
|
|
2498
|
-
const oe = D.value[F] || m[
|
|
2498
|
+
const oe = D.value[F] || m[j.value];
|
|
2499
2499
|
J(oe, S);
|
|
2500
2500
|
}
|
|
2501
2501
|
return q;
|
|
@@ -2825,7 +2825,7 @@ function Ha(e, t, l, n) {
|
|
|
2825
2825
|
}, H = yt(), D = T(() => {
|
|
2826
2826
|
const { bodyWidth: F, scrollY: S, gutterWidth: M } = t;
|
|
2827
2827
|
return F.value ? `${F.value - (S.value ? M : 0)}px` : "";
|
|
2828
|
-
}),
|
|
2828
|
+
}), j = T(() => e.maxHeight ? "fixed" : e.tableLayout), V = T(() => {
|
|
2829
2829
|
if (e.data && e.data.length)
|
|
2830
2830
|
return null;
|
|
2831
2831
|
let F = "100%";
|
|
@@ -2864,7 +2864,7 @@ function Ha(e, t, l, n) {
|
|
|
2864
2864
|
resizeState: a,
|
|
2865
2865
|
doLayout: p,
|
|
2866
2866
|
tableBodyStyles: d,
|
|
2867
|
-
tableLayout:
|
|
2867
|
+
tableLayout: j,
|
|
2868
2868
|
scrollbarViewStyle: c,
|
|
2869
2869
|
scrollbarStyle: _
|
|
2870
2870
|
};
|
|
@@ -3096,16 +3096,16 @@ const _a = function(e, t) {
|
|
|
3096
3096
|
};
|
|
3097
3097
|
e.addEventListener("wheel", l, { passive: !0 });
|
|
3098
3098
|
}
|
|
3099
|
-
},
|
|
3099
|
+
}, Ua = {
|
|
3100
3100
|
beforeMount(e, t) {
|
|
3101
3101
|
_a(e, t.value);
|
|
3102
3102
|
}
|
|
3103
3103
|
};
|
|
3104
|
-
let
|
|
3104
|
+
let ja = 1;
|
|
3105
3105
|
const Ga = he({
|
|
3106
3106
|
name: "ElTable",
|
|
3107
3107
|
directives: {
|
|
3108
|
-
Mousewheel:
|
|
3108
|
+
Mousewheel: Ua
|
|
3109
3109
|
},
|
|
3110
3110
|
components: {
|
|
3111
3111
|
TableHeader: Sa,
|
|
@@ -3173,11 +3173,11 @@ const Ga = he({
|
|
|
3173
3173
|
bodyWidth: K,
|
|
3174
3174
|
resizeState: H,
|
|
3175
3175
|
doLayout: D,
|
|
3176
|
-
tableBodyStyles:
|
|
3176
|
+
tableBodyStyles: j,
|
|
3177
3177
|
tableLayout: V,
|
|
3178
3178
|
scrollbarViewStyle: _,
|
|
3179
3179
|
scrollbarStyle: G
|
|
3180
|
-
} = Ha(e, s, r, n), { scrollBarRef: F, scrollTo: S, setScrollLeft: M, setScrollTop: q } = Ba(), Q = dt(D, 50), J = `${l.namespace.value}-table_${
|
|
3180
|
+
} = Ha(e, s, r, n), { scrollBarRef: F, scrollTo: S, setScrollLeft: M, setScrollTop: q } = Ba(), Q = dt(D, 50), J = `${l.namespace.value}-table_${ja++}`;
|
|
3181
3181
|
n.tableId = J, n.state = {
|
|
3182
3182
|
isGroup: d,
|
|
3183
3183
|
resizeState: H,
|
|
@@ -3209,7 +3209,7 @@ const Ga = he({
|
|
|
3209
3209
|
resizeState: H,
|
|
3210
3210
|
isGroup: d,
|
|
3211
3211
|
bodyWidth: K,
|
|
3212
|
-
tableBodyStyles:
|
|
3212
|
+
tableBodyStyles: j,
|
|
3213
3213
|
emptyBlockStyle: E,
|
|
3214
3214
|
debouncedUpdateLayout: Q,
|
|
3215
3215
|
handleFixedMousewheel: R,
|
|
@@ -3594,7 +3594,7 @@ function lr(e, t) {
|
|
|
3594
3594
|
}, o = cl(s, i);
|
|
3595
3595
|
Object.keys(o).forEach((a) => {
|
|
3596
3596
|
const u = i[a];
|
|
3597
|
-
|
|
3597
|
+
je(t, u) && de(() => t[u], (c) => {
|
|
3598
3598
|
let h = c;
|
|
3599
3599
|
u === "width" && a === "realWidth" && (h = Bt(c)), u === "minWidth" && a === "realMinWidth" && (h = Dl(c)), l.columnConfig.value[u] = h, l.columnConfig.value[a] = h;
|
|
3600
3600
|
const v = u === "fixed";
|
|
@@ -3623,7 +3623,7 @@ function lr(e, t) {
|
|
|
3623
3623
|
}, o = cl(s, i);
|
|
3624
3624
|
Object.keys(o).forEach((a) => {
|
|
3625
3625
|
const u = i[a];
|
|
3626
|
-
|
|
3626
|
+
je(t, u) && de(() => t[u], (c) => {
|
|
3627
3627
|
l.columnConfig.value[a] = c;
|
|
3628
3628
|
});
|
|
3629
3629
|
});
|
|
@@ -3684,7 +3684,7 @@ function nr(e, t, l) {
|
|
|
3684
3684
|
let m = null;
|
|
3685
3685
|
if (t.default) {
|
|
3686
3686
|
const D = t.default(w);
|
|
3687
|
-
m = D.some((
|
|
3687
|
+
m = D.some((j) => j.type !== kn) ? D : p(w);
|
|
3688
3688
|
} else
|
|
3689
3689
|
m = p(w);
|
|
3690
3690
|
const { columns: E } = l.value.store.states, R = E.value.findIndex((D) => D.type === "default"), W = c.value && w.cellIndex === R, K = tr(w, W), H = {
|