Skip to content
Snippets Groups Projects
Commit 2a590a20 authored by 临书's avatar 临书 Committed by 花裤衩
Browse files

Support route query in TagView (#765)

parent c93fcefe
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
......@@ -2,7 +2,7 @@
<div class="tags-view-container">
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)"
:to="tag.path" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
:to="tag" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
{{generateTitle(tag.title)}}
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
</router-link>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment