<Button style={{backgroundColor:'#F0F2F5'}} onClick={()=>{window.location.href="https://baidu.com"}} className="r-button" >

<Button onClick={this.routePush} router={history}></Button>

routePush(){
    this.props.history.push('/...');
}

返回上一页
npm install history --save

// 如果使用hashHistory

const history = require("history").createHashHistory()

// 如果使用createBrowserHistory

const history = require("history").createBrowserHistory()

history.goBack();

react页面跳转

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-05-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-05-31
  • 2021-10-23
  • 2022-12-23
相关资源
相似解决方案