change the event accordingly

This commit is contained in:
busti 2019-11-14 04:14:47 +01:00
parent 83e62f5958
commit fc113c2f3f
2 changed files with 19 additions and 7 deletions

View file

@ -6,6 +6,18 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
events: ['35c3', 'camp19', '36c3'],
activeEvent: '35c3'
activeEvent: '36c3',
loadedItems: []
},
mutations: {
changeEvent(state, event) {
state.activeEvent = event;
}
},
actions: {
changeEvent({ commit }, event) {
// todo: load items from server
commit('changeEvent', event);
}
}
});