This commit is contained in:
caolc
2023-05-08 10:45:07 +08:00
parent 8fd25deedf
commit 1c3e0f9662
27 changed files with 388 additions and 297 deletions

View File

@@ -32,26 +32,20 @@
</text>
</view>
</view> -->
<view class="filter-content-detail" v-show="pickerShow">
<view class="filter-content-detail" v-show="pickerShow&&areaCodeList.length">
<!-- 省市区选择 -->
<view class="region-box" v-if="index==0">
<view class="region-box" v-show="index==0">
<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 }}
<view class="center" v-for="(items, index) in areaCodeList" :key="index">
{{ items.areaName }}
</view>
</picker-view-column>
<picker-view-column>
<view class="center" v-for="(item, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ item.areaName }}
<view class="center" v-for="(items, index) in areaCodeList[areaIndex[0]].childList" :key="index">
{{ items.areaName }}
</view>
</picker-view-column>
<!-- <picker-view-column v-if="areaCodeList[areaIndex[0]]">
<view class="center"
v-for="(item, index) in areaCodeList[areaIndex[0]].childList[areaIndex[1]].childList" :key="index">
{{ item.areaName }}
</view>
</picker-view-column> -->
</picker-view>
</view>
</view>
@@ -72,28 +66,6 @@
<script>
export default {
data() {
return {
region:[],
selectArr: [],
result: {},
pickerShow:false,
menuIndex: 0,
areaIndex:[0, 0],
paixu:1,
provinceCode:'',
oilCode:'',
showHide:true,
cityCode:'',
areaCode:'',
selectDetailList: [],
independenceObj: {},
areaCodeList:[],
selectedKey: '',
cacheSelectedObj: {},
defaultSelectedTitleObj: {}
};
},
props: {
themeColor: {
type: String,
@@ -118,8 +90,39 @@
default: false
}
},
data() {
return {
region:[],
selectArr: [],
result: {},
pickerShow:false,
menuIndex: 0,
areaIndex:[0, 0],
paixu:1,
provinceCode:'',
oilCode:'',
showHide:true,
cityCode:'',
areaCode:'',
selectDetailList: [],
independenceObj: {},
areaCodeList:[],
selectedKey: '',
cacheSelectedObj: {},
defaultSelectedTitleObj: {}
};
},
watch:{
// areaCodeList(n){
// if(n.length){
// this.$forceUpdate()
// }
// console.log(n,'====')
// }
},
created() {
this.areaCodeList = uni.getStorageSync('areaCodeList');
console.log(this.areaCodeList,'areaCodeList ')
console.log('%c 子组件参数↓','font-size:30px;color:red')
},
mounted() {