perf: 优化顶部栏头像展开用户信息绑定
This commit is contained in:
parent
f913955259
commit
bcbb78268d
@ -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>
|
||||||
|
@ -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);
|
||||||
/**
|
/**
|
||||||
|
4
packages/@core/base/typings/src/basic.d.ts
vendored
4
packages/@core/base/typings/src/basic.d.ts
vendored
@ -12,6 +12,10 @@ interface BasicUserInfo {
|
|||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
avatar: string;
|
avatar: string;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
email: string;
|
||||||
/**
|
/**
|
||||||
* 用户权限
|
* 用户权限
|
||||||
*/
|
*/
|
||||||
|
@ -6,6 +6,10 @@ interface BasicUserInfo {
|
|||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
avatar: string;
|
avatar: string;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
email: string;
|
||||||
/**
|
/**
|
||||||
* 用户权限
|
* 用户权限
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user