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