!42 perf: 优化顶部栏头像展开用户信息绑定

Merge pull request !42 from 尘墨/main
This commit is contained in:
尘墨 2025-06-13 07:22:39 +00:00 committed by 玲娜贝er
parent 63d2b38fd1
commit b2d3cf10aa
4 changed files with 11 additions and 2 deletions

View File

@ -138,8 +138,8 @@ watch(
:avatar :avatar
:menus :menus
:text="userStore.userInfo?.realName" :text="userStore.userInfo?.realName"
description="ann.vben@gmail.com" :description="userStore.userInfo?.email"
tag-text="Pro" :tag-text="userStore.userInfo?.username"
@logout="handleLogout" @logout="handleLogout"
/> />
</template> </template>

View File

@ -118,6 +118,7 @@ export const useAuthStore = defineStore('auth', () => {
roles, roles,
userId: user.userId, userId: user.userId,
username: user.userName, username: user.userName,
email: user.email ?? '',
}; };
userStore.setUserInfo(userInfo); userStore.setUserInfo(userInfo);
/** /**

View File

@ -12,6 +12,10 @@ interface BasicUserInfo {
* *
*/ */
avatar: string; avatar: string;
/**
*
*/
email: string;
/** /**
* *
*/ */

View File

@ -6,6 +6,10 @@ interface BasicUserInfo {
* *
*/ */
avatar: string; avatar: string;
/**
*
*/
email: string;
/** /**
* *
*/ */