From d86a499d7af31c2cab546f4284b7e911aec9403c Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 16 Sep 2025 09:53:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(region-select):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E9=80=89=E6=8B=A9=E5=A6=82=E6=9E=9C=E8=A2=AB?= =?UTF-8?q?=E9=80=89=E5=AE=8C=E9=A1=B5=E9=9D=A2=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/region-select/index.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/components/region-select/index.vue b/components/region-select/index.vue index f68edf0..e151678 100644 --- a/components/region-select/index.vue +++ b/components/region-select/index.vue @@ -19,13 +19,19 @@
{{ c.name }}
- +
{{ d.name }}
@@ -119,6 +125,7 @@ export default { .filter(key => res.data[key]) .filter(key => !res.data?.data?.[`${key}Data`]) .reverse() + console.log(needSelected, 'needSelected') if ( needSelected?.length && Object.keys(res.data?.data || {}).length < needSelected?.length @@ -180,6 +187,7 @@ export default { } } }) + this.cityList.forEach(item => { const province = this.provinceList.find( province => province.pkId === item.parent @@ -192,6 +200,8 @@ export default { } } }) + this.provinceList = this.provinceList.filter(item => item.children) + this.cityList = this.cityList.filter(item => item.children) this.cityList = this.provinceList[this.pickerValue[0]].children this.countyList = this.cityList[this.pickerValue[1]].children },