vueforce
Version:
A Vue.js lightning framework for salesforce
39 lines (33 loc) • 602 B
JavaScript
import * as types from '../mutation-types'
// initial state
const state = {
loading: false
}
// getters
const getters = {
loading: state => state.loading
}
// actions
const actions = {
on ({ commit }) {
commit(types.LOADING_SWITCH_ON, true)
},
off ({commit}) {
commit(types.LOADING_SWITCH_OFF, false)
}
}
// mutations
const mutations = {
[] (state) {
state.loading = true
},
[] (state) {
state.loading = false
}
}
export default {
state,
getters,
actions,
mutations
}