zoukankan      html  css  js  c++  java
  • Dva框架如何让页面之间跳转

    有三种方法

       (1)没有传参的话,可以有三种方法进行页面之间的跳转

                a.  <link to = '/experiment/information' >

                b.  this.props.history.push('/experiment/information') 

        (2)需要传参的话,可以使用dva的routerRedux来跳转路由

              步骤:1. 先引入    import { withRouter, routerRedux } from 'dva/router'

                         2. export default withRouter(connect(({dashboard}) => ({dashboard}))(TimeAxis))

                         3. this.props.dispatch(routerRedux.push({

                                pathname: '/experiment/information',
                                query: {id: id}
                             }))
           4.  而后,在跳转过去的model中可以获取所传递的参数
                             const params = location.query;
  • 相关阅读:
    Spark Streaming(一)
    ACID
    SparkSQL
    scala样例类
    centos7 防火墙有关命令
    HBase优化
    scp
    HBase与Hive
    HBase与MapReduce交互
    Hadoop安全模式
  • 原文地址:https://www.cnblogs.com/susuweb/p/10058106.html
Copyright © 2011-2022 走看看