|
|
@@ -1007,14 +1007,17 @@ export default { |
|
|
|
destroyed () { |
|
|
|
console.log('bbbbbbbbbb') |
|
|
|
clearInterval(this.timer); |
|
|
|
clearInterval(this.timeCount); |
|
|
|
}, |
|
|
|
beforeDestory() { |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timeCount); |
|
|
|
}, |
|
|
|
//离开页面清除定时器失效问题 |
|
|
|
beforeRouteLeave(to, from, next) { |
|
|
|
console.log("我离开了") |
|
|
|
clearInterval(this.timer) |
|
|
|
clearInterval(this.timeCount); |
|
|
|
this.time = null; |
|
|
|
next() |
|
|
|
} |
|
|
|