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

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

pathname:写跳转界面的路径

state:要传过去的数据

 

例:

props.history.push({
              pathname: '/dispatch/dispatchTaskAdmin',
              state: { pageType: 'list' },
            });
posted @ 2020-07-31 18:00  雪莉06  阅读(13678)  评论(0编辑  收藏  举报