fix[tagsView]: refresh bug (#1059)

#1051
This commit is contained in:
jiuwuxiaohun 2018-09-11 13:39:18 +08:00 committed by 花裤衩
parent 9c03dd3514
commit 0740bb36f7
2 changed files with 9 additions and 6 deletions

View file

@ -32,10 +32,12 @@ export default {
// In order to make the cached page re-rendered // In order to make the cached page re-rendered
this.$store.dispatch('delAllCachedViews', this.$route) this.$store.dispatch('delAllCachedViews', this.$route)
const { path } = this.$route const { fullPath } = this.$route
this.$router.replace({ this.$nextTick(() => {
path: '/redirect' + path this.$router.replace({
path: '/redirect' + fullPath
})
}) })
} }
} }

View file

@ -89,9 +89,10 @@ export default {
refreshSelectedTag(view) { refreshSelectedTag(view) {
this.$store.dispatch('delCachedView', view).then(() => { this.$store.dispatch('delCachedView', view).then(() => {
const { fullPath } = view const { fullPath } = view
this.$nextTick(() => {
this.$router.replace({ this.$router.replace({
path: '/redirect' + fullPath path: '/redirect' + fullPath
})
}) })
}) })
}, },