fix: 【应用】问答页面在回答中...时,点击停止回答不生效 #109 (#136)

This commit is contained in:
shaohuzhang1 2024-04-17 13:05:19 +08:00 committed by GitHub
parent 80ff9c5eae
commit 3dc9b166f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,6 +62,9 @@
>
抱歉没有查找到相关内容请重新描述您的问题或提供更多信息
</el-card>
<el-card v-else-if="item.is_stop" shadow="always" class="dialog-card">
已停止回答
</el-card>
<el-card v-else shadow="always" class="dialog-card">
回答中 <span class="dotting"></span>
</el-card>
@ -434,6 +437,8 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
vote_status: '-1'
})
chatList.value.push(chat)
ChatManagement.addChatRecord(chat, 50, loading)
ChatManagement.write(chat.id)
inputValue.value = ''
nextTick(() => {
//
@ -471,8 +476,6 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean) {
//
scrollDiv.value.setScrollTop(getMaxHeight())
})
ChatManagement.addChatRecord(chat, 50, loading)
ChatManagement.write(chat.id)
const reader = response.body.getReader()
//
const write = getWrite(