fix(图表): 修复地图图表的高级配置中,地名映射输入框为允许为空的问题

This commit is contained in:
jianneng-fit2cloud
2026-03-03 16:10:15 +08:00
committed by jianneng-fit2cloud
parent 27221461c0
commit 27313883d4
2 changed files with 3 additions and 2 deletions

View File

@@ -107,7 +107,8 @@ const finishEdit = () => {
}, {})
}
const oldMappedName = areaNameMap[curOriginName.value]
if (oldMappedName === curMappedName.value) {
if (!curMappedName.value || oldMappedName === curMappedName.value) {
curMappedName.value = oldMappedName
return
}
areaNameMap[curOriginName.value] = curMappedName.value

View File

@@ -150,7 +150,7 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
.map(key => f.properties[key])
.filter(Boolean)
.join('@')
if (isEmpty(names)) {
if (isEmpty(names) || !gadmName) {
return true
}
return names.replace(/@[^@]*$/, '') === gadmName