demo如下:
跳转
history.push({pathname:'/july/detail',state:{param:'我是需要传递的参数'}});
获取:
const { param } = this.props.history.location.state;
console.log(param)
demo如下:
跳转
history.push({pathname:'/july/detail',state:{param:'我是需要传递的参数'}});
获取:
const { param } = this.props.history.location.state;
console.log(param)