diff --git a/src/components/AiAreaPicker.vue b/src/components/AiAreaPicker.vue
index 8f4e995a..ab4ba0a4 100644
--- a/src/components/AiAreaPicker.vue
+++ b/src/components/AiAreaPicker.vue
@@ -14,10 +14,12 @@
选择区域
-
-
+
+
@@ -34,7 +36,7 @@
@@ -86,7 +88,8 @@ export default {
fullArea: [],
index: '',
list: [],
- levelLabels: ["省", "市", "县/区", "镇/街道", "村/社区"]
+ levelLabels: ["省", "市", "县/区", "镇/街道", "村/社区"],
+ selected: {}
}
},
watch: {
@@ -133,17 +136,18 @@ export default {
}
})
},
- handleSelect(op) {
- this.$emit('select', op)
- this.$emit('update:name', this.currentArea.name)
+ handleSelect() {
+ this.$emit('select', this.index)
+ this.$emit('update:name', this.selected.name)
this.closePopup()
},
getChild(op) {
if (op.id != this.index) {
- if (op.type < 5 && (/0{3}$/g.test(this.index)||!this.index)) {
+ if (op.type < 5 && (/0{3}$/g.test(this.index) || !this.index)) {
this.fullArea.push(op)
this.getChildAreas(op.id)
}
+ this.selected = op
this.index = op.id
}
},
@@ -222,6 +226,9 @@ export default {
display: flex;
align-items: center;
width: fit-content;
+ max-width: calc(100vw - 128px);
+ overflow: hidden;
+ text-overflow: ellipsis;
padding: 0 32px;
height: 80px;
background: #ECF2FF;
@@ -231,6 +238,7 @@ export default {
font-weight: 500;
color: #4181FF !important;
margin: 16px 0 32px;
+ white-space: nowrap;
}
.fixedTop {