重构组件结构,添加周边分析组件结构(但无具体实现)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { type Ref, ref } from 'vue';
|
||||
|
||||
/**
|
||||
* 选中按钮id记录
|
||||
*/
|
||||
export const useButtonSelectedIdStore = defineStore('buttonSelectedId', () => {
|
||||
/**
|
||||
* 左侧按钮选中id
|
||||
*/
|
||||
const leftButtonSelectedId: Ref<number> = ref(-1);
|
||||
|
||||
/**
|
||||
* 右侧按钮选中id
|
||||
*/
|
||||
const rightButtonSelectedId: Ref<number> = ref(-1);
|
||||
|
||||
/**
|
||||
* 重置id
|
||||
*/
|
||||
const resetId = () => {
|
||||
leftButtonSelectedId.value = -1;
|
||||
rightButtonSelectedId.value = -1;
|
||||
};
|
||||
|
||||
return { leftButtonSelectedId, rightButtonSelectedId, resetId };
|
||||
});
|
||||
@@ -153,6 +153,14 @@ export const useStatusStore = defineStore('status', () => {
|
||||
},
|
||||
});
|
||||
|
||||
// ============================ 地图功能显示状态 ================================
|
||||
const functionStatus = reactive({
|
||||
aroundAnalysis: {
|
||||
show: false,
|
||||
loading: false,
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* 恢复默认值
|
||||
*/
|
||||
@@ -262,6 +270,12 @@ export const useStatusStore = defineStore('status', () => {
|
||||
show: false,
|
||||
loading: false,
|
||||
};
|
||||
|
||||
// 功能显示状态重置
|
||||
functionStatus.aroundAnalysis = {
|
||||
show: false,
|
||||
loading: false,
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -270,6 +284,7 @@ export const useStatusStore = defineStore('status', () => {
|
||||
mapLayers,
|
||||
poiLayers,
|
||||
infrastructureLayers,
|
||||
functionStatus,
|
||||
reset,
|
||||
resetScene,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user