|
@@ -87,10 +87,10 @@ export default {
|
|
this.timer = setInterval(() => {
|
|
this.timer = setInterval(() => {
|
|
this.getDraftNum()
|
|
this.getDraftNum()
|
|
}, this.interval)
|
|
}, this.interval)
|
|
- },
|
|
|
|
- // 页面关闭时,清除定时器
|
|
|
|
- beforeDestroy() {
|
|
|
|
- clearInterval(this.timer)
|
|
|
|
|
|
+ // 页面销毁前,清除定时器
|
|
|
|
+ this.$once('hook:beforeDestroy', () => {
|
|
|
|
+ clearInterval(this.timer)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/**
|
|
/**
|