Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Mar 31, 2022
1 parent 7841f54 commit 3c71af0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions resources/assets/js/components/UserAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="avatar-wrapper">
<div v-if="showIcon" :class="['avatar-box', userId === userid || user.online ? 'online' : '']" :style="boxStyle">
<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>
</EAvatar>
<EAvatar v-else :size="avatarSize" class="avatar-text">
Expand Down Expand Up @@ -197,18 +197,18 @@
},
setUser(info) {
if (this.user && this.user.userimg != info.usering) {
this.user = null
this.$nextTick(() => {
this.user = info
})
} else {
this.user = info
try {
if (this.user && this.user.userimg != info.userimg && this.$refs.avatar) {
this.$refs.avatar.$data.isImageExist = true;
}
} catch (e) {
//
}
this.user = info;
},
onError() {
return false
return true
},
openDialog() {
Expand Down

0 comments on commit 3c71af0

Please sign in to comment.