From 532a7f5a5e29db274c459556b83483a8a9c409b3 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 9 Apr 2019 12:55:28 +0800 Subject: [PATCH] refine --- src/layout/components/TagsView/index.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index bf48bceb..19d3083f 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -168,9 +168,14 @@ export default { if (latestView) { this.$router.push(latestView) } else { - // You can set another route - if (view.name === 'Dashboard') this.$router.replace({ path: '/redirect' + view.fullPath }) - else this.$router.push('/') + // now the default is to redirect to the home page if there is no tags-view, + // you can adjust it according to your needs. + if (view.name === 'Dashboard') { + // to reload home page + this.$router.replace({ path: '/redirect' + view.fullPath }) + } else { + this.$router.push('/') + } } }, openMenu(tag, e) {