guoshilong
2023-11-13 54849757852f6ab40eb17afbd03d1d839b60a38d
src/store/common.ts
@@ -1,4 +1,5 @@
import { MutationTree } from 'vuex'
import { ControlSource } from '/@/types/device'
const state = () => ({
  projectId: null as string | null,
@@ -10,6 +11,7 @@
    mode: 0, // 0为标准地图, 1为卫星地图
    roadLine: true,
  },
  droneControlSource: ''
})
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
@@ -34,6 +36,10 @@
  // 设置地图路网
  SET_MAP_SETTING_ROAD_LINE (state, roadLine: boolean) {
    state.mapSetting.roadLine = roadLine
  },
  // 设置飞行控制
  SET_DRONE_CONTROL_SOURCE (state, droneControlSource: ControlSource) {
    state.droneControlSource = droneControlSource
  }
}
export default {