FIX 登出后还保留VUEX状态(缓存和标签)的问题

This commit is contained in:
sc 2021-06-19 12:43:43 +08:00
parent 5ed7f314e8
commit 64ba3854e0
2 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export default {
} }
}, },
clearKeepLive(state){ clearKeepLive(state){
state.keepLiveRoute = [] state.keepLiveRoute = ['empty']
}, },
setRouteKey(state, key){ setRouteKey(state, key){
state.routeKey = key state.routeKey = key

View File

@ -124,6 +124,8 @@
}, },
created: function() { created: function() {
this.$TOOL.data.remove("user") this.$TOOL.data.remove("user")
this.$store.commit("clearViewTags")
this.$store.commit("clearKeepLive")
}, },
methods: { methods: {
submitForm(formName, type) { submitForm(formName, type) {