Skip to content

Commit f94aa1a

Browse files
committed
fix[tagsView]: fixed moveToCurrentTag bug
1 parent 96bda55 commit f94aa1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/views/layout/components/TagsView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
v-for="tag in visitedViews"
66
ref="tag"
77
:class="isActive(tag)?'active':''"
8-
:to="tag.fullPath"
8+
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
99
:key="tag.path"
1010
tag="span"
1111
class="tags-view-item"
1212
@click.middle.native="closeSelectedTag(tag)"
1313
@contextmenu.prevent.native="openMenu(tag,$event)">
1414
{{ generateTitle(tag.title) }}
15-
<span class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)"/>
15+
<span class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
1616
</router-link>
1717
</scroll-pane>
1818
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
@@ -75,7 +75,7 @@ export default {
7575
const tags = this.$refs.tag
7676
this.$nextTick(() => {
7777
for (const tag of tags) {
78-
if (tag.to === this.$route.fullPath) {
78+
if (tag.to.path === this.$route.path) {
7979
this.$refs.scrollPane.moveToTarget(tag)
8080
8181
// when query is different then update

0 commit comments

Comments
 (0)