未验证 提交 87eb5fe6 编写于 作者: Mr.奇淼('s avatar Mr.奇淼( 提交者: GitHub

修正生命周期钩子,将`beforeDestroy`更改为`beforeUnmount` (#738) (#742)

优化将beforeDestroy更改为beforeUnmount
上级 82d8892b
......@@ -51,7 +51,7 @@ export default {
this.initChart()
})
},
beforeDestroy() {
beforeUnmount() {
if (!this.chart) {
return
}
......
......@@ -120,7 +120,7 @@ export default {
}
this.setTab(this.$route)
},
beforeDestroy() {
beforeUnmount() {
emitter.off('collapse')
emitter.off('mobile')
},
......
......@@ -58,7 +58,7 @@ export default {
this.isCollapse = item
})
},
beforeDestroy() {
beforeUnmount() {
emitter.off('collapse')
},
methods: {
......
......@@ -90,7 +90,7 @@ export default {
screenfull.on('change', this.changeFullShow)
}
},
destroyed() {
unmounted() {
screenfull.off('change', this.changeFullShow)
},
methods: {
......
......@@ -159,7 +159,7 @@ export default {
this.reload()
}, 1000 * 10)
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.timer)
this.timer = null
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册