11 lines
4.8 KiB
JavaScript
11 lines
4.8 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/simple-address/simple-address"],{1448:function(t,e,i){"use strict";i.r(e);var a=i("a66d"),n=i("c1cb");for(var u in n)"default"!==u&&function(t){i.d(e,t,(function(){return n[t]}))}(u);i("8644");var l,r=i("f0c5"),c=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"6db27b65",null,!1,a["a"],l);e["default"]=c.exports},8644:function(t,e,i){"use strict";var a=i("c960"),n=i.n(a);n.a},a66d:function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return u})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement;t._self._c},u=[]},c1cb:function(t,e,i){"use strict";i.r(e);var a=i("dbd1"),n=i.n(a);for(var u in a)"default"!==u&&function(t){i.d(e,t,(function(){return a[t]}))}(u);e["default"]=n.a},c960:function(t,e,i){},dbd1:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=l(i("aef3")),n=l(i("0cc9")),u=l(i("c15b"));function l(t){return t&&t.__esModule?t:{default:t}}var r={name:"simpleAddress",props:{mode:{type:String,default:"default"},animation:{type:Boolean,default:!0},type:{type:String,default:"bottom"},maskClick:{type:Boolean,default:!0},show:{type:Boolean,default:!0},maskBgColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},themeColor:{type:String,default:""},cancelColor:{type:String,default:""},confirmColor:{type:String,default:""},fontSize:{type:String,default:"28rpx"},btnFontSize:{type:String,default:""},pickerValueDefault:{type:Array,default:function(){return[0,0,0]}}},data:function(){return{ani:"",showPopup:!1,pickerValue:[0,0,0],provinceDataList:[],cityDataList:[],areaDataList:[]}},watch:{show:function(t){t?this.open():this.close()},pickerValueDefault:function(){this.init()}},created:function(){this.init()},methods:{init:function(){this.handPickValueDefault(),this.provinceDataList=a.default,this.cityDataList=n.default[this.pickerValueDefault[0]],this.areaDataList=u.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]],this.pickerValue=this.pickerValueDefault},handPickValueDefault:function(){this.pickerValueDefault!==[0,0,0]&&(this.pickerValueDefault[0]>a.default.length-1&&(this.pickerValueDefault[0]=a.default.length-1),this.pickerValueDefault[1]>n.default[this.pickerValueDefault[0]].length-1&&(this.pickerValueDefault[1]=n.default[this.pickerValueDefault[0]].length-1),this.pickerValueDefault[2]>u.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length-1&&(this.pickerValueDefault[2]=u.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length-1))},pickerChange:function(t){var e=t.detail.value;this.pickerValue[0]!==e[0]?(this.cityDataList=n.default[e[0]],this.areaDataList=u.default[e[0]][0],e[1]=0,e[2]=0):this.pickerValue[1]!==e[1]&&(this.areaDataList=u.default[e[0]][e[1]],e[2]=0),this.pickerValue=e,this._$emit("onChange")},_$emit:function(t){var e={label:this._getLabel(),value:this.pickerValue,cityCode:this._getCityCode(),areaCode:this._getAreaCode(),provinceCode:this._getProvinceCode(),labelArr:this._getLabel().split("-")};this.$emit(t,e)},_getLabel:function(){var t=this.provinceDataList[this.pickerValue[0]].label+"-"+this.cityDataList[this.pickerValue[1]].label+"-"+this.areaDataList[this.pickerValue[2]].label;return t},_getCityCode:function(){return this.cityDataList[this.pickerValue[1]].value},_getProvinceCode:function(){return this.provinceDataList[this.pickerValue[0]].value},_getAreaCode:function(){return this.areaDataList[this.pickerValue[2]].value},queryIndex:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",i=a.default.findIndex((function(i){return i[e]==t[0]})),l=n.default[i].findIndex((function(i){return i[e]==t[1]})),r=u.default[i][l].findIndex((function(i){return i[e]==t[2]}));return{index:[i,l,r],data:{province:a.default[i],city:n.default[i][l],area:u.default[i][l][r]}}},clear:function(){},hideMask:function(){this._$emit("onCancel"),this.close()},pickerCancel:function(){this._$emit("onCancel"),this.close()},pickerConfirm:function(){this._$emit("onConfirm"),this.close()},open:function(){var t=this;this.showPopup=!0,this.$nextTick((function(){setTimeout((function(){t.ani="simple-"+t.type}),100)}))},close:function(t){var e=this;!this.maskClick&&t||(this.ani="",this.$nextTick((function(){setTimeout((function(){e.showPopup=!1}),300)})))}}};e.default=r}}]);
|
|
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
|
|
'components/simple-address/simple-address-create-component',
|
|
{
|
|
'components/simple-address/simple-address-create-component':(function(module, exports, __webpack_require__){
|
|
__webpack_require__('5486')['createComponent'](__webpack_require__("1448"))
|
|
})
|
|
},
|
|
[['components/simple-address/simple-address-create-component']]
|
|
]);
|