index.js 334 B

123456789101112131415161718192021222324
  1. import user from '@/store/modules/user.js'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import Vuex from 'vuex'
  5. Vue.use(Vuex)
  6. const store = new Vuex.Store({
  7. modules: {
  8. user
  9. },
  10. strict: true
  11. })
  12. // #endif
  13. // #ifdef VUE3
  14. import {createStore} from 'vuex'
  15. const store = createStore({
  16. modules: {
  17. user
  18. }
  19. })
  20. // #endif
  21. export default store