2017-05-21 20:43:58 +00:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
2017-12-30 07:00:49 +00:00
|
|
|
import navigator from './modules/navigator'
|
2017-05-21 20:43:58 +00:00
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
|
|
export default new Vuex.Store({
|
|
|
|
state: {
|
|
|
|
loading: false
|
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
loadingChange: (state, loadingState) => { state.loading = loadingState }
|
|
|
|
},
|
|
|
|
actions: {
|
2017-12-30 07:00:49 +00:00
|
|
|
alert({ dispatch }, opts) { dispatch('navigator/alert', opts) },
|
2017-05-21 20:43:58 +00:00
|
|
|
startLoading({ commit }) { commit('loadingChange', true) },
|
|
|
|
stopLoading({ commit }) { commit('loadingChange', false) }
|
|
|
|
},
|
|
|
|
getters: {},
|
|
|
|
modules: {
|
2018-02-03 21:48:25 +00:00
|
|
|
navigator
|
2017-05-21 20:43:58 +00:00
|
|
|
}
|
|
|
|
})
|