美文网首页
react中this.props.history实现跳转页面的使

react中this.props.history实现跳转页面的使

作者: Jidahan | 来源:发表于2018-11-12 14:51 被阅读0次

使用this.props.history.push的具体方法:

pathname:写跳转界面的路径

state:要传过去的数据

例:

this.props.history.push({ pathname: '/dashboard/groupper', state: { 数据名 } });

页面取值:

this.props.location.state.数据名 

相关文章

网友评论

      本文标题:react中this.props.history实现跳转页面的使

      本文链接:https://www.haomeiwen.com/subject/eoccfqtx.html