| | |
| | | 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; |
| | | }, |
| | | loadReplyData, |
| | | scrollToBottom, |
| | | }); |
| | | const chatListLoading = ref(true); |
| | | |
| | |
| | | }; |
| | | sendChatMessage(); |
| | | }; |
| | | const scrollToBottom = () => { |
| | | containerRef.value?.scrollToBottom(); |
| | | }; |
| | | |
| | | |
| | | const initHistoryChat = () => { |
| | | // 初始状态滚一下 |