Skip to content

Commit cbee7b6

Browse files
tmpbookPanJiaChen
authored andcommitted
fix[TagView-component]: loss route querystring when operating tags (PanJiaChen#768)
1 parent 2a590a2 commit cbee7b6

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
@@ -72,7 +72,7 @@ export default {
7272
const tags = this.$refs.tag
7373
this.$nextTick(() => {
7474
for (const tag of tags) {
75-
if (tag.to === this.$route.path) {
75+
if (tag.to.path === this.$route.path) {
7676
this.$refs.scrollPane.moveToTarget(tag.$el)
7777
break
7878
}
@@ -84,15 +84,15 @@ export default {
8484
if (this.isActive(view)) {
8585
const latestView = views.slice(-1)[0]
8686
if (latestView) {
87-
this.$router.push(latestView.path)
87+
this.$router.push(latestView)
8888
} else {
8989
this.$router.push('/')
9090
}
9191
}
9292
})
9393
},
9494
closeOthersTags() {
95-
this.$router.push(this.selectedTag.path)
95+
this.$router.push(this.selectedTag)
9696
this.$store.dispatch('delOthersViews', this.selectedTag).then(() => {
9797
this.moveToCurrentTag()
9898
})

0 commit comments

Comments
 (0)