(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/areaWindow/index"],{"0c74":function(e,t,s){"use strict";var i=s("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var d=i(s("af34")),n=s("360a"),r={},l={props:{display:{type:Boolean,default:!0},cityShow:{type:Number,default:3},address:{type:Array|Object,default:[]}},data:function(){return{active:0,addressList:[],selectedArr:[],selectedIndex:-1,is_loading:!1,old:{scrollTop:0},scrollTop:0}},computed:{activeId:function(){return-1==this.selectedIndex?0:this.selectedArr[this.selectedIndex].id},showMore:function(){return!this.selectedArr.length||this.selectedArr[this.selectedArr.length-1].hasOwnProperty("children")&&(1==this.cityShow&&this.addressList.level<2||2==this.cityShow&&this.addressList.level<3||3==this.cityShow&&this.addressList.level<4)}},watch:{address:function(e){this.selectedArr=e?(0,d.default)(e):[]},display:function(e){e?this.loadAddress(0):(this.addressList=[],this.selectedArr=this.address?(0,d.default)(this.address):[],this.selectedIndex=-1,this.is_loading=!1)}},mounted:function(){this.loadAddress(0)},methods:{change:function(e,t){this.selectedIndex!=t&&(-1===e&&(e=this.selectedArr.length?this.selectedArr[this.selectedArr.length-1].id:0),this.selectedIndex=t,this.loadAddress(e))},loadAddress:function(e){var t=this;r[e]?this.addressList=r[e]:(this.is_loading=!0,(0,n.getCityData)(e).then((function(s){t.is_loading=!1,r[e]=s.data,t.addressList=s.data})),this.goTop())},selected:function(e){this.is_loading||(this.selectedIndex>-1?(this.selectedArr.splice(this.selectedIndex+1,999),this.selectedArr[this.selectedIndex]=e,this.selectedIndex=-1):e.pid?this.selectedArr.push(e):this.selectedArr=[e],e.hasOwnProperty("children")&&(1==this.cityShow&&this.addressList[0].level<2||2==this.cityShow&&this.addressList[0].level<3||3==this.cityShow&&this.addressList[0].level<4)?this.loadAddress(e.id):(this.$emit("submit",(0,d.default)(this.selectedArr)),this.$emit("changeClose")),this.goTop())},close:function(){this.$emit("changeClose")},scroll:function(e){this.old.scrollTop=e.detail.scrollTop},goTop:function(e){var t=this;this.scrollTop=this.old.scrollTop,this.$nextTick((function(){t.scrollTop=0}))}}};t.default=l},"1a69":function(e,t,s){"use strict";var i=s("c34a"),d=s.n(i);d.a},"7d39":function(e,t,s){"use strict";s.r(t);var i=s("0c74"),d=s.n(i);for(var n in i)["default"].indexOf(n)<0&&function(e){s.d(t,e,(function(){return i[e]}))}(n);t["default"]=d.a},c34a:function(e,t,s){},dd7c:function(e,t,s){"use strict";s.d(t,"b",(function(){return i})),s.d(t,"c",(function(){return d})),s.d(t,"a",(function(){}));var i=function(){var e=this.$createElement;this._self._c},d=[]},e636:function(e,t,s){"use strict";s.r(t);var i=s("dd7c"),d=s("7d39");for(var n in d)["default"].indexOf(n)<0&&function(e){s.d(t,e,(function(){return d[e]}))}(n);s("1a69");var r=s("828b"),l=Object(r["a"])(d["default"],i["b"],i["c"],!1,null,"4bc90c9b",null,!1,i["a"],void 0);t["default"]=l.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/areaWindow/index-create-component',
    {
        'components/areaWindow/index-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("e636"))
        })
    },
    [['components/areaWindow/index-create-component']]
]);
