mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix(chat): Automatic scrolling to distinguish between PC and assistant
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user