fix(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

This commit is contained in:
dataeaseShu
2025-09-19 16:37:18 +08:00
committed by dataeaseShu
parent 51c419df32
commit 97ffc34a42
2 changed files with 9 additions and 4 deletions
@@ -21,7 +21,7 @@ const props = withDefaults(
}
)
const emits = defineEmits(['clickQuestion', 'update:currentChat', 'stop'])
const emits = defineEmits(['clickQuestion', 'update:currentChat', 'stop', 'loadingOver'])
const loading = ref(false)
@@ -134,6 +134,7 @@ async function getRecommendQuestions() {
}
} finally {
loading.value = false
emits('loadingOver')
}
}
+7 -3
View File
@@ -195,6 +195,7 @@
:first-chat="message.first_chat"
@click-question="quickAsk"
@stop="onChatStop"
@loadingOver="loadingOver"
/>
<UserChat v-if="message.role === 'user'" :message="message" />
<template v-if="message.role === 'assistant' && !message.first_chat">
@@ -286,6 +287,7 @@
:first-chat="message.first_chat"
:disabled="isTyping"
@click-question="quickAsk"
@loadingOver="loadingOver"
@stop="onChatStop"
/>
</template>
@@ -676,9 +678,11 @@ async function onChartAnswerFinish(id: number) {
getRecommendQuestionsLoading.value = true
loading.value = false
isTyping.value = false
getRecommendQuestions(id).finally(() => {
getRecommendQuestionsLoading.value = false
})
getRecommendQuestions(id)
}
const loadingOver = () => {
getRecommendQuestionsLoading.value = false
}
function onChartAnswerError() {