From f1584b60e84e79a1daf35f1c2b40531296b189d2 Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Sun, 19 Mar 2023 18:12:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=8B=E5=8A=A8=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/index.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 06de62c..82f3235 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -43,9 +43,16 @@ const loading = ref(false) // 添加PromptStore const promptStore = usePromptStore() + // 使用storeToRefs,保证store修改后,联想部分能够重新渲染 const { promptList: promptTemplate } = storeToRefs(promptStore) +// 未知原因刷新页面,loading 状态不会重置,手动重置 +dataSources.value.forEach((item, index) => { + if (item.loading) + updateChatSome(+uuid, index, { loading: false }) +}) + function handleSubmit() { onConversation() }