Skip to content
  • This project
    • Loading...
  • Sign in

xqz / dianDemo

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • dianDemo
  • src
  • store
  • modules
  • app.js
  • 宋楠's avatar
    2.0.0 · 7721bb62
    宋楠 committed 2020-02-15 19:41:14 +0800
    7721bb62
app.js 293 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
const state = {
  userName: ''
}
const mutations = {
  SET_USER_NAME(state, name) {
    state.userName = name
  }
}
const actions = {
  // 设置name
  setUserName({commit}, name) {
    commit('SET_USER_NAME', name)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}