refactor[store]: refactor tagsView store (#1032)

This commit is contained in:
花裤衩
2018-08-31 16:00:28 +08:00
committed by GitHub
parent 0fe3f181ad
commit d0d1addba8
3 changed files with 88 additions and 26 deletions

View File

@@ -30,17 +30,7 @@ export default {
},
refreshView() {
// In order to make the cached page re-rendered
const visitedViews = [...this.$store.getters.visitedViews].map(i => {
i.meta.noCache = true
return i
})
this.$store.dispatch('delAllViews', this.$route).then(() => {
console.log(visitedViews)
for (const i of visitedViews) {
this.$store.dispatch('addVisitedViews', i)
}
})
this.$store.dispatch('delAllCachedViews', this.$route)
const { path } = this.$route