feat:不展示文档、展示角色名称

This commit is contained in:
2025-09-09 17:49:34 +08:00
parent 9aefed746d
commit e479f3851c
3 changed files with 13 additions and 10 deletions

View File

@@ -41,15 +41,15 @@ const { destroyWatermark, updateWatermark } = useWatermark();
const tenantStore = useTenantStore(); const tenantStore = useTenantStore();
const menus = computed(() => { const menus = computed(() => {
const defaultMenus = [ const defaultMenus = [
{ // {
handler: () => { // handler: () => {
openWindow(VBEN_DOC_URL, { // openWindow(VBEN_DOC_URL, {
target: '_blank', // target: '_blank',
}); // });
}, // },
icon: BookOpenText, // icon: BookOpenText,
text: $t('ui.widgets.document'), // text: $t('ui.widgets.document'),
}, // },
{ {
handler: () => { handler: () => {
router.push('/profile'); router.push('/profile');
@@ -146,7 +146,7 @@ watch(
:avatar :avatar
:menus :menus
:text="userStore.userInfo?.realName" :text="userStore.userInfo?.realName"
:description="userStore.userInfo?.roles[0]" :description="userStore.userInfo?.roleName"
tag-text="Pro" tag-text="Pro"
@logout="handleLogout" @logout="handleLogout"
/> />

View File

@@ -116,6 +116,7 @@ export const useAuthStore = defineStore('auth', () => {
roles, roles,
userId: user.userId, userId: user.userId,
username: user.userName, username: user.userName,
roleName:user.roles[0]?.roleName,
} }
userStore.setUserInfo(userInfo) userStore.setUserInfo(userInfo)

View File

@@ -18,6 +18,8 @@ interface BasicUserInfo {
* 用户角色 * 用户角色
*/ */
roles: string[]; roles: string[];
roleName: string;
/** /**
* 用户id * 用户id
*/ */