diff --git a/pages/chat/components/messageListItem.vue b/pages/chat/components/messageListItem.vue index 0634878b..06a718de 100644 --- a/pages/chat/components/messageListItem.vue +++ b/pages/chat/components/messageListItem.vue @@ -4,12 +4,20 @@ - + {{ formatDate(message.createTime) }} - + {{ message.content }} @@ -18,32 +26,35 @@ v-if="message.contentType !== KeFuMessageContentTypeEnum.SYSTEM" class="ss-flex ss-col-top" :class="[ - message.senderType === UserTypeEnum.ADMIN - ? `ss-row-left` - : message.senderType === UserTypeEnum.MEMBER - ? `ss-row-right` - : '', - ]" + message.senderType === UserTypeEnum.ADMIN + ? `ss-row-left` + : message.senderType === UserTypeEnum.MEMBER + ? `ss-row-right` + : '', + ]" > @@ -104,7 +109,7 @@ // 消息 message: { type: Object, - default: ()=>({}), + default: () => ({}), }, // 消息索引 messageIndex: { @@ -112,10 +117,10 @@ default: 0, }, // 消息列表 - messageList:{ + messageList: { type: Array, default: () => [], - } + }, }); const getMessageContent = computed(() => (item) => JSON.parse(item.content)); // 解析消息内容