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

fix[TagView-component]: loss route querystring when operating tags (#768)

parent 2a590a20
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
const tags = this.$refs.tag const tags = this.$refs.tag
this.$nextTick(() => { this.$nextTick(() => {
for (const tag of tags) { for (const tag of tags) {
if (tag.to === this.$route.path) { if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag.$el) this.$refs.scrollPane.moveToTarget(tag.$el)
break break
} }
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
if (this.isActive(view)) { if (this.isActive(view)) {
const latestView = views.slice(-1)[0] const latestView = views.slice(-1)[0]
if (latestView) { if (latestView) {
this.$router.push(latestView.path) this.$router.push(latestView)
} else { } else {
this.$router.push('/') this.$router.push('/')
} }
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
}) })
}, },
closeOthersTags() { closeOthersTags() {
this.$router.push(this.selectedTag.path) this.$router.push(this.selectedTag)
this.$store.dispatch('delOthersViews', this.selectedTag).then(() => { this.$store.dispatch('delOthersViews', this.selectedTag).then(() => {
this.moveToCurrentTag() this.moveToCurrentTag()
}) })
......
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