跳转页面传递参数
1.引入包
import {hashHistory} from ‘React-router’
2.跳转传值
handleClick = (value) => { hashHistory.push({ pathname: ‘message/detailMessage‘, query: { title:value.title, time:value.time, text:value.text }, }) }
3.接收值
console.info(this.props.location.query.title) console.info(this.props.location.query.time) console.info(this.props.location.query.text)
转载自:http://blog.csdn.net/sweiqin/article/details/60776603
时间: 2024-12-24 19:11:52