瀏覽代碼

Highlight first tab defaultly

afc163 8 年之前
父節點
當前提交
b27ab27d69
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/PageHeader/index.js

+ 1 - 1
src/components/PageHeader/index.js

@@ -97,7 +97,7 @@ export default class PageHeader extends PureComponent {
       breadcrumb = null;
       breadcrumb = null;
     }
     }
 
 
-    const tabDefaultValue = tabList && tabList.filter(item => item.default)[0];
+    const tabDefaultValue = tabList && (tabList.filter(item => item.default)[0] || tabList[0]);
 
 
     return (
     return (
       <div className={clsString}>
       <div className={clsString}>