diff --git a/src/views/mall/promotion/kefu/components/KeFuChatBox.vue b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue index cba5869b..da25c9d9 100644 --- a/src/views/mall/promotion/kefu/components/KeFuChatBox.vue +++ b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue @@ -19,49 +19,18 @@ class="flex mb-20px w-[100%]" >
- - + - +
@@ -94,14 +63,14 @@ import { KeFuMessageApi, KeFuMessageRespVO } from '@/api/mall/promotion/kefu/mes import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation' import EmojiSelectPopover from './tools/EmojiSelectPopover.vue' import PictureSelectUpload from './tools/PictureSelectUpload.vue' -import { Emoji, useEmoji } from './tools/emoji' +import TextMessageItem from './message/TextMessageItem.vue' +import ImageMessageItem from './message/ImageMessageItem.vue' +import { Emoji } from './tools/emoji' import { KeFuMessageContentTypeEnum } from './tools/constants' import { isEmpty } from '@/utils/is' import { UserTypeEnum } from '@/utils/constants' -import { createImageViewer } from '@/components/ImageViewer' defineOptions({ name: 'KeFuMessageBox' }) -const { replaceEmoji } = useEmoji() const messageTool = useMessage() const message = ref('') // 消息 const messageList = ref([]) // 消息列表 @@ -175,13 +144,6 @@ const scrollToBottom = async () => { scrollbarRef.value!.setScrollTop(innerRef.value!.clientHeight) } -/** 图预览 */ -const imagePreview = (imgUrl: string) => { - createImageViewer({ - urlList: [imgUrl] - }) -} - // TODO puhui999: 轮训相关,功能完善后移除 onBeforeUnmount(() => { if (!poller.value) { diff --git a/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue b/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue new file mode 100644 index 00000000..7b890cf1 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue b/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue new file mode 100644 index 00000000..fd4b6edb --- /dev/null +++ b/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue @@ -0,0 +1,29 @@ + + +