|
|
|
@ -15,7 +15,8 @@ |
|
|
|
<view class="chat-content"> |
|
|
|
<view class="chat-at-text">{{ atText }}</view> |
|
|
|
<view class="chat-send-name" v-if="isShowSendName">{{ chat.sendNickName + ': ' }}</view> |
|
|
|
<rich-text class="chat-content-text" |
|
|
|
<view v-if="!isTextMessage" class="chat-content-text">{{chat.lastContent}}</view> |
|
|
|
<rich-text v-else class="chat-content-text" |
|
|
|
:nodes="$emo.transform(chat.lastContent,'emoji-small')"></rich-text> |
|
|
|
<view v-if="chat.isDnd" class="icon iconfont icon-dnd"></view> |
|
|
|
<uni-badge v-else-if="chat.unreadCount > 0" :max-num="99" :text="chat.unreadCount" /> |
|
|
|
@ -77,7 +78,12 @@ export default { |
|
|
|
return "[@全体成员]" |
|
|
|
} |
|
|
|
return ""; |
|
|
|
} |
|
|
|
}, |
|
|
|
isTextMessage() { |
|
|
|
let idx = this.chat.messages.length - 1; |
|
|
|
let messageType = this.chat.messages[idx].type; |
|
|
|
return messageType == this.$enums.MESSAGE_TYPE.TEXT; |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|