fix: 手动重置异常的 loading

This commit is contained in:
ChenZhaoYu
2023-03-19 18:12:49 +08:00
parent d1c15f58c4
commit f1584b60e8

View File

@@ -43,9 +43,16 @@ const loading = ref<boolean>(false)
// 添加PromptStore
const promptStore = usePromptStore()
// 使用storeToRefs保证store修改后联想部分能够重新渲染
const { promptList: promptTemplate } = storeToRefs<any>(promptStore)
// 未知原因刷新页面loading 状态不会重置,手动重置
dataSources.value.forEach((item, index) => {
if (item.loading)
updateChatSome(+uuid, index, { loading: false })
})
function handleSubmit() {
onConversation()
}