perf:页面销毁时 移除bus监听器

This commit is contained in:
zyh
2023-04-12 10:36:22 +08:00
parent 24df2aac9a
commit eda2569a87
5 changed files with 11 additions and 2 deletions

View File

@@ -1266,6 +1266,7 @@ export default {
beforeDestroy () {
// 移除键盘ESC事件
document.removeEventListener('keydown', this.escExit)
bus.$off('refreshPanel')
this.$store.dispatch('dispatchPanelLock', { flag: true })
if (document.querySelector('#tableList')) {
document.querySelector('#tableList').removeEventListener('mouseenter', this.tableListEnter)