first commit

This commit is contained in:
yezhichao@hwasmart.com
2021-09-14 07:31:59 +08:00
commit d0f3fccb12
35 changed files with 4191 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
const state = {
all: []
}
// getters
const getters = {
getSatelliteList: (state) => state.all
}
// actions
const actions = {
load ({ commit }, { satellites }) {
commit('set', satellites)
}
}
// mutations
const mutations = {
set (state, satellites) {
state.all = satellites
},
toggleShow (state, id) {
const satellite = state.all.find(satellite => satellite.id === id)
satellite.show = !satellite.show
}
}
export default {
namespaced: true,
state,
getters,
actions,
mutations
}