修改食谱展示
This commit is contained in:
33
stdiet-ui/src/store/modules/recipesShow.js
Normal file
33
stdiet-ui/src/store/modules/recipesShow.js
Normal 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
|
||||
};
|
Reference in New Issue
Block a user