1.首先写一个方法 this.requestUser(res.list) 传入数据(组件页面)
2.导入vuex 对接mapActions 在mapActions中自定义方法去对接Actions
3.Actions.js中写刚刚定义的方法 提交到mutations
4.在mutations中去修改state中的数据
1.首先写一个方法 this.requestUser(res.list) 传入数据(组件页面)
2.导入vuex 对接mapActions 在mapActions中自定义方法去对接Actions
3.Actions.js中写刚刚定义的方法 提交到mutations
4.在mutations中去修改state中的数据