perf: 优化顶部栏头像展开用户信息绑定
This commit is contained in:
parent
f913955259
commit
bcbb78268d
@ -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>
|
||||
|
@ -118,6 +118,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
roles,
|
||||
userId: user.userId,
|
||||
username: user.userName,
|
||||
email: user.email ?? '',
|
||||
};
|
||||
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;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* 用户权限
|
||||
*/
|
||||
|
@ -6,6 +6,10 @@ interface BasicUserInfo {
|
||||
* 头像
|
||||
*/
|
||||
avatar: string;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
email: string;
|
||||
/**
|
||||
* 用户权限
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user