// +---------------------------------------------------------------------- // | CMS [ CMS赋能开发者,助力企业发展 ] // +---------------------------------------------------------------------- // | Copyright (c) 2016~2021 https://www.CMS.com All rights reserved. // +---------------------------------------------------------------------- // | Licensed CMS并不是自由软件,未经许可不能去掉CMS相关版权 // +---------------------------------------------------------------------- // | Author: CMS Team // +---------------------------------------------------------------------- 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 }