You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/resources/js/components/libs/store.js

19 lines
336 B
JavaScript

import Vuex from 'vuex';
export default new Vuex.Store({
state: {
category: ''
},
mutations: {
UPDATE_CATEGORY(state, payload) {
state.category = payload;
}
},
actions:{
updateCategory(context,cat){
context.commit('UPDATE_CATEGORY',cat);
}
}
});