Merge pull request #1522 from dataease/pr@dev@fix_map_switch_error

fix: 空地图试图切换错误
This commit is contained in:
fit2cloud-chenyw 2021-12-27 11:13:42 +08:00 committed by GitHub
commit a89a9a47a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]