fix: avatar

This commit is contained in:
xingyu 2023-09-11 16:54:34 +08:00
parent 1fe950aea5
commit 9a6d29b295
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="user-info-head" @click="open()"> <div class="user-info-head" @click="open()">
<img v-if="sourceValue" :src="sourceValue" alt="avatar" class="img-circle img-lg" /> <el-avatar v-if="sourceValue" :src="sourceValue" alt="avatar" class="img-circle img-lg" />
<img v-if="!sourceValue" :src="avatar" alt="avatar" class="img-circle img-lg" /> <el-avatar v-if="!sourceValue" :src="avatar" alt="avatar" class="img-circle img-lg" />
<el-button v-if="showBtn" :class="`${prefixCls}-upload-btn`" @click="open()"> <el-button v-if="showBtn" :class="`${prefixCls}-upload-btn`" @click="open()">
{{ btnText ? btnText : t('cropper.selectImage') }} {{ btnText ? btnText : t('cropper.selectImage') }}
</el-button> </el-button>

View File

@ -53,7 +53,7 @@ const toDocument = () => {
<template> <template>
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click"> <ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<div class="flex items-center"> <div class="flex items-center">
<img :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" /> <ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
<span class="<lg:hidden text-14px pl-[5px] text-[var(--top-header-text-color)]"> <span class="<lg:hidden text-14px pl-[5px] text-[var(--top-header-text-color)]">
{{ userName }} {{ userName }}
</span> </span>