1212
This commit is contained in:
@@ -38,12 +38,12 @@
|
||||
<picker-view disabled :value="region" @change="bindChange" ref="showHide">
|
||||
<picker-view-column>
|
||||
<view class="center" v-for="(item, index) in areaCodeList" :key="index">
|
||||
{{ item.areaName }}
|
||||
{{ areaNameDf(item) }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<picker-view-column v-if="areaCodeList[areaIndex[0]]&& areaCodeList[areaIndex[0]].childList ">
|
||||
<view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index">
|
||||
{{ item.areaName }}
|
||||
{{ areaNameDf(item) }}
|
||||
</view>
|
||||
</picker-view-column>
|
||||
<!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]">
|
||||
@@ -118,15 +118,17 @@
|
||||
},
|
||||
created() {
|
||||
|
||||
console.log('%c 子组件参数↓','font-size:30px;color:red')
|
||||
console.log('%c 子组件参数↓','font-size:30px;color:red');
|
||||
|
||||
},
|
||||
mounted() {
|
||||
if(this.areaCodeList1.length == 0){
|
||||
this.areaCodeList = uni.getStorageSync('areaCodeList') || []
|
||||
this.areaCodeList = uni.getStorageSync('areaCodeList') || [];
|
||||
}else{
|
||||
this.areaCodeList = this.areaCodeList1
|
||||
}
|
||||
this.areaCodeList.unshift({areaName:'全部'})
|
||||
this.areaCodeList.unshift({areaName:'全部'});
|
||||
console.log(this.areaCodeList,'==')
|
||||
this.$forceUpdate();
|
||||
},
|
||||
computed: {
|
||||
@@ -152,6 +154,9 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
areaNameDf(e){
|
||||
return e.areaName
|
||||
},
|
||||
//选择值改变事件 省市区级联选择
|
||||
bindChange(e,ccc) {
|
||||
// 用于对比滑动的是哪一列数据
|
||||
|
||||
Reference in New Issue
Block a user