优化将beforeDestroy更改为beforeUnmount
This commit is contained in:
@@ -51,7 +51,7 @@ export default {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
|
@@ -120,7 +120,7 @@ export default {
|
||||
}
|
||||
this.setTab(this.$route)
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
emitter.off('collapse')
|
||||
emitter.off('mobile')
|
||||
},
|
||||
|
@@ -58,7 +58,7 @@ export default {
|
||||
this.isCollapse = item
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
emitter.off('collapse')
|
||||
},
|
||||
methods: {
|
||||
|
@@ -90,7 +90,7 @@ export default {
|
||||
screenfull.on('change', this.changeFullShow)
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
unmounted() {
|
||||
screenfull.off('change', this.changeFullShow)
|
||||
},
|
||||
methods: {
|
||||
|
@@ -159,7 +159,7 @@ export default {
|
||||
this.reload()
|
||||
}, 1000 * 10)
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
},
|
||||
|
Reference in New Issue
Block a user