| | |
| | | import { useCompRef } from '/@/utils/types'; |
| | | import { toMyFixed } from '/@/utils/util'; |
| | | import { useLoadData } from './hooks/useLoadData'; |
| | | import { useSyncMsg } from './hooks/useSyncMsg'; |
| | | const containerRef = useCompRef(ChatContainer); |
| | | const chatListDom = computed(() => containerRef.value?.chatListDom); |
| | | |
| | |
| | | sendChatMessage(messageContent.value); |
| | | }; |
| | | |
| | | |
| | | const { loadRangeData, onChatListScroll, moreIsLoading, updateLoadIndex } = useScrollLoad({ |
| | | container: chatListDom, |
| | | historyGroupId: currentRouteId, |
| | | messageList, |
| | | loadReplyData, |
| | | }); |
| | | |
| | | useSyncMsg({ |
| | | msgList: messageList, |
| | | updateLoadIndex, |
| | | }); |
| | | const chatListLoading = ref(true); |
| | | |
| | | onActivated(() => { |