Skip to content

Commit fb332a7

Browse files
committed
fix(Smart Question): The scroll axis cannot scroll upwards
1 parent e65d638 commit fb332a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frontend/src/views/chat/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ const sendMessage = async ($event: any = {}) => {
731731
732732
loading.value = true
733733
isTyping.value = true
734-
if (isCompletePage.value || innerRef.value) {
734+
if (isCompletePage.value && innerRef.value) {
735735
scrollTopVal = innerRef.value!.clientHeight
736736
scrollTime = setInterval(() => {
737737
scrollBottom()
@@ -751,6 +751,12 @@ const sendMessage = async ($event: any = {}) => {
751751
inputMessage.value = ''
752752
753753
nextTick(async () => {
754+
if (!isCompletePage.value && innerRef.value) {
755+
scrollTopVal = innerRef.value!.clientHeight
756+
scrollTime = setInterval(() => {
757+
scrollBottom()
758+
}, 300)
759+
}
754760
const index = currentChat.value.records.length - 1
755761
if (chartAnswerRef.value) {
756762
if (chartAnswerRef.value instanceof Array) {

0 commit comments

Comments
 (0)