Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
V
VueElementTemplate
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • JIRA
    • JIRA
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • 黄瑜
  • VueElementTemplate
  • Repository

Switch branch/tag
  • VueElementTemplate
  • src
  • store
  • modules
  • errorLog.js
Find file
BlameHistoryPermalink
  • Pan's avatar
    refactor[errorLog]: save the logs in vuex · a68413cb
    Pan authored 7 years ago
    a68413cb
errorLog.js 258 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
const errorLog = {
  state: {
    logs: []
  },
  mutations: {
    ADD_ERROR_LOG: (state, log) => {
      state.logs.push(log)
    }
  },
  actions: {
    addErrorLog({ commit }, log) {
      commit('ADD_ERROR_LOG', log)
    }
  }
}

export default errorLog

Replace errorLog.js

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.