Merge pull request #238 from h3poteto/fix/sideBar

Close side bar when user change account
This commit is contained in:
AkiraFukushima 2018-04-17 09:19:45 +09:00 committed by GitHub
commit 2e36781229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
}
}
}