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,17 +221,16 @@ export default class PageHeader extends PureComponent {
</div>
</div>
</div>
{tabList &&
tabList.length && (
<Tabs
className={styles.tabs}
{...activeKeyProps}
onChange={this.onChange}
tabBarExtraContent={tabBarExtraContent}
>
{tabList.map(item => <TabPane tab={item.tab} key={item.key} />)}
</Tabs>
)}
{(tabList && tabList.length) ? (
<Tabs
className={styles.tabs}
{...activeKeyProps}
onChange={this.onChange}
tabBarExtraContent={tabBarExtraContent}
>
{tabList.map(item => <TabPane tab={item.tab} key={item.key} />)}
</Tabs>
) : null}
</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