From bcbb78268d480a91582ea5032bb77305240ccbe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=84=A2=E7=AB=8B=E5=B3=B0?= Date: Fri, 13 Jun 2025 15:16:06 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E6=A0=8F=E5=A4=B4=E5=83=8F=E5=B1=95=E5=BC=80=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/layouts/basic.vue | 4 ++-- apps/web-antd/src/store/auth.ts | 1 + packages/@core/base/typings/src/basic.d.ts | 4 ++++ packages/stores/src/modules/user.ts | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 49641fd1..0dfaa697 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -138,8 +138,8 @@ watch( :avatar :menus :text="userStore.userInfo?.realName" - description="ann.vben@gmail.com" - tag-text="Pro" + :description="userStore.userInfo?.email" + :tag-text="userStore.userInfo?.username" @logout="handleLogout" /> diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index 9c819e3c..d208a417 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -118,6 +118,7 @@ export const useAuthStore = defineStore('auth', () => { roles, userId: user.userId, username: user.userName, + email: user.email ?? '', }; userStore.setUserInfo(userInfo); /** diff --git a/packages/@core/base/typings/src/basic.d.ts b/packages/@core/base/typings/src/basic.d.ts index bbe1eb02..75e958dc 100644 --- a/packages/@core/base/typings/src/basic.d.ts +++ b/packages/@core/base/typings/src/basic.d.ts @@ -12,6 +12,10 @@ interface BasicUserInfo { * 头像 */ avatar: string; + /** + * 邮箱 + */ + email: string; /** * 用户权限 */ diff --git a/packages/stores/src/modules/user.ts b/packages/stores/src/modules/user.ts index afc974a2..1a96f1bc 100644 --- a/packages/stores/src/modules/user.ts +++ b/packages/stores/src/modules/user.ts @@ -6,6 +6,10 @@ interface BasicUserInfo { * 头像 */ avatar: string; + /** + * 邮箱 + */ + email: string; /** * 用户权限 */