<Button
type='link'
onClick={() => {
history.push({
pathname: `/fillTask/fillDetail`,
search: `?id=${record.id}`,
// 要传递的数据
state: {
taskName: record.taskName,
closingDate: record.closingDate,
},
});
}}
>
查看
</Button>
// 传递到的页面通过 history.location.state 接收数据
const { taskName , closingDate } = history.location.state;