You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
329 B
JavaScript

import {
createStore
} from "vuex";
export default createStore({
state: {
count: 1,
loading: 0,
},
mutations: {
loadingStart(state) {
state.loading++
},
loadingDone(state) {
state.loading--
if (state.loading < 0) state.loading = 0
}
},
actions: {},
getters: {},
modules: {}
});