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