修改hooks中store的调用方式
This commit is contained in:
@@ -4,19 +4,24 @@ import { useLoadingInformationStore } from '@/stores/useLoadingInformation';
|
|||||||
import { useStatusStore } from '@/stores/useStatusStore';
|
import { useStatusStore } from '@/stores/useStatusStore';
|
||||||
|
|
||||||
export const useScene = () => {
|
export const useScene = () => {
|
||||||
|
const statusStore = useStatusStore();
|
||||||
|
const loadingInformationStore = useLoadingInformationStore();
|
||||||
|
const leftLegendStore = useLeftLegendStore();
|
||||||
|
const buttonSelectedIdStore = useButtonSelectedIdStore();
|
||||||
|
|
||||||
// 重置场景
|
// 重置场景
|
||||||
const resetScene = () => {
|
const resetScene = () => {
|
||||||
// 重置所有状态
|
// 重置所有状态
|
||||||
useStatusStore().reset();
|
statusStore.reset();
|
||||||
|
|
||||||
// 重置状态
|
// 重置状态
|
||||||
useLoadingInformationStore().resetStatue();
|
loadingInformationStore.resetStatue();
|
||||||
|
|
||||||
// 重置按钮
|
// 重置按钮
|
||||||
useButtonSelectedIdStore().resetId();
|
buttonSelectedIdStore.resetId();
|
||||||
|
|
||||||
// 重置左侧图例
|
// 重置左侧图例
|
||||||
useLeftLegendStore().resetLegendListInfo();
|
leftLegendStore.resetLegendListInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
return { resetScene };
|
return { resetScene };
|
||||||
|
|||||||
Reference in New Issue
Block a user