(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-select/tn-select"],{494:function(e,t,l){"use strict";l.r(t);var n=l(495),a=l(497);for(var i in a)["default"].indexOf(i)<0&&function(e){l.d(t,e,(function(){return a[e]}))}(i);l(499);var u,s=l(42),o=Object(s["default"])(a["default"],n["render"],n["staticRenderFns"],!1,null,"a65b9b48",null,!1,n["components"],u);o.options.__file="tuniao-ui/components/tn-select/tn-select.vue",t["default"]=o.exports},495:function(e,t,l){"use strict";l.r(t);var n=l(496);l.d(t,"render",(function(){return n["render"]})),l.d(t,"staticRenderFns",(function(){return n["staticRenderFns"]})),l.d(t,"recyclableRender",(function(){return n["recyclableRender"]})),l.d(t,"components",(function(){return n["components"]}))},496:function(e,t,l){"use strict";var n;l.r(t),l.d(t,"render",(function(){return a})),l.d(t,"staticRenderFns",(function(){return u})),l.d(t,"recyclableRender",(function(){return i})),l.d(t,"components",(function(){return n}));try{n={tnPopup:function(){return Promise.all([l.e("common/vendor"),l.e("tuniao-ui/components/tn-popup/tn-popup")]).then(l.bind(null,391))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var a=function(){var e=this,t=e.$createElement;e._self._c},i=!1,u=[];a._withStripped=!0},497:function(e,t,l){"use strict";l.r(t);var n=l(498),a=l.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){l.d(t,e,(function(){return n[e]}))}(i);t["default"]=a.a},498:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"tn-select",props:{value:{type:Boolean,default:!1},mode:{type:String,default:"single"},list:{type:Array,default:function(){return[]}},valueName:{type:String,default:"value"},labelName:{type:String,default:"label"},childName:{type:String,default:"children"},defaultValue:{type:Array,default:function(){return[0]}},title:{type:String,default:""},cancelText:{type:String,default:"取消"},cancelColor:{type:String,default:""},confirmText:{type:String,default:"确认"},confirmColor:{type:String,default:""},maskCloseable:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},zIndex:{type:Number,default:0},searchShow:{type:Boolean,default:!0},searchPlaceholder:{type:String,default:"搜索"}},computed:{elZIndex:function(){return this.zIndex?this.zIndex:this.$tn.zIndex.popup}},data:function(){return{moving:!1,defaultSelector:[0],columnData:[],selectValue:[],lastSelectIndex:[],columnNum:0}},watch:{value:{handler:function(e){var t=this;e&&setTimeout((function(){return t.init()}),10)},immediate:!0}},methods:{searchInput:function(e){console.log(e.detail.value),this.searchResult(e.detail.value)},search:function(e){console.log(e.detail.value),this.searchResult(e.detail.value)},searchResult:function(e){var t=this,l=[],n=this.list.filter((function(l){return l[t.labelName].indexOf(e)>-1}));n.length>0&&l.push(n),this.columnData=l,this.selectValue=[],this.columnData.length>0&&this.setSelectValue()},pickStart:function(){this.moving=!0},pickEnd:function(){this.moving=!1},init:function(){this.setColumnNum(),this.setDefaultSelector(),this.setColumnData(),this.setSelectValue()},setDefaultSelector:function(){this.defaultSelector=this.defaultValue.length===this.columnNum?this.defaultValue:Array(this.columnNum).fill(0),this.lastSelectIndex=this.$tn.deepClone(this.defaultSelector)},setColumnNum:function(){if("single"===this.mode)this.columnNum=1;else if("multi"===this.mode)this.columnNum=this.list.length;else if("multi-auto"===this.mode){var e=1,t=this.list;while(t[0][this.childName])t=t[0]?t[0][this.childName]:{},e++;this.columnNum=e}},setColumnData:function(){var e=[];if(this.selectValue=[],"multi-auto"===this.mode)for(var t=this.list[this.defaultSelector.length?this.defaultSelector[0]:0],l=0;l0&&void 0!==arguments[0]?arguments[0]:null;this.moving||(e&&this.$emit(e,this.selectValue),this.close())}}};t.default=n},499:function(e,t,l){"use strict";l.r(t);var n=l(500),a=l.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){l.d(t,e,(function(){return n[e]}))}(i);t["default"]=a.a},500:function(e,t,l){}}]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/tuniao-ui/components/tn-select/tn-select.js.map ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'tuniao-ui/components/tn-select/tn-select-create-component', { 'tuniao-ui/components/tn-select/tn-select-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('2')['createComponent'](__webpack_require__(494)) }) }, [['tuniao-ui/components/tn-select/tn-select-create-component']] ]);