From 2a590a208793810dc7f69ed74d2d90c418f43f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B4=E4=B9=A6?= Date: Tue, 12 Jun 2018 13:53:56 +0800 Subject: [PATCH] Support route query in TagView (#765) --- src/store/modules/tagsView.js | 6 ++---- src/views/layout/components/TagsView.vue | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/store/modules/tagsView.js b/src/store/modules/tagsView.js index 273d33bd..06d092c9 100644 --- a/src/store/modules/tagsView.js +++ b/src/store/modules/tagsView.js @@ -6,11 +6,9 @@ const tagsView = { mutations: { ADD_VISITED_VIEWS: (state, view) => { if (state.visitedViews.some(v => v.path === view.path)) return - state.visitedViews.push({ - name: view.name, - path: view.path, + state.visitedViews.push(Object.assign({}, view, { title: view.meta.title || 'no-name' - }) + })) if (!view.meta.noCache) { state.cachedViews.push(view.name) } diff --git a/src/views/layout/components/TagsView.vue b/src/views/layout/components/TagsView.vue index 55467fc9..ad40ccb3 100644 --- a/src/views/layout/components/TagsView.vue +++ b/src/views/layout/components/TagsView.vue @@ -2,7 +2,7 @@
+ :to="tag" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)"> {{generateTitle(tag.title)}}