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( )

  }

posted @ 2018-01-11 14:39  大耳朵小虎  阅读(633)  评论(0编辑  收藏  举报