Support route query in TagView (#765)

This commit is contained in:
临书
2018-06-12 13:53:56 +08:00
committed by 花裤衩
parent c93fcefe54
commit 2a590a2087
2 changed files with 3 additions and 5 deletions

View File

@@ -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)
}