fix: 视图样式-提示导致仪表板发生抖动

This commit is contained in:
dataeaseShu 2023-07-31 15:07:45 +08:00
parent 5889dd1009
commit 4bba623770

View File

@ -184,13 +184,13 @@ export default {
},
mounted() {
bus.$on('change-series-id', this.changeSeriesId)
document.querySelector('body').addEventListener('mouseover', this.bodyMouseover)
document.querySelector('body').addEventListener('mouseout', this.bodyMouseout)
document.getElementById(this.chartId).addEventListener('mouseover', this.bodyMouseover)
document.getElementById(this.chartId).addEventListener('mouseout', this.bodyMouseout)
this.preDraw()
},
beforeDestroy() {
document.querySelector('body').removeEventListener('mouseover', this.bodyMouseover)
document.querySelector('body').removeEventListener('mouseout', this.bodyMouseout)
document.getElementById(this.chartId).removeEventListener('mouseover', this.bodyMouseover)
document.getElementById(this.chartId).removeEventListener('mouseout', this.bodyMouseout)
bus.$off('change-series-id', this.changeSeriesId)
window.removeEventListener('resize', this.myChart.resize)
this.myChart.dispose()