From eb478cf8918b2079d5b0d18083a3254c3245f464 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 19 Sep 2025 16:20:03 +0800 Subject: [PATCH] feat(Smart Question): In the conversation window, when there are many messages and a scroll bar appears, the scroll bar will automatically scroll to the bottom --- frontend/src/views/chat/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/chat/index.vue b/frontend/src/views/chat/index.vue index 8f2e5bfe0..afb99444e 100644 --- a/frontend/src/views/chat/index.vue +++ b/frontend/src/views/chat/index.vue @@ -501,7 +501,7 @@ let scrollTopVal = 0 let scrolling = false const scrollBottom = () => { if (scrolling) return - if (!isTyping.value) { + if (!isTyping.value && !getRecommendQuestionsLoading.value) { clearInterval(scrollTime) } chatListRef.value!.setScrollTop(innerRef.value!.clientHeight) @@ -671,11 +671,14 @@ function quickAsk(question: string) { } const chartAnswerRef = ref() - +const getRecommendQuestionsLoading = ref(false) async function onChartAnswerFinish(id: number) { + getRecommendQuestionsLoading.value = true loading.value = false isTyping.value = false - getRecommendQuestions(id) + getRecommendQuestions(id).finally(() => { + getRecommendQuestionsLoading.value = false + }) } function onChartAnswerError() {