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.

24 lines
534 B

  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import navigator from './modules/navigator'
  4. Vue.use(Vuex)
  5. export default new Vuex.Store({
  6. state: {
  7. loading: false
  8. },
  9. mutations: {
  10. loadingChange: (state, loadingState) => { state.loading = loadingState }
  11. },
  12. actions: {
  13. alert({ dispatch }, opts) { dispatch('navigator/alert', opts) },
  14. startLoading({ commit }) { commit('loadingChange', true) },
  15. stopLoading({ commit }) { commit('loadingChange', false) }
  16. },
  17. getters: {},
  18. modules: {
  19. navigator
  20. }
  21. })