diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index b23df37..76dc4cf 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -56,6 +56,10 @@ export default { { value: 'user', label: '用户管理' + }, + { + value: 'loginout', + label: '注销登录' } ] } @@ -65,6 +69,11 @@ export default { this.$store.dispatch('app/toggleSideBar') }, selectChange(val) { + if (val === 'loginout') { + this.$store.commit('user/RESET_STATE') + this.$router.push('/login') + return + } this.$router.push('/' + val) }, async logout() {