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