fix:修复echarts切换tab时图形塌缩的问题

This commit is contained in:
刘洪洪
2022-12-02 15:46:58 +08:00
parent 5818485f3f
commit a934fd2635
2 changed files with 2 additions and 3 deletions

View File

@@ -373,13 +373,13 @@ export default {
if (tab === 0) {
dom = document.getElementById('link-traffic-sankey-0')
if (this.myChart) {
this.myChart.dispose()
this.myChart = null
}
this.myChart = echarts.init(dom)
} else {
dom = document.getElementById('link-traffic-sankey-1')
if (this.myChart2) {
this.myChart2.dispose()
this.myChart2 = null
}
this.myChart2 = echarts.init(dom)
}

View File

@@ -390,7 +390,6 @@ export default {
dom = document.getElementById('overviewLineChart')
// this.myChart = null
if (this.myChart) {
this.myChart.dispose()
this.myChart = null
}
this.myChart = echarts.init(dom)