From ef33b28492c399c32501d03b68dfaf96e71812b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Fri, 17 Jun 2022 23:05:57 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/header/components/BreadCrumb.vue | 9 +++++---- src/store/modules/user.js | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/layout/components/header/components/BreadCrumb.vue b/src/layout/components/header/components/BreadCrumb.vue index 73e6ea7..f8d10c3 100644 --- a/src/layout/components/header/components/BreadCrumb.vue +++ b/src/layout/components/header/components/BreadCrumb.vue @@ -1,17 +1,18 @@ diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 4142734..1685030 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -38,10 +38,10 @@ export const useUserStore = defineStore('user', { return Promise.reject(error) } }, - logout() { - toLogin() + async logout() { removeToken() this.userInfo = {} + toLogin() }, setUserInfo(userInfo = {}) { this.userInfo = { ...this.userInfo, ...userInfo }