loki注解和切面写入日志、日志管理定时器销毁问题
This commit is contained in:
@@ -216,6 +216,13 @@ export default {
|
||||
created() {
|
||||
this.initLabelOptions()
|
||||
},
|
||||
// 关闭定时器 - 加了缓存就必须使用deactivated
|
||||
deactivated() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
console.log('定时任务销毁')
|
||||
clearInterval(this.timer)
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
beforeDestroy() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
console.log('定时任务销毁')
|
||||
|
||||
Reference in New Issue
Block a user