mirror of https://github.com/requarks/wiki
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
534 B
25 lines
534 B
8 years ago
|
import Vue from 'vue'
|
||
|
import Vuex from 'vuex'
|
||
|
|
||
7 years ago
|
import navigator from './modules/navigator'
|
||
8 years ago
|
|
||
|
Vue.use(Vuex)
|
||
|
|
||
|
export default new Vuex.Store({
|
||
|
state: {
|
||
|
loading: false
|
||
|
},
|
||
|
mutations: {
|
||
|
loadingChange: (state, loadingState) => { state.loading = loadingState }
|
||
|
},
|
||
|
actions: {
|
||
7 years ago
|
alert({ dispatch }, opts) { dispatch('navigator/alert', opts) },
|
||
8 years ago
|
startLoading({ commit }) { commit('loadingChange', true) },
|
||
|
stopLoading({ commit }) { commit('loadingChange', false) }
|
||
|
},
|
||
|
getters: {},
|
||
|
modules: {
|
||
7 years ago
|
navigator
|
||
8 years ago
|
}
|
||
|
})
|