fix: 空地图试图切换错误

This commit is contained in:
fit2cloud-chenyw 2021-12-27 11:12:21 +08:00
parent a30fcc9212
commit 55d8022b5b

View File

@ -224,7 +224,10 @@ export default {
if (chart.type === 'map') {
const customAttr = JSON.parse(chart.customAttr)
if (!customAttr.areaCode) return
if (!customAttr.areaCode) {
this.myChart.clear()
return
}
const cCode = this.dynamicAreaCode || customAttr.areaCode
if (this.$store.getters.geoMap[cCode]) {
const json = this.$store.getters.geoMap[cCode]