plm前端
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

2 years ago
2 years ago
2 years ago
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import cloneDeep from 'lodash/cloneDeep'
  4. import common from './modules/common'
  5. import user from './modules/user'
  6. import sift from "./modules/sift";
  7. Vue.use(Vuex)
  8. export default new Vuex.Store({
  9. modules: {
  10. common,
  11. user,
  12. sift
  13. },
  14. mutations: {
  15. // 重置vuex本地储存状态
  16. resetStore (state) {
  17. Object.keys(state).forEach((key) => {
  18. state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key])
  19. })
  20. }
  21. },
  22. strict: process.env.NODE_ENV !== 'production'
  23. })