优化:导航栏的显示

This commit is contained in:
ivan 2026-02-25 21:22:15 +08:00
parent e41d6b5b0d
commit 2306b34e00

View File

@ -13,9 +13,6 @@ const router = useRouter()
const userStore = useUserStore() const userStore = useUserStore()
const currentRoute = computed(() => route.path) const currentRoute = computed(() => route.path)
const displayName = computed(
() => userStore.user?.nickName || userStore.user?.userName || ''
)
async function refreshUserData() { async function refreshUserData() {
if (!userStore.isLoggedIn) return if (!userStore.isLoggedIn) return
@ -86,7 +83,6 @@ watch(
> >
<span class="balance-text">${{ userStore.balance }}</span> <span class="balance-text">${{ userStore.balance }}</span>
</v-btn> </v-btn>
<span v-if="displayName" class="header-username">{{ displayName }}</span>
<v-menu location="bottom" :close-on-content-click="false"> <v-menu location="bottom" :close-on-content-click="false">
<template #activator="{ props }"> <template #activator="{ props }">
<v-btn v-bind="props" icon variant="text" class="avatar-btn"> <v-btn v-bind="props" icon variant="text" class="avatar-btn">
@ -129,16 +125,6 @@ watch(
text-transform: none; text-transform: none;
} }
.header-username {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.95);
margin-right: 4px;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.balance-text { .balance-text {
font-weight: 500; font-weight: 500;
font-size: 0.95rem; font-size: 0.95rem;