处理切换页面之后,有效率数据的定时器没有销毁的问题
This commit is contained in:
parent
08b707d45b
commit
ff4133f84a
|
@ -185,6 +185,8 @@ export default {
|
|||
handler:function(val,oldVal) {
|
||||
if (val.name!=="station-operation") {
|
||||
this.$message.destroy()
|
||||
clearInterval(this.timer);
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
deep:true,
|
||||
|
@ -233,7 +235,7 @@ export default {
|
|||
this.getStationTypeList()
|
||||
this.getStationTree()
|
||||
},
|
||||
destroyed () {
|
||||
beforeDestroy () {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user