react使用(正在更新)
时间:2020-08-19 22:21:45
收藏:0
阅读:100
react路由配置及路由传参
使用方法
1.a页面
<Link to={`/MarketingPlayScan/lottery/detail/${record.id}/${record.lotteryId}`} target="_blank">跳b页面</Link>
2.b页面
const {match: { params: {id,lotteryId} } = this.props; //取得路由参数 id 和 lotteryId
const params = {
levelId: id,
lotteryId: lotteryId,
startTime: !startTime ? ‘‘ : moment(startTime).format(dateFormat)
...
}
window.open(`${basePath}/yh/dw/prize/record/export?${stringify(params)}`)
原文:https://www.cnblogs.com/leeSmile/p/13203198.html
评论(0)