mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-21 11:57:47 +00:00
fix: 手动重置异常的 loading
This commit is contained in:
@@ -43,9 +43,16 @@ const loading = ref<boolean>(false)
|
|||||||
|
|
||||||
// 添加PromptStore
|
// 添加PromptStore
|
||||||
const promptStore = usePromptStore()
|
const promptStore = usePromptStore()
|
||||||
|
|
||||||
// 使用storeToRefs,保证store修改后,联想部分能够重新渲染
|
// 使用storeToRefs,保证store修改后,联想部分能够重新渲染
|
||||||
const { promptList: promptTemplate } = storeToRefs<any>(promptStore)
|
const { promptList: promptTemplate } = storeToRefs<any>(promptStore)
|
||||||
|
|
||||||
|
// 未知原因刷新页面,loading 状态不会重置,手动重置
|
||||||
|
dataSources.value.forEach((item, index) => {
|
||||||
|
if (item.loading)
|
||||||
|
updateChatSome(+uuid, index, { loading: false })
|
||||||
|
})
|
||||||
|
|
||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
onConversation()
|
onConversation()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user