fix:修复echarts切换tab时图形塌缩的问题
This commit is contained in:
@@ -373,13 +373,13 @@ export default {
|
|||||||
if (tab === 0) {
|
if (tab === 0) {
|
||||||
dom = document.getElementById('link-traffic-sankey-0')
|
dom = document.getElementById('link-traffic-sankey-0')
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.dispose()
|
this.myChart = null
|
||||||
}
|
}
|
||||||
this.myChart = echarts.init(dom)
|
this.myChart = echarts.init(dom)
|
||||||
} else {
|
} else {
|
||||||
dom = document.getElementById('link-traffic-sankey-1')
|
dom = document.getElementById('link-traffic-sankey-1')
|
||||||
if (this.myChart2) {
|
if (this.myChart2) {
|
||||||
this.myChart2.dispose()
|
this.myChart2 = null
|
||||||
}
|
}
|
||||||
this.myChart2 = echarts.init(dom)
|
this.myChart2 = echarts.init(dom)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -390,7 +390,6 @@ export default {
|
|||||||
dom = document.getElementById('overviewLineChart')
|
dom = document.getElementById('overviewLineChart')
|
||||||
// this.myChart = null
|
// this.myChart = null
|
||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
this.myChart.dispose()
|
|
||||||
this.myChart = null
|
this.myChart = null
|
||||||
}
|
}
|
||||||
this.myChart = echarts.init(dom)
|
this.myChart = echarts.init(dom)
|
||||||
|
|||||||
Reference in New Issue
Block a user