优化header用户信息区域背景色显示方式

This commit is contained in:
jingrow 2025-12-28 21:00:04 +08:00
parent d042079a9f
commit 91ba49e4f0

View File

@ -37,10 +37,11 @@
:options="mobileDropdownOptions"
:show-arrow="true"
trigger="click"
v-model:show="isMobileDropdownOpen"
@select="handleMobileDropdownSelect"
placement="bottom-start"
>
<div class="mobile-user-info-wrapper">
<div class="mobile-user-info-wrapper" :class="{ 'mobile-user-info-wrapper--active': isMobileDropdownOpen }">
<div class="mobile-user-info">
{{ teamUserText }}
</div>
@ -111,6 +112,7 @@ const route = useRoute();
const team = getTeam();
const instance = getCurrentInstance();
const showTeamSwitcher = ref(false);
const isMobileDropdownOpen = ref(false);
// Naive UI - 使 tooltip menu
const themeOverrides = {
@ -359,14 +361,14 @@ n-config-provider {
max-width: calc(100% - 80px);
}
.mobile-user-info-wrapper:hover {
background: rgba(0, 0, 0, 0.04);
}
.mobile-user-info-wrapper:active {
background: rgba(0, 0, 0, 0.06);
}
.mobile-user-info-wrapper--active {
background: rgba(0, 0, 0, 0.04);
}
.mobile-user-info {
font-size: 14px;
font-weight: 500;