You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

10 lines
3.2 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/CitySelect"],{"157a":function(t,i,n){},"279b":function(t,i,n){"use strict";n.r(i);var e=n("402c"),c=n.n(e);for(var u in e)"default"!==u&&function(t){n.d(i,t,(function(){return e[t]}))}(u);i["default"]=c.a},"402c":function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=function(){Promise.all([n.e("common/vendor"),n.e("components/uni-popup/uni-popup")]).then(function(){return resolve(n("e0d4"))}.bind(null,n)).catch(n.oe)},c=function(){n.e("components/uni-popup/uni-popup-message").then(function(){return resolve(n("b74e"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/uni-popup/uni-popup-dialog").then(function(){return resolve(n("0e02"))}.bind(null,n)).catch(n.oe)},o={name:"CitySelect",components:{uniPopup:e,uniPopupMessage:c,uniPopupDialog:u},props:["callback","items","defaultValue"],data:function(){return{value:"请选择",show:this.value,province:[],provinceActive:null,city:[],cityActive:null,district:[],districtActive:null,current:0}},watch:{items:function(t){this.province=t},defaultValue:function(t){this.value=t}},mounted:function(){console.log(this),this.value&&(this.value=this.value),this.province=this.items},methods:{open:function(){this.province=this.items,this.provinceActive=null,this.cityActive=null,this.districtActive=null,this.city=[],this.district=[],this.current=0,this.$refs.popup.open()},changeNav:function(t){0==t&&(this.provinceActive=null),1==t&&(this.cityActive=null),2==t&&(this.districtActive=null),this.current=t},selectProvince:function(t){this.provinceActive=this.province[t],this.city=this.province[t].c,this.current=1},selectCity:function(t){this.cityActive=this.city[t],this.district=this.city[t].c,this.current=2},selectDistrict:function(t){this.districtActive=this.district[t],this.value="".concat(this.provinceActive.n," ").concat(this.cityActive.n," ").concat(this.districtActive.n),this.$emit("callback",{province:{id:this.provinceActive.v,name:this.provinceActive.n},city:{id:this.cityActive.v,name:this.cityActive.n},district:{id:this.districtActive.v,name:this.districtActive.n}}),this.$refs.popup.close()}}};i.default=o},"4cd4":function(t,i,n){"use strict";n.r(i);var e=n("5a39"),c=n("279b");for(var u in c)"default"!==u&&function(t){n.d(i,t,(function(){return c[t]}))}(u);n("a0f5");var o,s=n("f0c5"),r=Object(s["a"])(c["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],o);i["default"]=r.exports},"5a39":function(t,i,n){"use strict";n.d(i,"b",(function(){return c})),n.d(i,"c",(function(){return u})),n.d(i,"a",(function(){return e}));var e={uniPopup:function(){return Promise.all([n.e("common/vendor"),n.e("components/uni-popup/uni-popup")]).then(n.bind(null,"e0d4"))}},c=function(){var t=this,i=t.$createElement;t._self._c},u=[]},a0f5:function(t,i,n){"use strict";var e=n("157a"),c=n.n(e);c.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/CitySelect-create-component',
{
'components/CitySelect-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("4cd4"))
})
},
[['components/CitySelect-create-component']]
]);