城市选择器bug修复
This commit is contained in:
parent
fc0ced0927
commit
c17c852a1f
@ -1,23 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<u-popup :show="modelValue" mode="bottom" :popup="false"
|
<u-popup :show="modelValue" mode="bottom" :popup="false" :mask="true" :closeable="true" :safe-area-inset-bottom="true"
|
||||||
:mask="true" :closeable="true" :safe-area-inset-bottom="true"
|
close-icon-color="#ffffff" :z-index="uZIndex" :maskCloseAble="maskCloseAble" @close="close">
|
||||||
close-icon-color="#ffffff" :z-index="uZIndex"
|
<u-tabs v-if="modelValue" :list="genTabsList" :scrollable="true" :current="tabsIndex" @change="tabsChange"
|
||||||
:maskCloseAble="maskCloseAble" @close="close">
|
ref="tabs" />
|
||||||
<u-tabs v-if="modelValue" :list="genTabsList"
|
|
||||||
:scrollable="true" :current="tabsIndex" @change="tabsChange" ref="tabs"></u-tabs>
|
|
||||||
<view class="area-box">
|
<view class="area-box">
|
||||||
<view class="u-flex" :class="{ 'change': isChange }">
|
<view class="u-flex" :class="{ 'change': isChange }">
|
||||||
<view class="area-item">
|
<view class="area-item">
|
||||||
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
||||||
<scroll-view :scroll-y="true" style="height: 100%">
|
<scroll-view :scroll-y="true" style="height: 100%">
|
||||||
<u-cell-group>
|
<u-cell-group>
|
||||||
<u-cell v-for="(item,index) in provinces"
|
<u-cell v-for="(item, index) in provinces" :title="item.label" :arrow="false" :index="index"
|
||||||
:title="item.label" :arrow="false"
|
:key="index" @click="provinceChange(index)">
|
||||||
:index="index" :key="index"
|
|
||||||
@click="provinceChange(index)">
|
|
||||||
<template v-slot:right-icon>
|
<template v-slot:right-icon>
|
||||||
<u-icon v-if="isChooseP&&province===index"
|
<u-icon v-if="isChooseP && province === index" size="17"
|
||||||
size="17" name="checkbox-mark"></u-icon>
|
name="checkbox-mark"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
@ -28,13 +24,10 @@
|
|||||||
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
||||||
<scroll-view :scroll-y="true" style="height: 100%">
|
<scroll-view :scroll-y="true" style="height: 100%">
|
||||||
<u-cell-group v-if="isChooseP">
|
<u-cell-group v-if="isChooseP">
|
||||||
<u-cell v-for="(item,index) in citys"
|
<u-cell v-for="(item, index) in citys" :title="item.label" :arrow="false" :index="index"
|
||||||
:title="item.label" :arrow="false"
|
:key="index" @click="cityChange(index)">
|
||||||
:index="index" :key="index"
|
|
||||||
@click="cityChange(index)">
|
|
||||||
<template v-slot:right-icon>
|
<template v-slot:right-icon>
|
||||||
<u-icon v-if="isChooseC&&city===index"
|
<u-icon v-if="isChooseC && city === index" size="17" name="checkbox-mark"></u-icon>
|
||||||
size="17" name="checkbox-mark"></u-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
@ -45,13 +38,10 @@
|
|||||||
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
<view class="u-padding-10 u-bg-gray" style="height: 100%;">
|
||||||
<scroll-view :scroll-y="true" style="height: 100%">
|
<scroll-view :scroll-y="true" style="height: 100%">
|
||||||
<u-cell-group v-if="isChooseC">
|
<u-cell-group v-if="isChooseC">
|
||||||
<u-cell v-for="(item,index) in areas"
|
<u-cell v-for="(item, index) in areas" :title="item.label" :arrow="false" :index="index"
|
||||||
:title="item.label" :arrow="false"
|
:key="index" @click="areaChange(index)">
|
||||||
:index="index" :key="index"
|
|
||||||
@click="areaChange(index)">
|
|
||||||
<template v-slot:right-icon>
|
<template v-slot:right-icon>
|
||||||
<u-icon v-if="isChooseA&&area===index"
|
<u-icon v-if="isChooseA && area === index" size="17" name="checkbox-mark"></u-icon>
|
||||||
size="17" name="checkbox-mark"></u-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
</u-cell-group>
|
</u-cell-group>
|
||||||
@ -194,8 +184,9 @@
|
|||||||
close() {
|
close() {
|
||||||
this.$emit('update:modelValue', false);
|
this.$emit('update:modelValue', false);
|
||||||
},
|
},
|
||||||
tabsChange(index) {
|
tabsChange(value) {
|
||||||
this.tabsIndex = index;
|
this.tabsIndex = value.index;
|
||||||
|
console.log('debug=>', this.tabsIndex);
|
||||||
},
|
},
|
||||||
provinceChange(index) {
|
provinceChange(index) {
|
||||||
this.isChooseP = true;
|
this.isChooseP = true;
|
||||||
@ -248,4 +239,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@/components/u-city-select/province.js@/components/u-city-select/city.js@/components/u-city-select/area.js
|
|
||||||
Loading…
Reference in New Issue
Block a user