2020-01-14 21:07:45 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
import * as actions from './actions';
|
|
|
|
import mutations from './mutations';
|
2021-02-14 18:09:20 +00:00
|
|
|
import createState from './state';
|
2020-01-14 21:07:45 +00:00
|
|
|
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
2020-12-24 00:10:25 +00:00
|
|
|
export const createStore = (initialState) =>
|
2020-01-14 21:07:45 +00:00
|
|
|
new Vuex.Store({
|
|
|
|
modules: {
|
|
|
|
selfMonitoring: {
|
|
|
|
namespaced: true,
|
|
|
|
state: createState(initialState),
|
|
|
|
actions,
|
|
|
|
mutations,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default createStore;
|