perf: 群聊信息预览显示发言人昵称

This commit is contained in:
kuaifan 2022-04-15 22:09:26 +08:00
parent 1de42f5c72
commit 64e53b3dd0
2 changed files with 28 additions and 4 deletions

View File

@ -57,7 +57,14 @@
<Icon v-if="dialog.type == 'user' && lastMsgReadDone(dialog.last_msg)" :type="lastMsgReadDone(dialog.last_msg)"/>
<em v-if="dialog.last_at">{{$A.formatTime(dialog.last_at)}}</em>
</div>
<div class="dialog-text no-dark-mode">{{formatLastMsg(dialog.last_msg)}}</div>
<div class="dialog-text no-dark-mode">
<UserAvatar
v-if="dialog.type=='group' && dialog.last_msg.userid != userId"
:userid="dialog.last_msg.userid"
:show-name="true"
:show-icon="false"/>
<div class="last-text">{{formatLastMsg(dialog.last_msg)}}</div>
</div>
</div>
<Badge class="dialog-num" :count="$A.getDialogUnread(dialog)"/>
</li>

View File

@ -166,9 +166,26 @@
color: #999999;
font-size: 12px;
line-height: 24px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: center;
.common-avatar {
padding-right: 4px;
margin-right: 4px;
position: relative;
&:after {
content: ":";
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
}
}
.last-text {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.dialog-num {