Skip to content

Instantly share code, notes, and snippets.

@jeremywynn
Created September 14, 2019 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremywynn/d0c416224c4724868c6f4dd7819e4d28 to your computer and use it in GitHub Desktop.
Save jeremywynn/d0c416224c4724868c6f4dd7819e4d28 to your computer and use it in GitHub Desktop.
Before any necessary adjustments
export const state = () => ({
// Loading
loading: false,
});
export const mutations = {
// Loading
END_BUSY_STATE(state) {
state.loading = false;
},
START_BUSY_STATE(state) {
state.loading = true;
},
};
export const actions = {
// Loading
stopBusyState({ commit }) {
commit("END_BUSY_STATE");
},
triggerBusyState({ commit }) {
commit("START_BUSY_STATE");
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment