File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/views/chat/layout/sider Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11<script setup lang='ts'>
22import { computed , onMounted , ref } from ' vue'
33import { NInput , NPopconfirm , NScrollbar , NSpin } from ' naive-ui'
4+ import { useScroll } from ' ../../hooks/useScroll'
45import { SvgIcon } from ' @/components/common'
56import { useAppStore , useChatStore } from ' @/store'
67import { useBasicLayout } from ' @/hooks/useBasicLayout'
78import { useAuthStoreWithout } from ' @/store/modules/auth'
89import { debounce } from ' @/utils/functions/debounce'
910
11+ const { scrollToBottom } = useScroll ()
1012const { isMobile } = useBasicLayout ()
1113
1214const appStore = useAppStore ()
@@ -26,6 +28,11 @@ async function handleSyncChatRoom() {
2628 loadingRoom .value = true
2729 chatStore .syncHistory (() => {
2830 loadingRoom .value = false
31+ // 本来这里不需要的, 但是 vue 渲染的时候 chat 可能优先渲染等原因 导致概率不刷新
32+ if (chatStore .active ) {
33+ const uuid = chatStore .active
34+ chatStore .syncChat ({ uuid } as Chat .History , undefined , scrollToBottom )
35+ }
2936 })
3037}
3138
You can’t perform that action at this time.
0 commit comments