fix: Close side bar when user change account

This commit is contained in:
AkiraFukushima 2018-04-17 09:15:55 +09:00
parent e4504682f4
commit 8cfa31256e
3 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,9 @@ export default {
}
})
},
beforeDestroy () {
this.close()
},
methods: {
close () {
this.$store.dispatch('TimelineSpace/Contents/SideBar/close')

View File

@ -23,7 +23,8 @@ const SideBar = {
}
},
actions: {
close ({ commit }) {
close ({ dispatch, commit }) {
dispatch('TimelineSpace/Contents/SideBar/AccountProfile/close', {}, { root: true })
commit('changeOpenSideBar', false)
commit('changeComponent', 0)
},

View File

@ -77,6 +77,9 @@ const AccountProfile = {
resolve(res)
})
})
},
close ({ commit }) {
commit('changeAccount', null)
}
}
}