From 4633cc04be4fce3edf859b9f3dc97b5eb1444fcb Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 21 Aug 2025 17:35:15 +0800 Subject: [PATCH] fix(chat): Automatic scrolling to distinguish between PC and assistant --- frontend/src/views/chat/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue index 5d6e4e9e..c92a521f 100644 --- a/frontend/src/views/chat/index.vue +++ b/frontend/src/views/chat/index.vue @@ -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()