feat:不展示文档、展示角色名称
This commit is contained in:
@@ -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"
|
||||||
/>
|
/>
|
||||||
|
@@ -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)
|
||||||
|
|
||||||
|
@@ -18,6 +18,8 @@ interface BasicUserInfo {
|
|||||||
* 用户角色
|
* 用户角色
|
||||||
*/
|
*/
|
||||||
roles: string[];
|
roles: string[];
|
||||||
|
|
||||||
|
roleName: string;
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user