fix: 修复id改成ref导致echarts获取不到dom报错的问题

This commit is contained in:
刘洪洪
2023-01-11 15:33:59 +08:00
parent 27bd8260d2
commit d54054510b

View File

@@ -699,7 +699,7 @@ export default {
clearTimeout(this.timer)
window.removeEventListener('resize', this.resize)
let myChart = echarts.getInstanceByDom(document.getElementById('overviewLineChart'))
let myChart = echarts.getInstanceByDom(this.$refs.overviewLineChart)
if (myChart) {
echarts.dispose(myChart)
}