Skip to content

Commit f1584b6

Browse files
committed
fix: 手动重置异常的 loading
1 parent d1c15f5 commit f1584b6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/views/chat/index.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,16 @@ const loading = ref<boolean>(false)
4343
4444
// 添加PromptStore
4545
const promptStore = usePromptStore()
46+
4647
// 使用storeToRefs,保证store修改后,联想部分能够重新渲染
4748
const { promptList: promptTemplate } = storeToRefs<any>(promptStore)
4849
50+
// 未知原因刷新页面,loading 状态不会重置,手动重置
51+
dataSources.value.forEach((item, index) => {
52+
if (item.loading)
53+
updateChatSome(+uuid, index, { loading: false })
54+
})
55+
4956
function handleSubmit() {
5057
onConversation()
5158
}

0 commit comments

Comments
 (0)