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

This commit is contained in:
鄢立峰 2025-06-13 15:16:06 +08:00
parent f913955259
commit bcbb78268d
4 changed files with 11 additions and 2 deletions

View File

@ -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"
/>
</template>

View File

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

View File

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

View File

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