wujingjing
2025-01-17 4e04b16f7bf497502508101c45ef6ff0209b13e2
src/components/chat/Chat.vue
@@ -78,7 +78,9 @@
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);
@@ -427,9 +429,14 @@
   loadReplyData,
});
useSyncMsg({
   msgList: computedMessageList,
   msgList: messageList,
   updateLoadIndex,
   historyGroupId: currentRouteId,
   checkCanSync: (data) => {
      return !isTalking.value && !moreIsLoading.value;
   },
   loadReplyData,
   scrollToBottom,
});
const chatListLoading = ref(true);
@@ -444,9 +451,7 @@
   };
   sendChatMessage();
};
const scrollToBottom = () => {
   containerRef.value?.scrollToBottom();
};
const initHistoryChat = () => {
   // 初始状态滚一下