flex: echarts resize 方法

This commit is contained in:
@changcode
2022-07-14 17:15:34 +08:00
parent c367966e04
commit 381a4e1a66
2 changed files with 9 additions and 1 deletions

View File

@@ -5907,7 +5907,6 @@ export default {
return str
}
this.myChart.setOption(this.chartOption)
this.myChart.resize()
},
dispatchLegendSelectAction (name) {
@@ -5954,12 +5953,16 @@ export default {
})
}
}
},
resize () {
this.myChart.resize()
}
},
mounted () {
this.timer = setTimeout(() => {
this.init()
}, 100)
window.addEventListener('resize', this.resize)
},
beforeUnmount () {
clearTimeout(this.timer)