2021-12-22 19:32:34 +08:00
|
|
|
const state = {
|
2021-12-23 11:16:54 +08:00
|
|
|
name: '',
|
|
|
|
|
satellites: []
|
2025-12-31 15:17:05 +08:00
|
|
|
};
|
2021-12-22 19:32:34 +08:00
|
|
|
|
|
|
|
|
// getters
|
2021-12-23 11:16:54 +08:00
|
|
|
const getters = {
|
|
|
|
|
name: (state) => state.name,
|
|
|
|
|
satellites: (state) => state.satellites
|
2025-12-31 15:17:05 +08:00
|
|
|
};
|
2021-12-22 19:32:34 +08:00
|
|
|
|
|
|
|
|
// actions
|
|
|
|
|
const actions = {
|
2021-12-23 11:16:54 +08:00
|
|
|
setName ({ commit }, { name }) {
|
|
|
|
|
commit('setName', name)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setSatellites ({ commit }, { satellites }) {
|
|
|
|
|
commit('setSatellites', satellites)
|
|
|
|
|
},
|
|
|
|
|
|
2024-01-05 17:40:51 +08:00
|
|
|
track () {
|
|
|
|
|
},
|
2021-12-23 11:16:54 +08:00
|
|
|
|
2024-01-05 17:40:51 +08:00
|
|
|
toggleShow () {
|
|
|
|
|
},
|
2025-12-31 15:17:05 +08:00
|
|
|
};
|
2021-12-22 19:32:34 +08:00
|
|
|
|
|
|
|
|
// mutations
|
|
|
|
|
const mutations = {
|
2021-12-23 11:16:54 +08:00
|
|
|
setName (state, name) {
|
|
|
|
|
state.name = name
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setSatellites (state, satellites) {
|
|
|
|
|
state.satellites = satellites
|
|
|
|
|
},
|
2025-12-31 15:17:05 +08:00
|
|
|
};
|
2021-12-22 19:32:34 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
namespaced: true,
|
|
|
|
|
state,
|
2021-12-23 11:16:54 +08:00
|
|
|
getters,
|
2021-12-22 19:32:34 +08:00
|
|
|
actions,
|
|
|
|
|
mutations
|
2025-12-31 15:17:05 +08:00
|
|
|
};
|