index.js
391 Bytes
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
export default new Vuex.Store({
state: {
tags: []
},
mutations: {
setTags(state, tags) {
state.tags = tags;
}
},
getters: {
getTags: state => {
return state.tags;
}
},
actions: {
commitSetTags: context => {
return context.commit("setTags");
}
},
modules: {}
});