guoshilong
2023-09-23 fb336f319c71291fa09de3e7f67f1ccfab3cb7c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { MutationTree } from 'vuex'
 
const state = () => ({
  projectId: null as string | null,
  dockSns: null as string | null,
  snList: [] as string[]
})
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
  SET_PROJECT_ID (state, projectId: string) {
    state.projectId = projectId
  },
 
  SET_DOCK_SN (state, dockSns: string) {
    state.dockSns = dockSns
  },
 
  SET_SN_LIST (state, snList: string[]) {
    state.snList = snList
  }
}
export default {
  state,
  mutations
}