fix TagsView.vue 导致前端报错的问题

update 节点注册使用独立的key字段,而不是使用mac字段
This commit is contained in:
陈景阳
2019-08-21 14:37:55 +08:00
parent 57a8cf9dfc
commit d913d7c40f
4 changed files with 98 additions and 62 deletions

View File

@@ -110,20 +110,22 @@ export default {
},
moveToCurrentTag () {
const tags = this.$refs.tag
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag)
if (tags) {
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag)
// when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('updateVisitedView', this.$route)
// when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('updateVisitedView', this.$route)
}
break
}
break
}
}
})
})
}
},
refreshSelectedTag (view) {
this.$store.dispatch('delCachedView', view).then(() => {