fix:图表销毁解绑事件

This commit is contained in:
zyh
2023-04-10 14:26:46 +08:00
parent 37c5be765a
commit bf8f5ae241
8 changed files with 137 additions and 80 deletions

View File

@@ -163,12 +163,12 @@ export default {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.refreshDataFunc()
this.timer = ''
this.timer = null
}, 200)
} else {
this.timer = setTimeout(() => {
this.refreshDataFunc()
this.timer = ''
this.timer = null
}, 200)
}
}
@@ -181,6 +181,12 @@ export default {
}
},
beforeDestroy () {
if (this.timer) {
this.timer = setTimeout(() => {
this.refreshDataFunc()
this.timer = null
}, 200)
}
if (this.intervalTimer) {
clearInterval(this.intervalTimer)
this.intervalTimer = null