refine code

This commit is contained in:
Pan
2019-03-19 18:46:30 +08:00
parent fd4b5c4052
commit d927d4172f
9 changed files with 81 additions and 55 deletions

View File

@@ -77,10 +77,10 @@ export default {
toggleSideBar() {
this.$store.dispatch('toggleSideBar')
},
logout() {
this.$store.dispatch('Logout').then(() => {
location.reload()// In order to re-instantiate the vue-router object to avoid bugs
})
async logout() {
await this.$store.dispatch('Logout')
// In order to re-instantiate the vue-router object to avoid bugs
location.reload()
}
}
}