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.

29 lines
661 B

  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import alert from './modules/alert'
  4. import anchor from './modules/anchor'
  5. import modalCreatePage from './modules/modal-create-page'
  6. import modalCreateUser from './modules/modal-create-user'
  7. Vue.use(Vuex)
  8. export default new Vuex.Store({
  9. state: {
  10. loading: false
  11. },
  12. mutations: {
  13. loadingChange: (state, loadingState) => { state.loading = loadingState }
  14. },
  15. actions: {
  16. startLoading({ commit }) { commit('loadingChange', true) },
  17. stopLoading({ commit }) { commit('loadingChange', false) }
  18. },
  19. getters: {},
  20. modules: {
  21. alert,
  22. anchor,
  23. modalCreatePage,
  24. modalCreateUser
  25. }
  26. })