4.JS跳转路由刷新返回页面

4.JS跳转路由刷新返回页面,第1张

4.JS跳转路由/刷新/返回页面

1.JS跳转路由(需要拿到父组件的history)

  clickHandle(){

    let history = this.props.history;

    history.push( '/home')

  }

2.刷新页面(需要拿到父组件的history)

  clickHandle(){

    let history = this.props.history;

    history.go(0)

  }

3.返回页面

  clickHandle(){

    window.history.back( )

  }

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/588930.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-12
下一篇 2022-04-12

发表评论

登录后才能评论

评论列表(0条)

保存