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
26
27
28
|
const store = {
namespaced: true,
state: {
startTraffic: false,
endTraffic: false,
},
getters: {
getStartTraffic: state => state.startTraffic,
getEndTraffic: state => state.endTraffic
},
mutations: {
setStartTraffic(state, startTraffic) {
state.startTraffic = startTraffic
},
setEndTraffic(state, endTraffic) {
state.endTraffic = endTraffic
}
},
actions: {
setStartTrafficAction(context, startTraffic) {
context.commit('setStartTraffic', startTraffic)
},
setEndTrafficAction(context, endTraffic) {
context.commit('setEndTraffic', endTraffic)
}
}
}
export default store
|