feat: add account state

This commit is contained in:
chenghx
2018-08-13 11:38:29 +08:00
parent f2a11aa058
commit fef089a8b5
7 changed files with 45 additions and 31 deletions

11
src/store/index.js Normal file
View File

@@ -0,0 +1,11 @@
import Vue from 'vue'
import Vuex from 'vuex'
import account from './modules/account'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
account
}
})

View File

@@ -0,0 +1,11 @@
export default {
namespaced: true,
state: {
user: {}
},
mutations: {
setuser (state, user) {
state.user = user
}
}
}