mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
chore(用户资料): 添加头像和昵称的编辑按钮
- 在头像和昵称旁边添加编辑按钮,提升用户操作便捷性 - 移除原有的更新资料按钮,优化界面布局 - 调整角色信息显示位置至用户名旁边
This commit is contained in:
@@ -13,17 +13,23 @@
|
|||||||
<a-avatar v-else size="100" class="user-avatar default-avatar">
|
<a-avatar v-else size="100" class="user-avatar default-avatar">
|
||||||
{{ userInfo.username }}
|
{{ userInfo.username }}
|
||||||
</a-avatar>
|
</a-avatar>
|
||||||
|
<a-button type="text" size="small" class="avatar-edit-btn" title="修改资料" @click.stop="doUpdate">
|
||||||
|
<template #icon><fs-icon icon="ion:create-outline" /></template>
|
||||||
|
</a-button>
|
||||||
<!-- <div class="status-indicator"></div> -->
|
<!-- <div class="status-indicator"></div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<h2 class="user-name flex items-center">
|
<h2 class="user-name flex items-center">
|
||||||
{{ userInfo.nickName }}
|
<span>{{ userInfo.nickName }}</span>
|
||||||
<fs-values-format :model-value="userInfo.roleIds" :dict="roleDict" color="blue" />
|
<a-button type="text" size="small" class="detail-edit-btn" title="修改资料" @click.stop="doUpdate">
|
||||||
|
<template #icon><fs-icon icon="ion:create-outline" /></template>
|
||||||
|
</a-button>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="user-details">
|
<div class="user-details">
|
||||||
<a-tag color="blue" class="detail-tag">
|
<a-tag color="blue" class="detail-tag">
|
||||||
<span class="tag-icon">👤</span>
|
<span class="tag-icon">👤</span>
|
||||||
{{ userInfo.username }}
|
{{ userInfo.username }}
|
||||||
|
<fs-values-format :model-value="userInfo.roleIds" type="text" :dict="roleDict" color="blue" />
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<a-tag color="green" class="detail-tag">
|
<a-tag color="green" class="detail-tag">
|
||||||
<span class="tag-icon">📧</span>
|
<span class="tag-icon">📧</span>
|
||||||
@@ -42,9 +48,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons gap-2">
|
<div class="action-buttons gap-2">
|
||||||
<a-button type="primary" class="action-btn" @click="doUpdate">
|
|
||||||
{{ t("authentication.updateProfile") }}
|
|
||||||
</a-button>
|
|
||||||
<change-password-button :show-button="true" />
|
<change-password-button :show-button="true" />
|
||||||
|
|
||||||
<a-button type="primary" class="action-btn" @click="goSecuritySetting">
|
<a-button type="primary" class="action-btn" @click="goSecuritySetting">
|
||||||
@@ -595,6 +598,24 @@ onMounted(async () => {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar-edit-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 2px;
|
||||||
|
bottom: 2px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
min-width: 28px;
|
||||||
|
padding: 0;
|
||||||
|
color: #667eea;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px solid #e5e7eb;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
border: 4px solid #ffffff;
|
border: 4px solid #ffffff;
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
||||||
|
|||||||
Reference in New Issue
Block a user