From c56eca1559eb50a1c8cc91ec2cd2d7655f432390 Mon Sep 17 00:00:00 2001 From: wzy-warehouse <18135009705@163.com> Date: Thu, 7 May 2026 13:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hooks=E4=B8=ADstore=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useScene.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/hooks/useScene.ts b/src/hooks/useScene.ts index 5461fda..1e3c92b 100644 --- a/src/hooks/useScene.ts +++ b/src/hooks/useScene.ts @@ -4,19 +4,24 @@ import { useLoadingInformationStore } from '@/stores/useLoadingInformation'; import { useStatusStore } from '@/stores/useStatusStore'; export const useScene = () => { + const statusStore = useStatusStore(); + const loadingInformationStore = useLoadingInformationStore(); + const leftLegendStore = useLeftLegendStore(); + const buttonSelectedIdStore = useButtonSelectedIdStore(); + // 重置场景 const resetScene = () => { // 重置所有状态 - useStatusStore().reset(); + statusStore.reset(); // 重置状态 - useLoadingInformationStore().resetStatue(); + loadingInformationStore.resetStatue(); // 重置按钮 - useButtonSelectedIdStore().resetId(); + buttonSelectedIdStore.resetId(); // 重置左侧图例 - useLeftLegendStore().resetLegendListInfo(); + leftLegendStore.resetLegendListInfo(); }; return { resetScene };