From dce018eb1c24a804afdc9b35ecdf08a472108dc9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 30 Dec 2021 16:55:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=80=E4=B8=8B=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AiAreaPicker.vue | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) 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 {