From d5ec55700e1368b646579fbad0edf54585e1d988 Mon Sep 17 00:00:00 2001 From: zhihao <18915542763@163.com> Date: Wed, 10 Jun 2026 16:39:35 +0800 Subject: [PATCH] =?UTF-8?q?czh-20260610-=E5=8F=B3=E4=B8=8A=E8=A7=92?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=94=A8=E6=88=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/default/header/index.vue | 43 +++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/src/layouts/default/header/index.vue b/src/layouts/default/header/index.vue index 3186611..ab12ff5 100644 --- a/src/layouts/default/header/index.vue +++ b/src/layouts/default/header/index.vue @@ -11,9 +11,12 @@ /> - + - {{t('layout.header.welcomeIn')}} {{ title }} + {{ t('layout.header.welcomeIn') }} {{ title }} @@ -42,6 +45,7 @@ + {{ realname }} @@ -108,7 +112,7 @@ const { prefixCls } = useDesign('layout-header'); const userStore = useUserStore(); const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting(); - const { getUseErrorHandle, /* getShowSettingButton, getSettingButtonPosition, getAiIconShow */ } = useRootSetting(); + const { getUseErrorHandle /* getShowSettingButton, getSettingButtonPosition, getAiIconShow */ } = useRootSetting(); const { title } = useGlobSetting(); const { @@ -167,6 +171,10 @@ return unref(getSplit) ? MenuModeEnum.HORIZONTAL : null; }); + const realname = computed(() => { + return userStore.getUserInfo?.realname || ''; + }); + /** * 首页多租户部门弹窗逻辑 */ @@ -210,6 +218,7 @@ getUseErrorHandle, getLogoWidth, getIsMixSidebar, + realname, // getShowSettingButton, // getShowSetting, // getShowSearch, @@ -228,7 +237,7 @@ //update-begin---author:scott ---date:2022-09-30 for:默认隐藏顶部菜单面包屑----------- //顶部欢迎语展示样式 @prefix-cls: ~'@{namespace}-layout-header'; - + .ant-layout .@{prefix-cls} { display: flex; padding: 0 8px; @@ -236,7 +245,7 @@ height: @header-height; // update-end--author:liaozhiyang---date:20240407---for:【QQYUN-8762】顶栏高度 align-items: center; - + .headerIntroductionClass { margin-right: 4px; margin-bottom: 2px; @@ -251,7 +260,26 @@ height: 32px; width: auto; } - + + .header-username { + font-size: 13px; + font-weight: 500; + cursor: default; + pointer-events: none; + } + + &--light { + .header-username { + color: #1677ff; + } + } + + &--dark { + .header-username { + color: rgba(255, 255, 255, 0.85); + } + } + &--light { .headerIntroductionClass { color: #000; @@ -262,7 +290,8 @@ .headerIntroductionClass { color: rgba(255, 255, 255, 1); } - .anticon, .truncate { + .anticon, + .truncate { color: rgba(255, 255, 255, 1); } }