products.js
289 Bytes
const state = {
products: null,
};
const mutations = {
SET_PRODUCTS: (state,data) => {
state.products = data;
},
};
const actions = {
setData({ commit },data) {
commit("SET_PRODUCTS",data);
},
};
export default {
namespaced: true,
state,
mutations,
actions,
};