diff --git a/src/views/About.vue b/src/views/About.vue index d2b11b4..edf184d 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -42,6 +42,11 @@ diff --git a/src/views/Home.vue b/src/views/Home.vue index a1c6bfa..cd40bf3 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -120,6 +120,11 @@ export default { components: { Icon }, + beforeRouteEnter(to, from, next) { + next(vm => { + vm.utils.changeTitle(); + }); + }, data() { return { config: this.$root.config.storage, @@ -165,11 +170,6 @@ export default { } } }, - beforeRouteEnter(to, from, next) { - next(vm => { - vm.utils.changeTitle(); - }); - }, methods: { /** diff --git a/src/views/Settings.vue b/src/views/Settings.vue index f33a978..4eb1e0f 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -35,17 +35,17 @@ diff --git a/src/views/ToolsDetail.vue b/src/views/ToolsDetail.vue index 0007878..28d38ef 100644 --- a/src/views/ToolsDetail.vue +++ b/src/views/ToolsDetail.vue @@ -9,13 +9,6 @@ import navTools from '@/assets/js/navTools.js'; export default { name: 'ToolsDetail', - data() { - return { - utils: this.$root.utils, - toolList: navTools, - toolElem: null - } - }, beforeRouteEnter(to, from, next) { next(vm => { var params = vm.$route.params; @@ -49,7 +42,14 @@ export default { return elem; }); }); - } + }, + data() { + return { + utils: this.$root.utils, + toolList: navTools, + toolElem: null + } + }, }