mirror of https://github.com/4xmen/xshop.git
added vuex to project
parent
82504300cd
commit
5d2c2bd5eb
@ -0,0 +1,18 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue