Просмотр исходного кода

Fix wrong tab behavior (#3903)

* 修复:有多个layout时,如果其中一个layout中没有routes,将发收到另一个layout的菜单

* tabs 激活

tabs 激活
拷钉 6 лет назад
Родитель
Сommit
d16a2e5cb9
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/components/PageHeaderWrapper/index.js

+ 2 - 2
src/components/PageHeaderWrapper/index.js

@@ -16,11 +16,11 @@ const { Title } = Typography;
  * In order to be compatible with the old version of the PageHeader
  * basically all the functions are implemented.
  */
-const renderFooter = ({ tabList, activeKeyProps, onTabChange, tabBarExtraContent }) => {
+const renderFooter = ({ tabList, tabActiveKey, onTabChange, tabBarExtraContent }) => {
   return tabList && tabList.length ? (
     <Tabs
       className={styles.tabs}
-      {...activeKeyProps}
+      activeKey={tabActiveKey}
       onChange={key => {
         if (onTabChange) {
           onTabChange(key);