1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-02-07 04:43:52 +01:00

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: { methods: {
close () { close () {
this.$store.dispatch('TimelineSpace/Contents/SideBar/close') this.$store.dispatch('TimelineSpace/Contents/SideBar/close')

View File

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

View File

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