修改食谱展示

This commit is contained in:
huangdeliang
2021-03-09 18:26:48 +08:00
parent 032b4e8106
commit 7709c85cb0
7 changed files with 70 additions and 9 deletions

View File

@ -0,0 +1,33 @@
const oriState = {
recipes: {},
shoppingCart: {}
};
const mutations = {
updateStateData(state, payload) {
Object.keys(payload).forEach(key => {
state[key] = payload[key];
});
},
clean(state) {
Object.keys(oriState).forEach(key => {
state[key] = oriState[key];
});
}
};
const actions = {
async fetchFullRecipes({commit, dispatch},payload ) {
}
};
const getters = {};
export default {
namespaced: true,
state: Object.assign({}, oriState),
mutations,
actions,
getters
};