样式: 用户区改为昵称在左头像在右,缩小顶栏右侧间隔
CI/CD Deploy (Web) / 构建前端镜像并部署 (push) Successful in 37s

This commit is contained in:
张家训
2026-10-20 18:34:12 +08:00
parent a8db90fea1
commit 86202d0c13
4 changed files with 8 additions and 6 deletions
@@ -5,7 +5,8 @@
.custom-content-con{
float: right;
height: auto;
padding-right: 20px;
// 顶栏内容紧贴右缘,留 6px 呼吸间距即可
padding-right: 6px;
line-height: 64px;
& > *{
float: right;
@@ -3,7 +3,7 @@
cursor: pointer;
display: inline-block;
vertical-align: middle;
padding: 4px 10px;
padding: 4px 6px 4px 10px;
border-radius: 20px;
transition: background .18s;
&:hover{
@@ -21,12 +21,12 @@
&:hover .user-avatar{
transform: scale(1.06);
}
// 姓名:常规字重,与头像平衡
// 昵称在左、头像在右;昵称右侧留 8px 与头像分隔
.user-nick{
font-size: 14px;
font-weight: 500;
color: #3d4a66;
margin-left: 8px;
margin-right: 8px;
vertical-align: middle;
}
}
+1 -1
View File
@@ -1,8 +1,8 @@
<template>
<div class="user-avator-dropdown">
<Dropdown @on-click="handleClick">
<Avatar :key="userAvator" :src="userAvator || undefined" class="user-avatar" :style="avatarStyle">{{ avatarText }}</Avatar>
<span class="user-nick">{{ nickname }}</span>
<Avatar :key="userAvator" :src="userAvator || undefined" class="user-avatar" :style="avatarStyle">{{ avatarText }}</Avatar>
<DropdownMenu slot="list">
<DropdownItem name="personal-center">个人中心</DropdownItem>
<DropdownItem name="logout" style="color: #ed4014" divided>退出登录</DropdownItem>
+2 -1
View File
@@ -32,7 +32,8 @@
}
.header-con{
background: #fff;
padding: 0 20px;
// 左侧留 20px 给折叠按钮,右侧贴边(用户区自带 6px 呼吸间距)
padding: 0 0 0 20px;
width: 100%;
}
.main-layout-con{