mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
86fc4eb695
Former-commit-id: 227ec9664fa803a11a731cf5336437c497f17066
2 lines
21 KiB
JavaScript
2 lines
21 KiB
JavaScript
"61:function(e,t,i){\"use strict\";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i(\"div\",{directives:[{name:\"clickoutside\",rawName:\"v-clickoutside\",value:e.handleClose,expression:\"handleClose\"}],staticClass:\"el-select\",class:[e.selectSize?\"el-select--\"+e.selectSize:\"\"],on:{click:function(t){return t.stopPropagation(),e.toggleMenu(t)}}},[e.multiple?i(\"div\",{ref:\"tags\",staticClass:\"el-select__tags\",style:{\"max-width\":e.inputWidth-32+\"px\",width:\"100%\"}},[e.collapseTags&&e.selected.length?i(\"span\",[i(\"el-tag\",{attrs:{closable:!e.selectDisabled,size:e.collapseTagSize,hit:e.selected[0].hitState,type:\"info\",\"disable-transitions\":\"\"},on:{close:function(t){e.deleteTag(t,e.selected[0])}}},[i(\"span\",{staticClass:\"el-select__tags-text\"},[e._v(e._s(e.selected[0].currentLabel))])]),e.selected.length>1?i(\"el-tag\",{attrs:{closable:!1,size:e.collapseTagSize,type:\"info\",\"disable-transitions\":\"\"}},[i(\"span\",{staticClass:\"el-select__tags-text\"},[e._v(\"+ \"+e._s(e.selected.length-1))])]):e._e()],1):e._e(),e.collapseTags?e._e():i(\"transition-group\",{on:{\"after-leave\":e.resetInputHeight}},e._l(e.selected,(function(t){return i(\"el-tag\",{key:e.getValueKey(t),attrs:{closable:!e.selectDisabled,size:e.collapseTagSize,hit:t.hitState,type:\"info\",\"disable-transitions\":\"\"},on:{close:function(i){e.deleteTag(i,t)}}},[i(\"span\",{staticClass:\"el-select__tags-text\"},[e._v(e._s(t.currentLabel))])])})),1),e.filterable?i(\"input\",{directives:[{name:\"model\",rawName:\"v-model\",value:e.query,expression:\"query\"}],ref:\"input\",staticClass:\"el-select__input\",class:[e.selectSize?\"is-\"+e.selectSize:\"\"],style:{\"flex-grow\":\"1\",width:e.inputLength/(e.inputWidth-32)+\"%\",\"max-width\":e.inputWidth-42+\"px\"},attrs:{type:\"text\",disabled:e.selectDisabled,autocomplete:e.autoComplete||e.autocomplete},domProps:{value:e.query},on:{focus:e.handleFocus,blur:function(t){e.softFocus=!1},keyup:e.managePlaceholder,keydown:[e.resetInputState,function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"down\",40,t.key,[\"Down\",\"ArrowDown\"]))return null;t.preventDefault(),e.navigateOptions(\"next\")},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"up\",38,t.key,[\"Up\",\"ArrowUp\"]))return null;t.preventDefault(),e.navigateOptions(\"prev\")},function(t){return!(\"button\"in t)&&e._k(t.keyCode,\"enter\",13,t.key,\"Enter\")?null:(t.preventDefault(),e.selectOption(t))},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"esc\",27,t.key,[\"Esc\",\"Escape\"]))return null;t.stopPropagation(),t.preventDefault(),e.visible=!1},function(t){return!(\"button\"in t)&&e._k(t.keyCode,\"delete\",[8,46],t.key,[\"Backspace\",\"Delete\",\"Del\"])?null:e.deletePrevTag(t)},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"tab\",9,t.key,\"Tab\"))return null;e.visible=!1}],compositionstart:e.handleComposition,compositionupdate:e.handleComposition,compositionend:e.handleComposition,input:[function(t){t.target.composing||(e.query=t.target.value)},e.debouncedQueryChange]}}):e._e()],1):e._e(),i(\"el-input\",{ref:\"reference\",class:{\"is-focus\":e.visible},attrs:{type:\"text\",placeholder:e.currentPlaceholder,name:e.name,id:e.id,autocomplete:e.autoComplete||e.autocomplete,size:e.selectSize,disabled:e.selectDisabled,readonly:e.readonly,\"validate-event\":!1,tabindex:e.multiple&&e.filterable?\"-1\":null},on:{focus:e.handleFocus,blur:e.handleBlur,input:e.debouncedOnInputChange},nativeOn:{keydown:[function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"down\",40,t.key,[\"Down\",\"ArrowDown\"]))return null;t.stopPropagation(),t.preventDefault(),e.navigateOptions(\"next\")},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"up\",38,t.key,[\"Up\",\"ArrowUp\"]))return null;t.stopPropagation(),t.preventDefault(),e.navigateOptions(\"prev\")},function(t){return!(\"button\"in t)&&e._k(t.keyCode,\"enter\",13,t.key,\"Enter\")?null:(t.preventDefault(),e.selectOption(t))},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"esc\",27,t.key,[\"Esc\",\"Escape\"]))return null;t.stopPropagation(),t.preventDefault(),e.visible=!1},function(t){if(!(\"button\"in t)&&e._k(t.keyCode,\"tab\",9,t.key,\"Tab\"))return null;e.visible=!1}],mouseenter:function(t){e.inputHovering=!0},mouseleave:function(t){e.inputHovering=!1}},model:{value:e.selectedLabel,callback:function(t){e.selectedLabel=t},expression:\"selectedLabel\"}},[e.$slots.prefix?i(\"template\",{slot:\"prefix\"},[e._t(\"prefix\")],2):e._e(),i(\"template\",{slot:\"suffix\"},[i(\"i\",{directives:[{name:\"show\",rawName:\"v-show\",value:!e.showClose,expression:\"!showClose\"}],class:[\"el-select__caret\",\"el-input__icon\",\"el-icon-\"+e.iconClass]}),e.showClose?i(\"i\",{staticClass:\"el-select__caret el-input__icon el-icon-circle-close\",on:{click:e.handleClearClick}}):e._e()])],2),i(\"transition\",{attrs:{name:\"el-zoom-in-top\"},on:{\"before-enter\":e.handleMenuEnter,\"after-leave\":e.doDestroy}},[i(\"el-select-menu\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.visible&&!1!==e.emptyText,expression:\"visible && emptyText !== false\"}],ref:\"popper\",attrs:{\"append-to-body\":e.popperAppendToBody}},[i(\"el-scrollbar\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.options.length>0&&!e.loading,expression:\"options.length > 0 && !loading\"}],ref:\"scrollbar\",class:{\"is-empty\":!e.allowCreate&&e.query&&0===e.filteredOptionsCount},attrs:{tag:\"ul\",\"wrap-class\":\"el-select-dropdown__wrap\",\"view-class\":\"el-select-dropdown__list\"}},[e.showNewOption?i(\"el-option\",{attrs:{value:e.query,created:\"\"}}):e._e(),e._t(\"default\")],2),e.emptyText&&(!e.allowCreate||e.loading||e.allowCreate&&0===e.options.length)?[e.$slots.empty?e._t(\"empty\"):i(\"p\",{staticClass:\"el-select-dropdown__empty\"},[e._v(\"\\n \"+e._s(e.emptyText)+\"\\n \")])]:e._e()],2)],1)],1)},s=[];n._withStripped=!0;var r=i(4),a=i.n(r),o=i(22),l=i.n(o),c=i(6),u=i.n(c),h=i(10),d=i.n(h),p=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i(\"div\",{staticClass:\"el-select-dropdown el-popper\",class:[{\"is-multiple\":e.$parent.multiple},e.popperClass],style:{minWidth:e.minWidth}},[e._t(\"default\")],2)},f=[];p._withStripped=!0;var m=i(5),v=i.n(m),g={name:\"ElSelectDropdown\",componentName:\"ElSelectDropdown\",mixins:[v.a],props:{placement:{default:\"bottom-start\"},boundariesPadding:{default:0},popperOptions:{default:function(){return{gpuAcceleration:!1}}},visibleArrow:{default:!0},appendToBody:{type:Boolean,default:!0}},data:function(){return{minWidth:\"\"}},computed:{popperClass:function(){return this.$parent.popperClass}},watch:{\"$parent.inputWidth\":function(){this.minWidth=this.$parent.$el.getBoundingClientRect().width+\"px\"}},mounted:function(){var e=this;this.referenceElm=this.$parent.$refs.reference.$el,this.$parent.popperElm=this.popperElm=this.$el,this.$on(\"updatePopper\",(function(){e.$parent.visible&&e.updatePopper()})),this.$on(\"destroyPopper\",this.destroyPopper)}},b=g,y=i(0),_=Object(y[\"a\"])(b,p,f,!1,null,null,null);_.options.__file=\"packages/select/src/select-dropdown.vue\";var x=_.exports,C=i(33),w=i(37),k=i.n(w),S=i(15),D=i.n(S),$=i(18),O=i.n($),E=i(12),T=i.n(E),P=i(16),M=i(31),N=i.n(M),I=i(3),j={data:function(){return{hoverOption:-1}},computed:{optionsAllDisabled:function(){return this.options.filter((function(e){return e.visible})).every((function(e){return e.disabled}))}},watch:{hoverIndex:function(e){var t=this;\"number\"===typeof e&&e>-1&&(this.hoverOption=this.options[e]||{}),this.options.forEach((function(e){e.hover=t.hoverOption===e}))}},methods:{navigateOptions:function(e){var t=this;if(this.visible){if(0!==this.options.length&&0!==this.filteredOptionsCount&&!this.optionsAllDisabled){\"next\"===e?(this.hoverIndex++,this.hoverIndex===this.options.length&&(this.hoverIndex=0)):\"prev\"===e&&(this.hoverIndex--,this.hoverIndex<0&&(this.hoverIndex=this.options.length-1));var i=this.options[this.hoverIndex];!0!==i.disabled&&!0!==i.groupDisabled&&i.visible||this.navigateOptions(e),this.$nextTick((function(){return t.scrollToOption(t.hoverOption)}))}}else this.visible=!0}}},F=i(21),L={mixins:[a.a,u.a,l()(\"reference\"),j],name:\"ElSelect\",componentName:\"ElSelect\",inject:{elForm:{default:\"\"},elFormItem:{default:\"\"}},provide:function(){return{select:this}},computed:{_elFormItemSize:function(){return(this.elFormItem||{}).elFormItemSize},readonly:function(){return!this.filterable||this.multiple||!Object(I[\"isIE\"])()&&!Object(I[\"isEdge\"])()&&!this.visible},showClose:function(){var e=this.multiple?Array.isArray(this.value)&&this.value.length>0:void 0!==this.value&&null!==this.value&&\"\"!==this.value,t=this.clearable&&!this.selectDisabled&&this.inputHovering&&e;return t},iconClass:function(){return this.remote&&this.filterable?\"\":this.visible?\"arrow-up is-reverse\":\"arrow-up\"},debounce:function(){return this.remote?300:0},emptyText:function(){return this.loading?this.loadingText||this.t(\"el.select.loading\"):(!this.remote||\"\"!==this.query||0!==this.options.length)&&(this.filterable&&this.query&&this.options.length>0&&0===this.filteredOptionsCount?this.noMatchText||this.t(\"el.select.noMatch\"):0===this.options.length?this.noDataText||this.t(\"el.select.noData\"):null)},showNewOption:function(){var e=this,t=this.options.filter((function(e){return!e.created})).some((function(t){return t.currentLabel===e.query}));return this.filterable&&this.allowCreate&&\"\"!==this.query&&!t},selectSize:function(){return this.size||this._elFormItemSize||(this.$ELEMENT||{}).size},selectDisabled:function(){return this.disabled||(this.elForm||{}).disabled},collapseTagSize:function(){return[\"small\",\"mini\"].indexOf(this.selectSize)>-1?\"mini\":\"small\"},propPlaceholder:function(){return\"undefined\"!==typeof this.placeholder?this.placeholder:this.t(\"el.select.placeholder\")}},components:{ElInput:d.a,ElSelectMenu:x,ElOption:C[\"a\"],ElTag:k.a,ElScrollbar:D.a},directives:{Clickoutside:T.a},props:{name:String,id:String,value:{required:!0},autocomplete:{type:String,default:\"off\"},autoComplete:{type:String,validator:function(e){return!0}},automaticDropdown:Boolean,size:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:String,remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String,required:!1},defaultFirstOption:Boolean,reserveKeyword:Boolean,valueKey:{type:String,default:\"value\"},collapseTags:Boolean,popperAppendToBody:{type:Boolean,default:!0}},data:function(){return{options:[],cachedOptions:[],createdLabel:null,createdSelected:!1,selected:this.multiple?[]:{},inputLength:20,inputWidth:0,initialInputHeight:0,cachedPlaceHolder:\"\",optionsCount:0,filteredOptionsCount:0,visible:!1,softFocus:!1,selectedLabel:\"\",hoverIndex:-1,query:\"\",previousQuery:null,inputHovering:!1,currentPlaceholder:\"\",menuVisibleOnFocus:!1,isOnComposition:!1,isSilentBlur:!1}},watch:{selectDisabled:function(){var e=this;this.$nextTick((function(){e.resetInputHeight()}))},propPlaceholder:function(e){this.cachedPlaceHolder=this.currentPlaceholder=e},value:function(e,t){this.multiple&&(this.resetInputHeight(),e&&e.length>0||this.$refs.input&&\"\"!==this.query?this.currentPlaceholder=\"\":this.currentPlaceholder=this.cachedPlaceHolder,this.filterable&&!this.reserveKeyword&&(this.query=\"\",this.handleQueryChange(this.query))),this.setSelected(),this.filterable&&!this.multiple&&(this.inputLength=20),Object(I[\"valueEquals\"])(e,t)||this.dispatch(\"ElFormItem\",\"el.form.change\",e)},visible:function(e){var t=this;e?(this.broadcast(\"ElSelectDropdown\",\"updatePopper\"),this.filterable&&(this.query=this.remote?\"\":this.selectedLabel,this.handleQueryChange(this.query),this.multiple?this.$refs.input.focus():(this.remote||(this.broadcast(\"ElOption\",\"queryChange\",\"\"),this.broadcast(\"ElOptionGroup\",\"queryChange\")),this.selectedLabel&&(this.currentPlaceholder=this.selectedLabel,this.selectedLabel=\"\")))):(this.broadcast(\"ElSelectDropdown\",\"destroyPopper\"),this.$refs.input&&this.$refs.input.blur(),this.query=\"\",this.previousQuery=null,this.selectedLabel=\"\",this.inputLength=20,this.menuVisibleOnFocus=!1,this.resetHoverIndex(),this.$nextTick((function(){t.$refs.input&&\"\"===t.$refs.input.value&&0===t.selected.length&&(t.currentPlaceholder=t.cachedPlaceHolder)})),this.multiple||(this.selected&&(this.filterable&&this.allowCreate&&this.createdSelected&&this.createdLabel?this.selectedLabel=this.createdLabel:this.selectedLabel=this.selected.currentLabel,this.filterable&&(this.query=this.selectedLabel)),this.filterable&&(this.currentPlaceholder=this.cachedPlaceHolder))),this.$emit(\"visible-change\",e)},options:function(){var e=this;if(!this.$isServer){this.$nextTick((function(){e.broadcast(\"ElSelectDropdown\",\"updatePopper\")})),this.multiple&&this.resetInputHeight();var t=this.$el.querySelectorAll(\"input\");-1===[].indexOf.call(t,document.activeElement)&&this.setSelected(),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()}}},methods:{handleComposition:function(e){var t=this,i=e.target.value;if(\"compositionend\"===e.type)this.isOnComposition=!1,this.$nextTick((function(e){return t.handleQueryChange(i)}));else{var n=i[i.length-1]||\"\";this.isOnComposition=!Object(F[\"isKorean\"])(n)}},handleQueryChange:function(e){var t=this;this.previousQuery===e||this.isOnComposition||(null!==this.previousQuery||\"function\"!==typeof this.filterMethod&&\"function\"!==typeof this.remoteMethod?(this.previousQuery=e,this.$nextTick((function(){t.visible&&t.broadcast(\"ElSelectDropdown\",\"updatePopper\")})),this.hoverIndex=-1,this.multiple&&this.filterable&&this.$nextTick((function(){var e=15*t.$refs.input.value.length+20;t.inputLength=t.collapseTags?Math.min(50,e):e,t.managePlaceholder(),t.resetInputHeight()})),this.remote&&\"function\"===typeof this.remoteMethod?(this.hoverIndex=-1,this.remoteMethod(e)):\"function\"===typeof this.filterMethod?(this.filterMethod(e),this.broadcast(\"ElOptionGroup\",\"queryChange\")):(this.filteredOptionsCount=this.optionsCount,this.broadcast(\"ElOption\",\"queryChange\",e),this.broadcast(\"ElOptionGroup\",\"queryChange\")),this.defaultFirstOption&&(this.filterable||this.remote)&&this.filteredOptionsCount&&this.checkDefaultFirstOption()):this.previousQuery=e)},scrollToOption:function(e){var t=Array.isArray(e)&&e[0]?e[0].$el:e.$el;if(this.$refs.popper&&t){var i=this.$refs.popper.$el.querySelector(\".el-select-dropdown__wrap\");N()(i,t)}this.$refs.scrollbar&&this.$refs.scrollbar.handleScroll()},handleMenuEnter:function(){var e=this;this.$nextTick((function(){return e.scrollToOption(e.selected)}))},emitChange:function(e){Object(I[\"valueEquals\"])(this.value,e)||this.$emit(\"change\",e)},getOption:function(e){for(var t=void 0,i=\"[object object]\"===Object.prototype.toString.call(e).toLowerCase(),n=\"[object null]\"===Object.prototype.toString.call(e).toLowerCase(),s=\"[object undefined]\"===Object.prototype.toString.call(e).toLowerCase(),r=this.cachedOptions.length-1;r>=0;r--){var a=this.cachedOptions[r],o=i?Object(I[\"getValueByPath\"])(a.value,this.valueKey)===Object(I[\"getValueByPath\"])(e,this.valueKey):a.value===e;if(o){t=a;break}}if(t)return t;var l=i||n||s?\"\":String(e),c={value:e,currentLabel:l};return this.multiple&&(c.hitState=!1),c},setSelected:function(){var e=this;if(!this.multiple){var t=this.getOption(this.value);return t.created?(this.createdLabel=t.currentLabel,this.createdSelected=!0):this.createdSelected=!1,this.selectedLabel=t.currentLabel,this.selected=t,void(this.filterable&&(this.query=this.selectedLabel))}var i=[];Array.isArray(this.value)&&this.value.forEach((function(t){i.push(e.getOption(t))})),this.selected=i,this.$nextTick((function(){e.resetInputHeight()}))},handleFocus:function(e){this.softFocus?this.softFocus=!1:((this.automaticDropdown||this.filterable)&&(this.visible=!0,this.filterable&&(this.menuVisibleOnFocus=!0)),this.$emit(\"focus\",e))},blur:function(){this.visible=!1,this.$refs.reference.blur()},handleBlur:function(e){var t=this;setTimeout((function(){t.isSilentBlur?t.isSilentBlur=!1:t.$emit(\"blur\",e)}),50),this.softFocus=!1},handleClearClick:function(e){this.deleteSelected(e)},doDestroy:function(){this.$refs.popper&&this.$refs.popper.doDestroy()},handleClose:function(){this.visible=!1},toggleLastOptionHitState:function(e){if(Array.isArray(this.selected)){var t=this.selected[this.selected.length-1];if(t)return!0===e||!1===e?(t.hitState=e,e):(t.hitState=!t.hitState,t.hitState)}},deletePrevTag:function(e){if(e.target.value.length<=0&&!this.toggleLastOptionHitState()){var t=this.value.slice();t.pop(),this.$emit(\"input\",t),this.emitChange(t)}},managePlaceholder:function(){\"\"!==this.currentPlaceholder&&(this.currentPlaceholder=this.$refs.input.value?\"\":this.cachedPlaceHolder)},resetInputState:function(e){8!==e.keyCode&&this.toggleLastOptionHitState(!1),this.inputLength=15*this.$refs.input.value.length+20,this.resetInputHeight()},resetInputHeight:function(){var e=this;this.collapseTags&&!this.filterable||this.$nextTick((function(){if(e.$refs.reference){var t=e.$refs.reference.$el.childNodes,i=[].filter.call(t,(function(e){return\"INPUT\"===e.tagName}))[0],n=e.$refs.tags,s=n?Math.round(n.getBoundingClientRect().height):0,r=e.initialInputHeight||40;i.style.height=0===e.selected.length?r+\"px\":Math.max(n?s+(s>r?6:0):0,r)+\"px\",e.visible&&!1!==e.emptyText&&e.broadcast(\"ElSelectDropdown\",\"updatePopper\")}}))},resetHoverIndex:function(){var e=this;setTimeout((function(){e.multiple?e.selected.length>0?e.hoverIndex=Math.min.apply(null,e.selected.map((function(t){return e.options.indexOf(t)}))):e.hoverIndex=-1:e.hoverIndex=e.options.indexOf(e.selected)}),300)},handleOptionSelect:function(e,t){var i=this;if(this.multiple){var n=(this.value||[]).slice(),s=this.getValueIndex(n,e.value);s>-1?n.splice(s,1):(this.multipleLimit<=0||n.length<this.multipleLimit)&&n.push(e.value),this.$emit(\"input\",n),this.emitChange(n),e.created&&(this.query=\"\",this.handleQueryChange(\"\"),this.inputLength=20),this.filterable&&this.$refs.input.focus()}else this.$emit(\"input\",e.value),this.emitChange(e.value),this.visible=!1;this.isSilentBlur=t,this.setSoftFocus(),this.visible||this.$nextTick((function(){i.scrollToOption(e)}))},setSoftFocus:function(){this.softFocus=!0;var e=this.$refs.input||this.$refs.reference;e&&e.focus()},getValueIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],i=\"[object object]\"===Object.prototype.toString.call(t).toLowerCase();if(i){var n=this.valueKey,s=-1;return e.some((function(e,i){return Object(I[\"getValueByPath\"])(e,n)===Object(I[\"getValueByPath\"])(t,n)&&(s=i,!0)})),s}return e.indexOf(t)},toggleMenu:function(){this.selectDisabled||(this.menuVisibleOnFocus?this.menuVisibleOnFocus=!1:this.visible=!this.visible,this.visible&&(this.$refs.input||this.$refs.reference).focus())},selectOption:function(){this.visible?this.options[this.hoverIndex]&&this.handleOptionSelect(this.options[this.hoverIndex]):this.toggleMenu()},deleteSelected:function(e){e.stopPropagation();var t=this.multiple?[]:\"\";this.$emit(\"input\",t),this.emitChange(t),this.visible=!1,this.$emit(\"clear\")},deleteTag:function(e,t){var i=this.selected.indexOf(t);if(i>-1&&!this.selectDisabled){var n=this.value.slice();n.splice(i,1),this.$emit(\"input\",n),this.emitChange(n),this.$emit(\"remove-tag\",t.value)}e.stopPropagation()},onInputChange:function(){this.filterable&&this.query!==this.selectedLabel&&(this.query=this.selectedLabel,this.handleQueryChange(this.query))},onOptionDestroy:function(e){e>-1&&(this.optionsCount--,this.filteredOptionsCount--,this.options.splice(e,1))},resetInputWidth:function(){this.inputWidth=this.$refs.reference.$el.getBoundingClientRect().width},handleResize:function(){this.resetInputWidth(),this.multiple&&this.resetInputHeight()},checkDefaultFirstOption:function(){this.hoverIndex=-1;for(var e=!1,t=this.options.length-1;t>=0;t--)if(this.options[t].created){e=!0,this.hoverIndex=t;break}if(!e)for(var i=0;i!==this.options.length;++i){var n=this.options[i];if(this.query){if(!n.disabled&&!n.groupDisabled&&n.visible){this.hoverIndex=i;break}}else if(n.itemSelected){this.hoverIndex=i;break}}},getValueKey:function(e){return\"[object object]\"!==Object.prototype.toString.call(e.value).toLowerCase()?e.value:Object(I[\"getValueByPath\"])(e.value,this.valueKey)}},created:function(){var e=this;this.cachedPlaceHolder=this.currentPlaceholder=this.propPlaceholder,this.multiple&&!Array.isArray(this.value)&&this.$emit(\"input\",[]),!this.multiple&&Array.isArray(this.value)&&this.$emit(\"input\",\"\"),this.debouncedOnInputChange=O()(this.debounce,(function(){e.onInputChange()})),this.debouncedQueryChange=O()(this.debounce,(function(t){e.handleQueryChange(t.target.value)})),this.$on(\"handleOptionClick\",this.handleOptionSelect),this.$on(\"setSelected\",this.setSelected)},mounted:function(){var e=this;this.multiple&&Array.isArray(this.value)&&this.value.length>0&&(this.currentPlaceholder=\"\"),Object(P[\"addResizeListener\"])(this.$el,this.handleResize);var t=this.$refs.reference;if(t&&t.$el){var i={medium:36,small:32,mini:28},n=t.$el.querySelector(\"input\");this.initialInputHeight=n.getBoundingClientRect().height||i[this.selectSize]}this.remote&&this.multiple&&this.resetInputHeight(),this.$nextTick((function(){t&&t.$el&&(e.inputWidth=t.$el.getBoundingClientRect().width)})),this.setSelected()},beforeDestroy:function(){this.$el&&this.handleResize&&Object(P[\"removeResizeListener\"])(this.$el,this.handleResize)}},A=L,V=Object(y[\"a\"])(A,n,s,!1,null,null,null);V.options.__file=\"packages/select/src/select.vue\";var B=V.exports;B.install=function(e){e.component(B.name,B)};t[\"default\"]=B}";
|