mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
feat: 头像加载失败时显示名称首字
This commit is contained in:
parent
0e34cc49df
commit
01a2244fed
@ -16,7 +16,9 @@
|
||||
<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"/>
|
||||
<EAvatar v-if="showImg" :class="{'avatar-default':isDefault}" :src="user.userimg" :size="avatarSize" @error="onError">
|
||||
<span :style="spotStyle">{{nickname}}</span>
|
||||
</EAvatar>
|
||||
<EAvatar v-else :size="avatarSize" class="avatar-text">
|
||||
<span :style="spotStyle">{{nickname}}</span>
|
||||
</EAvatar>
|
||||
@ -194,6 +196,10 @@
|
||||
this.$store.dispatch("getUserBasic", {userid: this.userid});
|
||||
},
|
||||
|
||||
onError() {
|
||||
return false
|
||||
},
|
||||
|
||||
openDialog() {
|
||||
this.goForward({path: '/manage/messenger'});
|
||||
this.$store.dispatch("openDialogUserid", this.userid).catch(() => {})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user