From c06baffb17812bcbc08f125ce4103708ed0d2831 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 27 Nov 2017 10:46:08 +0800 Subject: [PATCH] perf:format code --- src/components/Breadcrumb/index.vue | 10 ++++---- src/components/ScrollBar/index.vue | 4 ++-- src/components/ScrollPane/index.vue | 4 ++-- src/styles/index.scss | 1 + src/styles/sidebar.scss | 2 -- src/views/layout/components/AppMain.vue | 2 +- .../layout/components/Sidebar/SidebarItem.vue | 24 +++++++++---------- src/views/layout/components/Sidebar/index.vue | 2 +- 8 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 20ef826a..e50163c1 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -19,6 +19,11 @@ export default { levelList: null } }, + watch: { + $route() { + this.getBreadcrumb() + } + }, methods: { getBreadcrumb() { let matched = this.$route.matched.filter(item => item.name) @@ -31,11 +36,6 @@ export default { generateTitle(title) { return this.$t('route.' + title) } - }, - watch: { - $route() { - this.getBreadcrumb() - } } } diff --git a/src/components/ScrollBar/index.vue b/src/components/ScrollBar/index.vue index 00e81293..5c8d21cd 100644 --- a/src/components/ScrollBar/index.vue +++ b/src/components/ScrollBar/index.vue @@ -1,6 +1,6 @@