|
@@ -79,7 +79,7 @@ export default {
|
|
|
pickerValueDefault: {
|
|
|
type: Array,
|
|
|
default(){
|
|
|
- return [0, 0, 0]
|
|
|
+ return [16, 6, 0]
|
|
|
}
|
|
|
},
|
|
|
/* 主题色 */
|
|
@@ -96,7 +96,8 @@ export default {
|
|
|
//console.log('省'+JSON.stringify(provinceData));
|
|
|
//console.log('市'+JSON.stringify(cityData));
|
|
|
//console.log('区'+JSON.stringify(areaData));
|
|
|
- //console.log('mpvueCityPicker init')
|
|
|
+
|
|
|
+ console.log('mpvueCityPicker init'+JSON.stringify(this.pickerValueDefault))
|
|
|
if(this.pickerValueDefault.length == 0)
|
|
|
this.pickerValueDefault = [16,6,0];
|
|
|
this.handPickValueDefault(); // 对 pickerValueDefault 做兼容处理
|
|
@@ -199,6 +200,12 @@ export default {
|
|
|
this.$emit(emitName, pickObj);
|
|
|
},
|
|
|
_getLabel() {
|
|
|
+ if(this.pickerValue[0]>=this.provinceDataList.length)
|
|
|
+ return;
|
|
|
+ if(this.pickerValue[1]>=this.cityDataList.length)
|
|
|
+ return;
|
|
|
+ if(this.pickerValue[2]>=this.areaDataList.length)
|
|
|
+ return;
|
|
|
let pcikerLabel =
|
|
|
this.provinceDataList[this.pickerValue[0]].label +
|
|
|
'-' +
|
|
@@ -208,6 +215,12 @@ export default {
|
|
|
return pcikerLabel;
|
|
|
},
|
|
|
_getCityCode() {
|
|
|
+ if(this.pickerValue[0]>=this.provinceDataList.length)
|
|
|
+ return;
|
|
|
+ if(this.pickerValue[1]>=this.cityDataList.length)
|
|
|
+ return;
|
|
|
+ if(this.pickerValue[2]>=this.areaDataList.length)
|
|
|
+ return;
|
|
|
return this.areaDataList[this.pickerValue[2]].value;
|
|
|
}
|
|
|
}
|