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.
29 lines
406 B
29 lines
406 B
4 years ago
|
const state = {
|
||
|
logs: []
|
||
|
}
|
||
|
|
||
|
const mutations = {
|
||
|
ADD_ERROR_LOG: (state, log) => {
|
||
|
state.logs.push(log)
|
||
|
},
|
||
|
CLEAR_ERROR_LOG: (state) => {
|
||
|
state.logs.splice(0)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const actions = {
|
||
|
addErrorLog({ commit }, log) {
|
||
|
commit('ADD_ERROR_LOG', log)
|
||
|
},
|
||
|
clearErrorLog({ commit }) {
|
||
|
commit('CLEAR_ERROR_LOG')
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
namespaced: true,
|
||
|
state,
|
||
|
mutations,
|
||
|
actions
|
||
|
}
|