food/src/store/mutations.js

21 lines
448 B
JavaScript
Raw Normal View History

2017-09-19 04:28:26 +02:00
import * as types from './mutations-types';
export const initialState = {
product: null,
isLoading: false,
2017-09-20 04:11:40 +02:00
title: 'Food scanning',
2017-09-19 04:28:26 +02:00
};
export const mutations = {
[types.STORE_PRODUCT](state, { product }) {
state.product = product;
state.isLoading = false;
},
[types.IS_LOADING](state) {
state.isLoading = true;
},
2017-09-20 04:11:40 +02:00
[types.SET_TITLE](state, { title }) {
state.title = title;
},
2017-09-19 04:28:26 +02:00
};