import { defineStore } from 'pinia'; import { store } from '/@/store'; export const useEarthMapStore = defineStore({ id: 'earth-map', state: () => ({ token: '', customPrimitiveList: [],// 视频图元数组 customPrimitive: null, shapeUsing: false, //判断绘画组件使用状态 shapeList: [], //绘画数组(区域) shapeShowList: [], //绘画存储(临时) keyAreaPos: [], //记录创建防区的点位,重点管控区域 }), getters: { getCustomPrimitiveList(): any { return this.customPrimitiveList }, getCustomPrimitive(): any { return this.customPrimitive }, }, }) // 需要在设置之外使用 export function useEarthMapStoreWithOut() { return useEarthMapStore(store); }