zoukankan      html  css  js  c++  java
  • antdesign中进入页面跳转指定的tabPane

     <Tabs onChange={onBaseClick} defaultActiveKey={activeKey}>
              <TabPane tab={<span>配置地址对象<br></br><span className={styles.logTabsTitle}>配置</span> </span>} key="1">
                <Row>
                  <Button style={{ backgroundColor: '#68B6FF', border: 0, paddingLeft: 5 }} type="primary"> <Icon
                    type="arrow-up"/><Link to={'/customer/protection/address/create'}>新增</Link></Button>
                </Row>
                <Row>
                  <List {...listProps}/>
                </Row>
              </TabPane>
              <TabPane tab={<span>应用过滤<br></br><span className={styles.logTabsTitle}>禁止</span> </span>} key="2">
                <Row>
                  <Button style={{ backgroundColor: '#68B6FF', border: 0, paddingLeft: 5 }} type="primary"> <Icon
                    type="arrow-up"/><Link to={'/customer/protection/flow/create/rules'}>新增</Link></Button>
                  <Button style={{ backgroundColor: '#68B6FF', border: 0, paddingLeft: 5 }} type="primary"
                          onClick={deleteData}> <Icon type="arrow-up"/>删除</Button>
                </Row>
                <Row>
                  <List {...listProps}/>
                </Row>
              </TabPane>
            </Tabs>

    这里是根据activeKey设置的,所以我们通过更改activeKey的值,来跳转不同的页面;

    还有一点需要注意的是:activeKey和defaultActiveKey是有区别的,defaultActiveKey是初始化中面板选中的key,如果没有设置,则是第一个tabPane,activekey是当前激活tab面板的key,默认值为无;

    还有件一个,就是在model.js中effects想要取state中的值,可以通过这样:

    const stateArr = yield  select(state=>state)
  • 相关阅读:
    C语言I博客作业07
    C语言I 博客作业03
    我的第一次作业
    C语言I博客作业05
    js闭包在你身边却不知
    浅谈SQL Transaction在请求中断后的行锁表锁
    事件订阅分发模型
    js 继承 对象方法与原型方法
    PHP学习笔记有关php中的变量
    PHP学习笔记不同编码占据不同的字节
  • 原文地址:https://www.cnblogs.com/notchangeworld/p/11836391.html
Copyright © 2011-2022 走看看