From b371cb14f5171b2d747c2a5cee95c8319dd53e88 Mon Sep 17 00:00:00 2001 From: duan Date: Thu, 11 Aug 2022 11:06:40 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/layout/components/navbar.vue):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 9 +++++++++ 1 file changed, 9 insertions(+) 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() {