/*! no static exports found */function(t,r,n){"use strict";n.r(r);vare=n(/*! -!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./pick-regions.vue?vue&type=script&lang=js& */261),i=n.n(e);for(varcine)"default"!==c&&function(t){n.d(r,t,(function(){returne[t]}))}(c);r["default"]=i.a},261:
/*! no static exports found */function(t,r,n){"use strict";functione(t,r){returno(t)||a(t,r)||c(t,r)||i()}functioni(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionc(t,r){if(t){if("string"===typeoft)returnu(t,r);varn=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,r):void0}}functionu(t,r){(null==r||r>t.length)&&(r=t.length);for(varn=0,e=newArray(r);n<r;n++)e[n]=t[n];returne}functiona(t,r){if("undefined"!==typeofSymbol&&Symbol.iteratorinObject(t)){varn=[],e=!0,i=!1,c=void0;try{for(varu,a=t[Symbol.iterator]();!(e=(u=a.next()).done);e=!0)if(n.push(u.value),r&&n.length===r)break}catch(o){i=!0,c=o}finally{try{e||null==a["return"]||a["return"]()}finally{if(i)throwc}}returnn}}functiono(t){if(Array.isArray(t))returnt}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void0;varl=n(/*! ./regions.json */262),s={props:{defaultRegions:{type:Array,default:function(){return[]}},defaultRegionCode:{type:String},defaultRegion:[String,Array]},data:function(){return{cityArr:l[0].childs,districtArr:l[0].childs[0].childs,multiIndex:[0,0,0],isInitMultiArray:!0}},watch:{defaultRegion:{handler:function(t,r){Array.isArray(t)?(r=r||[],t.join("")!==r.join("")&&this.handleDefaultRegion(t)):t&&6==t.length?this.handleDefaultRegion(t):console.warn("defaultRegion非有效格式")},immediate:!0}},computed:{multiArray:function(){returnthis.pickedArr.map((function(t){returnt.map((function(t){returnt.name}))}))},pickedArr:function(){returnthis.isInitMultiArray?[l,l[0].childs,l[0].childs[0].childs]:[l,this.cityArr,this.districtArr]}},methods:{handleColumnChange:function(t){this.isInitMultiArray=!1;varr=this,n=t.detail.column,e=t.detail.value;r.multiIndex[n]=e;try{switch(n){case0:if(0==l[r.multiIndex[0]].childs.length){r.cityArr=r.districtArr=[l[r.multiIndex[0]]];break}r.cityArr=l[r.multiIndex[0]].childs,r.districtArr=l[r.multiIndex[0]].childs[r.multiIndex[1]].childs;break;case1:r.districtArr=l[r.multiIndex[0]].childs[r.multiIndex[1]].childs;break;case2:break}}catch(t){r.districtArr=l[r.multiIndex[0]].childs[0].childs}},handleValueChange:function(t){varr=e(t.detail.value,3),n=r[0],i=r[1],c=r[2],u=e(this.pickedArr,3),a=u[0],o=u[1],l=u[2],s=[a[n],o[i],l[c]];this.$emit("getRegion",s)},handleDefaultRegion:function(t){varr=!Array.isArray(t);this.isInitMultiArray=!1;for(varn=l,e=0;e<3;e++)for(vari=0;i<n.length;i++){varc=r?n[i].code==t.slice(0,2*(e+1)):n[i].name.includes(t[e]);if(c){n=n[i].childs,0==e?this.cityArr=n:1==e&&(this.districtArr=n),this.$set(this.multiIndex,e,i);break}0==e&&i==n.length-1&&(this.isInitMultiArray=!0)}}}};r.default=s}}]);