style:优化头像样式

This commit is contained in:
妙码生花 2024-10-11 21:12:09 +08:00
parent fef6f337b1
commit 5663698ecd
3 changed files with 8 additions and 8 deletions

View File

@ -74,17 +74,13 @@
>
<template #reference>
<div class="admin-info" :class="state.currentNavMenu == 'adminInfo' ? 'hover' : ''">
<el-avatar :size="25" fit="fill">
<img :src="fullUrl(adminInfo.avatar)" alt="" />
</el-avatar>
<el-avatar :size="25" :src="fullUrl(adminInfo.avatar)"></el-avatar>
<div class="admin-name">{{ adminInfo.nickname }}</div>
</div>
</template>
<div>
<div class="admin-info-base">
<el-avatar :size="70" fit="fill">
<img :src="fullUrl(adminInfo.avatar)" alt="" />
</el-avatar>
<el-avatar :size="70" :src="fullUrl(adminInfo.avatar)"></el-avatar>
<div class="admin-info-other">
<div class="admin-info-name">{{ adminInfo.nickname }}</div>
<div class="admin-info-lasttime">{{ adminInfo.last_login_time }}</div>

View File

@ -94,11 +94,15 @@ const routerPush = (routeName = '', route?: RouteRecordRaw) => {
}
.user-avatar-box {
position: relative;
width: 100px;
height: 100px;
cursor: pointer;
}
.user-avatar {
display: block;
width: 100px;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
.user-avatar-gender {

View File

@ -12,7 +12,7 @@
accept="image/gif, image/jpg, image/jpeg, image/bmp, image/png, image/webp"
v-if="!isEmpty(state.adminInfo)"
>
<el-image :src="fullUrl(state.adminInfo.avatar)" class="avatar">
<el-image fit="cover" :src="fullUrl(state.adminInfo.avatar)" class="avatar">
<template #error>
<div class="image-slot">
<Icon size="30" color="#c0c4cc" name="el-icon-Picture" />