File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ const tagsView = {
6
6
mutations : {
7
7
ADD_VISITED_VIEWS : ( state , view ) => {
8
8
if ( state . visitedViews . some ( v => v . path === view . path ) ) return
9
- state . visitedViews . push ( {
10
- name : view . name ,
11
- path : view . path ,
9
+ state . visitedViews . push ( Object . assign ( { } , view , {
12
10
title : view . meta . title || 'no-name'
13
- } )
11
+ } ) )
14
12
if ( ! view . meta . noCache ) {
15
13
state . cachedViews . push ( view . name )
16
14
}
Original file line number Diff line number Diff line change 2
2
<div class =" tags-view-container" >
3
3
<scroll-pane class =' tags-view-wrapper' ref =' scrollPane' >
4
4
<router-link ref =' tag' class =" tags-view-item" :class =" isActive(tag)?'active':''" v-for =" tag in Array.from(visitedViews)"
5
- :to =" tag.path " :key =" tag.path" @contextmenu.prevent.native =" openMenu(tag,$event)" >
5
+ :to =" tag" :key =" tag.path" @contextmenu.prevent.native =" openMenu(tag,$event)" >
6
6
{{generateTitle(tag.title)}}
7
7
<span class =' el-icon-close' @click.prevent.stop =' closeSelectedTag(tag)' ></span >
8
8
</router-link >
You can’t perform that action at this time.
0 commit comments