Skip to content

Commit

Permalink
fix: 手动重置异常的 loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu authored and jingChen55 committed Mar 27, 2023
1 parent 64c19ea commit 26d2197
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 26d2197

Please sign in to comment.