| | |
| | | |
| | | <!-- 输入区域 --> |
| | | <template #input-area> |
| | | <PlayBar |
| | | ref="playBarRef" |
| | | v-model:voicePageIsShow="voicePageIsShow" |
| | | :isTalking="isTalking" |
| | | :isHome="false" |
| | | :msgList="computedMessageList" |
| | | v-model="messageContent.values" |
| | | @sendClick="sendClick" |
| | | @stopGenClick="stopGenClick" |
| | | :style="{ width: chatWidth }" |
| | | /> |
| | | <div class="w-full "> |
| | | <PlayBar |
| | | ref="playBarRef" |
| | | v-model:voicePageIsShow="voicePageIsShow" |
| | | :isTalking="isTalking" |
| | | :isHome="false" |
| | | :msgList="computedMessageList" |
| | | v-model="messageContent.values" |
| | | @sendClick="sendClick" |
| | | @stopGenClick="stopGenClick" |
| | | :style="{ width: chatWidth }" |
| | | class="mx-auto" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <!-- 抽屉 --> |
| | |
| | | import { useSyncMsg } from './hooks/useSyncMsg'; |
| | | const containerRef = useCompRef(ChatContainer); |
| | | const chatListDom = computed(() => containerRef.value?.chatListDom); |
| | | |
| | | const scrollToBottom = () => { |
| | | containerRef.value?.scrollToBottom(); |
| | | }; |
| | | const { loadReplyData, parseContent, parseExtraContent, convertProcessItem, convertProcessToStep, formatShowTimeYear } = useLoadData(); |
| | | const voicePageIsShow = ref(false); |
| | | let isTalking = ref(false); |
| | |
| | | loadReplyData, |
| | | }); |
| | | useSyncMsg({ |
| | | msgList: computedMessageList, |
| | | msgList: messageList, |
| | | updateLoadIndex, |
| | | historyGroupId: currentRouteId, |
| | | checkCanSync: (data) => { |
| | | return !isTalking.value && !moreIsLoading.value; |
| | | }, |
| | | showTip: (data) => { |
| | | playBarRef.value.showSyncTip(data); |
| | | }, |
| | | loadReplyData, |
| | | scrollToBottom, |
| | | }); |
| | | const chatListLoading = ref(true); |
| | | |
| | |
| | | values: activeChatRoom.value?.title, |
| | | }; |
| | | sendChatMessage(); |
| | | }; |
| | | const scrollToBottom = () => { |
| | | containerRef.value?.scrollToBottom(); |
| | | }; |
| | | |
| | | const initHistoryChat = () => { |