From eb2271d1007c0a85aa63e67fa2efc511945a2ec3 Mon Sep 17 00:00:00 2001 From: toesbieya <1647775459@qq.com> Date: Tue, 1 Sep 2020 18:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=AE=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/Main/component/Breadcrumb.vue | 14 ++- .../component/Navbar/component/RootMenu.vue | 5 +- .../layout/component/TagsView/ScrollPane.vue | 3 +- vue/src/layout/component/TagsView/index.vue | 92 ++++++++++++------- vue/src/view/index/indexPage.vue | 38 ++++---- 5 files changed, 89 insertions(+), 63 deletions(-) diff --git a/vue/src/layout/component/Main/component/Breadcrumb.vue b/vue/src/layout/component/Main/component/Breadcrumb.vue index 2f2806b..5fc6f5e 100644 --- a/vue/src/layout/component/Main/component/Breadcrumb.vue +++ b/vue/src/layout/component/Main/component/Breadcrumb.vue @@ -13,9 +13,11 @@ export default { data: () => ({data: []}), watch: { - $route(route) { - if (route.path.startsWith('/redirect')) return - this.getBreadcrumb() + $route: { + immediate: true, + handler(route) { + !route.path.startsWith('/redirect') && this.getBreadcrumb() + } } }, @@ -24,10 +26,6 @@ export default { // only show routes with meta.title this.data = this.$route.matched.filter(item => item.meta.title) } - }, - - mounted() { - this.getBreadcrumb() } } @@ -35,7 +33,7 @@ export default {