Commit 15ec8d5ed438f32053bdbc4f48281ce8654fd5ca
1 parent
f40334bd
feat(src/packages/components): 修复地图未开启下钻,选择省市时,回显正常,但是刷新在选择时,回显为地区码了
Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -43,13 +43,14 @@ onMounted(async () => { | @@ -43,13 +43,14 @@ onMounted(async () => { | ||
| 43 | label: '中国', | 43 | label: '中国', |
| 44 | value: 'china' | 44 | value: 'china' |
| 45 | }) | 45 | }) |
| 46 | - onHandleSelectProvince('china') | 46 | + onHandleSelectProvince(props.optionData?.mapRegion.saveSelect['provinceValue']) |
| 47 | for (let i in selectValues) Reflect.set(selectValues, i, props.optionData?.mapRegion.saveSelect[i]) | 47 | for (let i in selectValues) Reflect.set(selectValues, i, props.optionData?.mapRegion.saveSelect[i]) |
| 48 | }) | 48 | }) |
| 49 | 49 | ||
| 50 | const onHandleSelectProvince = async (value: number | string) => { | 50 | const onHandleSelectProvince = async (value: number | string) => { |
| 51 | selectValues.cityValue = null | 51 | selectValues.cityValue = null |
| 52 | selectValues.countyValue = null | 52 | selectValues.countyValue = null |
| 53 | + selectOptions.cityOptions = [] | ||
| 53 | if (value === 'china') return (selectValues.levelStr = areaEnum.COUNTRY) | 54 | if (value === 'china') return (selectValues.levelStr = areaEnum.COUNTRY) |
| 54 | selectOptions.cityOptions = await getAreaLists(areaEnum.CITY, value) | 55 | selectOptions.cityOptions = await getAreaLists(areaEnum.CITY, value) |
| 55 | selectValues.levelStr = areaEnum.PROVINCE | 56 | selectValues.levelStr = areaEnum.PROVINCE |