From 65b97496951aabc7b2ab7f303495935e293fb4e1 Mon Sep 17 00:00:00 2001 From: toruksmakto <42709228+toruksmakto@users.noreply.github.com> Date: Sun, 12 May 2019 02:31:24 +0800 Subject: [PATCH] Update errorLog.js --- src/store/modules/errorLog.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/modules/errorLog.js b/src/store/modules/errorLog.js index 8e3db060..6b01f957 100644 --- a/src/store/modules/errorLog.js +++ b/src/store/modules/errorLog.js @@ -5,12 +5,18 @@ const state = { 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') } }