generated from duanshuwen/webapp-vue-frontend
Initial commit
This commit is contained in:
18
src/store/index.js
Normal file
18
src/store/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import { reactive } from 'vue'
|
||||
|
||||
export default {
|
||||
state: reactive({
|
||||
userInfo: undefined
|
||||
}),
|
||||
|
||||
mutations: {
|
||||
setUserInfo(state, data) {
|
||||
state.userInfo = data
|
||||
}
|
||||
},
|
||||
|
||||
commit(eventName, { data, dept }) {
|
||||
data.dept.preCheck = dept.preCheck
|
||||
this.mutations[eventName](this.state, data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user