mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
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:
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user