同步地区组件逻辑

This commit is contained in:
aixianling
2022-03-17 09:14:29 +08:00
parent fe3fe256ec
commit 68d2e71650

View File

@@ -22,7 +22,7 @@
<div/>
<span v-if="all" v-text="`省`" @click="selectNode({}, -1)"/>
<span v-for="(area,i) in fullArea.filter(e=>e.type<valueLevel)" :key="area.id"
v-text="area.levelLabel || '村/社区'" @click="selectNode(area, i)"/>
v-text="area.levelLabel" @click="selectNode(area, i)"/>
</div>
<!--用来作为占位的-->
<div class="fixedPlaceholder" style="line-height: 60px;" v-if="false">
@@ -40,8 +40,8 @@
</div>
</scroll-view>
<div class="bottomBtns">
<div @click="closePopup">取消</div>
<div class="primary fill" @click="handleSelect">确定</div>
<div @click.stop="closePopup">取消</div>
<div class="primary fill" @click.stop="handleSelect">确定</div>
</div>
</ai-search-popup>
</section>
@@ -208,7 +208,10 @@ export default {
})
},
selectNode(area, i) {
this.fullArea.splice(i + 1, this.fullArea.length - i)
let deleteCount = this.fullArea.length - i
if (deleteCount > 0) {
this.fullArea.splice(i + 1, deleteCount)
}
if (this.all && !area.id) {
this.index = ''
this.getProvinces()