Browse Source
修正生命周期钩子,将`beforeDestroy`更改为`beforeUnmount` (#738) (#742)
优化将beforeDestroy更改为beforeUnmount
main
奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
5 additions and
5 deletions
-
web/src/view/dashboard/dashbordCharts/echartsLine.vue
-
web/src/view/layout/aside/historyComponent/history.vue
-
web/src/view/layout/aside/index.vue
-
web/src/view/layout/screenfull/index.vue
-
web/src/view/system/state.vue
|
|
@ -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 |
|
|
|
}, |
|
|
|