Browse Source

修正生命周期钩子,将`beforeDestroy`更改为`beforeUnmount` (#738) (#742)

优化将beforeDestroy更改为beforeUnmount
main
奇淼(piexlmax 3 years ago
committed by GitHub
parent
commit
87eb5fe664
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      web/src/view/dashboard/dashbordCharts/echartsLine.vue
  2. 2
      web/src/view/layout/aside/historyComponent/history.vue
  3. 2
      web/src/view/layout/aside/index.vue
  4. 2
      web/src/view/layout/screenfull/index.vue
  5. 2
      web/src/view/system/state.vue

2
web/src/view/dashboard/dashbordCharts/echartsLine.vue

@ -51,7 +51,7 @@ export default {
this.initChart()
})
},
beforeDestroy() {
beforeUnmount() {
if (!this.chart) {
return
}

2
web/src/view/layout/aside/historyComponent/history.vue

@ -120,7 +120,7 @@ export default {
}
this.setTab(this.$route)
},
beforeDestroy() {
beforeUnmount() {
emitter.off('collapse')
emitter.off('mobile')
},

2
web/src/view/layout/aside/index.vue

@ -58,7 +58,7 @@ export default {
this.isCollapse = item
})
},
beforeDestroy() {
beforeUnmount() {
emitter.off('collapse')
},
methods: {

2
web/src/view/layout/screenfull/index.vue

@ -90,7 +90,7 @@ export default {
screenfull.on('change', this.changeFullShow)
}
},
destroyed() {
unmounted() {
screenfull.off('change', this.changeFullShow)
},
methods: {

2
web/src/view/system/state.vue

@ -159,7 +159,7 @@ export default {
this.reload()
}, 1000 * 10)
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.timer)
this.timer = null
},

Loading…
Cancel
Save