react 

  1 .跳转方式加传参

this.props.history.push({
      //地址
      pathname: '/film/Details',
      //路由传参--对象
      query: {
        id,
        from: ''
      }
    });

  2.跳转Link

import { Link } from 'react-router-dom';

<Link exact="true" to="/login" className="user">
<i className="icon iconfont icon-geren"></i>
</Link>

  

posted on 2018-10-17 14:10  菜鸡H  阅读(281)  评论(0编辑  收藏  举报