From 0bbc29023b4958a6e9d4243e063577b8bb31cbed Mon Sep 17 00:00:00 2001 From: xiaohuanshu Date: Tue, 13 Aug 2024 17:44:24 +0800 Subject: [PATCH] fix user logout error --- src/store/modules/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 32b9ada..6008d1b 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -93,7 +93,7 @@ export const useUserStore = defineStore({ // 登出 async logout() { this.setPermissions([]); - this.setUserInfo({ name: '', email: '' }); + this.setUserInfo({ username: '', email: '' }); storage.remove(ACCESS_TOKEN); storage.remove(CURRENT_USER); },