转自:https://www.jb51.net/article/114837.htm
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)