no message

This commit is contained in:
kuaifan 2022-04-01 07:14:57 +08:00
parent 7841f54db8
commit 3c71af064c

View File

@ -16,7 +16,7 @@
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<div v-if="showIcon" :class="['avatar-box', userId === userid || user.online ? 'online' : '']" :style="boxStyle"> <div v-if="showIcon" :class="['avatar-box', userId === userid || user.online ? 'online' : '']" :style="boxStyle">
<em :style="spotStyle"></em> <em :style="spotStyle"></em>
<EAvatar v-if="showImg" :class="{'avatar-default':isDefault}" :src="user.userimg" :size="avatarSize" @error="onError"> <EAvatar v-if="showImg" ref="avatar" :class="{'avatar-default':isDefault}" :src="user.userimg" :size="avatarSize" :error="onError">
<span class="avatar-char" :style="spotStyle">{{nickname}}</span> <span class="avatar-char" :style="spotStyle">{{nickname}}</span>
</EAvatar> </EAvatar>
<EAvatar v-else :size="avatarSize" class="avatar-text"> <EAvatar v-else :size="avatarSize" class="avatar-text">
@ -197,18 +197,18 @@
}, },
setUser(info) { setUser(info) {
if (this.user && this.user.userimg != info.usering) { try {
this.user = null if (this.user && this.user.userimg != info.userimg && this.$refs.avatar) {
this.$nextTick(() => { this.$refs.avatar.$data.isImageExist = true;
this.user = info
})
} else {
this.user = info
} }
} catch (e) {
//
}
this.user = info;
}, },
onError() { onError() {
return false return true
}, },
openDialog() { openDialog() {