修改组件中store的调用方式

This commit is contained in:
wzy-warehouse
2026-05-07 13:59:14 +08:00
parent ce6200389c
commit 4b55283ff6
32 changed files with 299 additions and 303 deletions
@@ -13,7 +13,7 @@
import { onMounted, watch } from 'vue';
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
const useStatus = useStatusStore();
const statusStore = useStatusStore();
// 保存图层引用
let mainRoadLayer: ImageryLayer | null = null;
@@ -21,7 +21,7 @@
onMounted(() => {
// 监听显示隐藏
watch(
() => useStatus.infrastructureLayers.showMainRoad.show,
() => statusStore.infrastructureLayers.showMainRoad.show,
(newValue: boolean) => {
mainRoadLayer!.show = newValue;
}