Каркас будущего приложения

This commit is contained in:
Book Pauk
2022-08-16 14:54:41 +07:00
parent c3a0ce183e
commit 78be5a9856
22 changed files with 980 additions and 8 deletions

15
client/store/index.js Normal file
View File

@@ -0,0 +1,15 @@
import { createStore } from 'vuex';
import VuexPersistence from 'vuex-persist';
import root from './root.js';
const debug = process.env.NODE_ENV !== 'production';
const vuexLocal = new VuexPersistence();
export default createStore(Object.assign({}, root, {
modules: {
},
strict: debug,
plugins: [vuexLocal.plugin]
}));

25
client/store/root.js Normal file
View File

@@ -0,0 +1,25 @@
// initial state
const state = {
apiError: null,
};
// getters
const getters = {};
// actions
const actions = {};
// mutations
const mutations = {
setApiError(state, value) {
state.apiError = value;
},
};
export default {
namespaced: true,
state,
getters,
actions,
mutations
};