修改hooks中store的调用方式

This commit is contained in:
wzy-warehouse
2026-05-07 13:08:30 +08:00
parent 68715dea2b
commit 009dc83476
7 changed files with 94 additions and 81 deletions
+6 -5
View File
@@ -1,22 +1,23 @@
import { useStatusStore } from '@/stores/useStatusStore';
export const useLeftHandle = () => {
const statusStore = useStatusStore();
/**
* 周边分析
*/
const clickAroundAnalysis = (status: unknown) => {
// 如果选中,隐藏右侧按钮,取消选中则显示右侧按钮
if (status as boolean) {
useStatusStore().uiComponents.rightButton.show = false;
statusStore.uiComponents.rightButton.show = false;
// 加载周边分析
useStatusStore().functionStatus.aroundAnalysis.loading = true;
useStatusStore().functionStatus.aroundAnalysis.show = true;
statusStore.functionStatus.aroundAnalysis.loading = true;
statusStore.functionStatus.aroundAnalysis.show = true;
} else {
useStatusStore().uiComponents.rightButton.show = true;
statusStore.uiComponents.rightButton.show = true;
// 隐藏周边分析
useStatusStore().functionStatus.aroundAnalysis.show = false;
statusStore.functionStatus.aroundAnalysis.show = false;
}
};
return {