You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
552 B
25 lines
552 B
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
import common from './modules/common'
|
|
import user from './modules/user'
|
|
import sift from "./modules/sift";
|
|
|
|
Vue.use(Vuex)
|
|
|
|
export default new Vuex.Store({
|
|
modules: {
|
|
common,
|
|
user,
|
|
sift
|
|
},
|
|
mutations: {
|
|
// 重置vuex本地储存状态
|
|
resetStore (state) {
|
|
Object.keys(state).forEach((key) => {
|
|
state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key])
|
|
})
|
|
}
|
|
},
|
|
strict: process.env.NODE_ENV !== 'production'
|
|
})
|