fix(chat): Automatic scrolling to distinguish between PC and assistant

This commit is contained in:
dataeaseShu
2025-08-21 17:35:15 +08:00
parent 8dd6cf8953
commit 4633cc04be
+7 -4
View File
@@ -477,6 +477,7 @@ const scrollBottom = () => {
}
const handleScroll = (val: any) => {
if (!isCompletePage.value) return
scrollTopVal = val.scrollTop
scrolling = true
clearTimeout(scrollingTime)
@@ -676,10 +677,12 @@ const sendMessage = async ($event: any = {}) => {
loading.value = true
isTyping.value = true
scrollTopVal = innerRef.value!.clientHeight
scrollTime = setInterval(() => {
scrollBottom()
}, 300)
if (isCompletePage.value) {
scrollTopVal = innerRef.value!.clientHeight
scrollTime = setInterval(() => {
scrollBottom()
}, 300)
}
await assistantPrepareSend()
const currentRecord = new ChatRecord()
currentRecord.create_time = new Date()