(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f04be"],{"9c86":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"clear-fix"},[i("div",{staticClass:"select mui-flex aic fl",on:{click:t.tapShowPicker}},[i("div",{staticClass:"select__text txt-ovh"},[t._v(t._s(t.text))]),"arrow-1"===t.icon?i("div",{staticClass:"icon icon--arrow-1"}):t._e(),"arrow-2"===t.icon?i("i",{staticClass:"icon icon--arrow-2"}):t._e(),"arrow-3"===t.icon?i("div",{staticClass:"icon icon--arrow-3"}):t._e()])])},o=[],l=i("e80b"),c=i.n(l),r="STATUS_LOADING",s={name:"Select",model:{prop:"text",event:"my-change"},props:{icon:{type:String,default:"arrow-1"},title:{type:String,default:""},confirmColor:{type:String,default:"#fdd535"},list:{type:Array,default:function(){return[]}},text:{type:String,default:""},disabled:{type:Boolean,default:!1}},data:function(){return{picker:null}},watch:{list:{handler:function(t,e){this.init()},immediate:!0}},created:function(){},mounted:function(){},methods:{init:function(){var t=this;if(this.picker)this.picker.wheels&&(this.picker.refillColumn(0,this.list),this.picker.scrollColumn(0,this.getIndexByText(this.list,this.text)||0));else{var e=this.list,i=this.title;e=this.loadingStatus(e);for(var n,o=this.picker=new c.a({data:[e],selectedIndex:[0],title:i}),l=0,s=o.wheelEl.length;l<s;l++)n=o.wheelEl[l],n.style.fontSize="16px";o.confirmEl.style.color=this.confirmColor,o.maskEl.addEventListener("click",function(){o.hide()}),o.on("picker.select",function(e,i){if(e[0]!==r){var n=t.getItemByIndex(t.list,i[0]);t.$emit("on-confirm",n),t.$emit("my-change",n.text)}}),o.on("picker.change",function(t,e){}),o.on("picker.valuechange",function(e,i){if(e[0]!==r){var n=t.getItemByIndex(t.list,i[0]);t.$emit("on-select",n)}})}},loadingStatus:function(t){return t&&0===t.length?[{text:"数据正在加载中...",value:r}]:t},getIndexByText:function(t,e){var i=t.length;while(i--)if(t[i].text===e)return i},getItemByIndex:function(t,e){var i=t.length;while(i--)if(i===e)return t[i]},tapShowPicker:function(){var t=this;this.disabled||this.picker.show(function(){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;e<=0&&window.scrollTo(0,1),t.picker.refillColumn(0,t.loadingStatus(t.list)),t.picker.scrollColumn(0,t.getIndexByText(t.list,t.text)||0)})},destroy:function(){var t=this.picker.pickerEl;t.parentNode&&t.parentNode.removeChild(t)}},destroyed:function(){this.destroy()},deactivated:function(){"block"===this.picker.pickerEl.style.display&&this.picker.hide()}},a=s,d=i("6691"),u=Object(d["a"])(a,n,o,!1,null,"0ab387c4",null);e["default"]=u.exports}}]);
//# sourceMappingURL=chunk-2d0f04be.3640ae4a.js.map