用户信息显示优化

This commit is contained in:
liuwei
2025-04-15 09:07:25 +08:00
parent eaad0ce758
commit 4e40d360ad

View File

@@ -22,7 +22,7 @@
<!-- 左侧用户信息 -->
<el-col :span="6">
<div class="chart-container pie-chart-container user-info-chart">
<h4>用户信息</h4>
<!-- 移除了"用户信息"标题 -->
<div v-if="currentUser.success" class="user-info-container">
<div class="user-avatar-container">
<img :src="'/static/' + currentUser.data.avatar" alt="用户头像" />
@@ -32,6 +32,7 @@
<span class="user-info-label">昵称:</span>
<span class="user-info-value">{% raw %}{{ currentUser.data.nickname || '未知用户' }}{% endraw %}</span>
</div>
<!-- 其他用户信息项保持不变 -->
<div class="user-info-item">
<span class="user-info-label">微信ID:</span>
<span class="user-info-value">{% raw %}{{ currentUser.data.wx_id }}{% endraw %}</span>
@@ -657,29 +658,24 @@
box-shadow: none;
}
.user-info-chart h4 {
margin-top: 0;
margin-bottom: 5px;
font-size: 12px;
color: #606266;
}
.user-info-container {
padding: 0;
display: flex;
flex-direction: column;
flex: 1;
justify-content: center;
/* 确保与饼图容器高度一致 */
height: 80px;
}
.user-avatar-container {
text-align: center;
margin-bottom: 10px;
margin-bottom: 5px; /* 减小底部间距 */
}
.user-avatar-container img {
width: 56px;
height: 56px;
width: 50px; /* 稍微缩小头像 */
height: 50px;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);