修复头像错位问题

This commit is contained in:
吕金泽 2022-08-05 18:55:16 +08:00
parent f8c4f3ae70
commit 671275a4a3

View File

@ -7,18 +7,20 @@
<div class="header-right"> <div class="header-right">
<div class="avatar"> <div class="avatar">
<el-dropdown> <el-dropdown>
<el-col> <el-row :gutter="24">
<el-avatar v-if="$global.user.info.headPortrait" :size="40" fit="contain" :src="$global.baseApi + $global.user.info.headPortrait"></el-avatar> <el-col :span="6">
<el-avatar v-else :size="40" fit="contain"> <el-avatar v-if="$global.user.info.headPortrait" :size="40" fit="contain" :src="$global.baseApi + $global.user.info.headPortrait"></el-avatar>
{{ $global.user.info.name.substring(0,1) }} <el-avatar v-else :size="40" fit="contain">
</el-avatar> {{ $global.user.info.name.substring(0,1) }}
</el-col> </el-avatar>
<el-col style="line-height: 40px;"> </el-col>
<span class="username">{{ $global.user.info.username }}</span> <el-col :span="18" style="line-height: 40px;">
<el-icon class="el-icon--right" color="white"> <span class="username">{{ $global.user.info.username }}</span>
<arrow-down /> <el-icon class="el-icon--right" color="white">
</el-icon> <arrow-down />
</el-col> </el-icon>
</el-col>
</el-row>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<router-link to="/user-center"> <router-link to="/user-center">