(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/pick-regions/pick-regions"],{3073:function(i,t,e){"use strict";e.d(t,"b",(function(){return n})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){}));var n=function(){var i=this.$createElement;this._self._c},r=[]},"33a9":function(i,t,e){"use strict";var n=e("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(e("34cf")),s=e("9792"),a={props:{defaultRegions:{type:Array,default:function(){return[]}},defaultRegionCode:{type:String},isArea:{type:Boolean,default:""},defaultRegion:[String,Array]},data:function(){return{cityArr:s[0].childs,districtArr:s[0].childs[0].childs,multiIndex:[0,0,0],isInitMultiArray:!0}},watch:{defaultRegion:{handler:function(i,t){Array.isArray(i)?(t=t||[],i.join("")!==t.join("")&&this.handleDefaultRegion(i)):i&&6==i.length?this.handleDefaultRegion(i):console.warn("defaultRegion非有效格式")},immediate:!0}},computed:{multiArray:function(){return this.pickedArr.map((function(i){return i.map((function(i){return i.name}))}))},pickedArrTwo:function(){return-1==s[0].childs[0].name.indexOf("全部")&&s[0].childs.unshift({name:"全部"}),this.isInitMultiArray?[s,s[0].childs]:[s,this.cityArr]},pickedArr:function(){return this.isArea&&-1!=s[0].childs[0].name.indexOf("全部")&&s[0].childs.splice(0,1),this.isArea||-1!=s[0].childs[0].name.indexOf("全部")||s[0].childs.unshift({name:"全部"}),this.isInitMultiArray?this.isArea?[s,s[0].childs,s[0].childs[0].childs]:[s,s[0].childs]:this.isArea?[s,this.cityArr,this.districtArr]:[s,this.cityArr]}},methods:{handleColumnChange:function(i){this.isInitMultiArray=!1;var t=i.detail.column,e=i.detail.value;this.multiIndex[t]=e;try{switch(t){case 0:if(0==s[this.multiIndex[0]].childs.length){this.cityArr=this.districtArr=[s[this.multiIndex[0]]];break}this.isArea||-1!=s[this.multiIndex[0]].childs[0].name.indexOf("全部")||s[this.multiIndex[0]].childs.unshift({name:"全部"}),this.isArea&&-1!=s[this.multiIndex[0]].childs[0].name.indexOf("全部")&&s[this.multiIndex[0]].childs.splice(0,1),this.cityArr=s[this.multiIndex[0]].childs,this.districtArr=s[this.multiIndex[0]].childs[this.multiIndex[1]].childs;break;case 1:this.districtArr=s[this.multiIndex[0]].childs[this.multiIndex[1]].childs;break;case 2:break}}catch(i){this.districtArr=s[this.multiIndex[0]].childs[0].childs}},handleValueChange:function(i){var t=(0,r.default)(i.detail.value,3),e=t[0],n=t[1],s=t[2],a=(0,r.default)(this.pickedArr,3),l=a[0],d=a[1],c=a[2],u=this.isArea?[l[e],d[n],c[s]]:[l[e],d[n]];this.$emit("getRegion",u)},handleDefaultRegion:function(i){console.log("222",i);var t=!Array.isArray(i);this.isInitMultiArray=!1;for(var e=s,n=0;n<3;n++)for(var r=0;r<e.length;r++){var a=t?e[r].code==i.slice(0,2*(n+1)):e[r].name.includes(i[n]);if(a){e=e[r].childs,0==n?this.cityArr=e:1==n&&(this.districtArr=e),this.$set(this.multiIndex,n,r);break}0==n&&r==e.length-1&&(this.isInitMultiArray=!0)}}}};t.default=a},a65db:function(i,t,e){"use strict";e.r(t);var n=e("3073"),r=e("e841");for(var s in r)["default"].indexOf(s)<0&&function(i){e.d(t,i,(function(){return r[i]}))}(s);var a=e("828b"),l=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=l.exports},e841:function(i,t,e){"use strict";e.r(t);var n=e("33a9"),r=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(i){e.d(t,i,(function(){return n[i]}))}(s);t["default"]=r.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'uni_modules/pick-regions/pick-regions-create-component',
    {
        'uni_modules/pick-regions/pick-regions-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("a65db"))
        })
    },
    [['uni_modules/pick-regions/pick-regions-create-component']]
]);
