【发布时间】:2018-06-21 00:51:38
【问题描述】:
我想将第二个参数传递给调度调用:
this.$store.dispatch(
'testAction',
this.employee.employeeId,
departmentId
));
我的店铺操作如下:
async testAction({ dispatch, commit }, employeeId, departmentId) {
console.log(departmentId);
return 'Employee Tested';
},
当我看到 departmentId 的控制台日志时,我得到“未定义”。
关于如何传递多个参数的任何线索?
谢谢
【问题讨论】:
标签: vuejs2