loki注解和切面写入日志、日志管理定时器销毁问题

This commit is contained in:
lyd
2022-10-11 11:09:52 +08:00
parent e64c2d0383
commit c3048a5f01
6 changed files with 110 additions and 4 deletions

View File

@@ -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('定时任务销毁')