Commit 784d71e2 authored by Sean Bao's avatar Sean Bao Committed by 偏右

Fix PageHeader Tabs Display Issue

对`PageHeader`中的`tabList`展示逻辑做了更新,原本的实现会在外部传入一个空数组`tabList`时展现一个0出来(`tabList.length`的返回值)
parent 6018ee69
...@@ -221,8 +221,7 @@ export default class PageHeader extends PureComponent { ...@@ -221,8 +221,7 @@ export default class PageHeader extends PureComponent {
</div> </div>
</div> </div>
</div> </div>
{tabList && {(tabList && tabList.length) ? (
tabList.length && (
<Tabs <Tabs
className={styles.tabs} className={styles.tabs}
{...activeKeyProps} {...activeKeyProps}
...@@ -231,7 +230,7 @@ export default class PageHeader extends PureComponent { ...@@ -231,7 +230,7 @@ export default class PageHeader extends PureComponent {
> >
{tabList.map(item => <TabPane tab={item.tab} key={item.key} />)} {tabList.map(item => <TabPane tab={item.tab} key={item.key} />)}
</Tabs> </Tabs>
)} ) : null}
</div> </div>
); );
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment