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.
high-mini/unpackage/dist/build/mp-weixin/components/mpvue-citypicker/mpvueCityPicker.js

11 lines
3.5 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/mpvue-citypicker/mpvueCityPicker"],{1834:function(t,e,i){},"20b8":function(t,e,i){"use strict";i.r(e);var a=i("9083"),u=i.n(a);for(var l in a)"default"!==l&&function(t){i.d(e,t,(function(){return a[t]}))}(l);e["default"]=u.a},4199:function(t,e,i){"use strict";var a=i("1834"),u=i.n(a);u.a},9083:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(i("28c0")),u=n(i("838f")),l=n(i("0721"));function n(t){return t&&t.__esModule?t:{default:t}}var r={data:function(){return{pickerValue:[0,0,0],provinceDataList:[],cityDataList:[],areaDataList:[],showPicker:!1}},created:function(){this.init()},props:{pickerValueDefault:{type:Array,default:function(){return[0,0,0]}},themeColor:String},watch:{pickerValueDefault:function(){this.init()}},methods:{init:function(){this.handPickValueDefault(),this.provinceDataList=a.default,this.cityDataList=u.default[this.pickerValueDefault[0]],this.areaDataList=l.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]],this.pickerValue=this.pickerValueDefault},show:function(){var t=this;setTimeout((function(){t.showPicker=!0}),0)},maskClick:function(){this.pickerCancel()},pickerCancel:function(){this.showPicker=!1,this._$emit("onCancel")},pickerConfirm:function(t){this.showPicker=!1,this._$emit("onConfirm")},showPickerView:function(){this.showPicker=!0},handPickValueDefault:function(){this.pickerValueDefault!==[0,0,0]&&(this.pickerValueDefault[0]>a.default.length-1&&(this.pickerValueDefault[0]=a.default.length-1),this.pickerValueDefault[1]>u.default[this.pickerValueDefault[0]].length-1&&(this.pickerValueDefault[1]=u.default[this.pickerValueDefault[0]].length-1),this.pickerValueDefault[2]>l.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length-1&&(this.pickerValueDefault[2]=l.default[this.pickerValueDefault[0]][this.pickerValueDefault[1]].length-1))},pickerChange:function(t){var e=t.mp.detail.value;this.pickerValue[0]!==e[0]?(this.cityDataList=u.default[e[0]],this.areaDataList=l.default[e[0]][0],e[1]=0,e[2]=0):this.pickerValue[1]!==e[1]&&(this.areaDataList=l.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()};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.areaDataList[this.pickerValue[2]].value}}};e.default=r},d4a0:function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return l})),i.d(e,"a",(function(){return a}));var u=function(){var t=this,e=t.$createElement;t._self._c},l=[]},d946:function(t,e,i){"use strict";i.r(e);var a=i("d4a0"),u=i("20b8");for(var l in u)"default"!==l&&function(t){i.d(e,t,(function(){return u[t]}))}(l);i("4199");var n,r=i("f0c5"),c=Object(r["a"])(u["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],n);e["default"]=c.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/mpvue-citypicker/mpvueCityPicker-create-component',
{
'components/mpvue-citypicker/mpvueCityPicker-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('543d')['createComponent'](__webpack_require__("d946"))
})
},
[['components/mpvue-citypicker/mpvueCityPicker-create-component']]
]);