19 lines
380 B
TypeScript
19 lines
380 B
TypeScript
import { ActionTree } from "vuex";
|
|
import { AppState } from "./types";
|
|
|
|
const actions: ActionTree<AppState, AppState> = {
|
|
showLoading({ commit }, message: string) {
|
|
commit("setLoading", message);
|
|
},
|
|
|
|
hideLoading({ commit }) {
|
|
commit("setLoading", "");
|
|
},
|
|
|
|
setLoaded({ commit }, loaded: boolean) {
|
|
commit("setLoaded", loaded);
|
|
}
|
|
};
|
|
|
|
export default actions;
|