提交 d2afa15e 编写于 作者: A afc163

Fix default activeTabKey, close #563

上级 34e69e55
......@@ -126,6 +126,13 @@ export default class PageHeader extends PureComponent {
tabDefaultValue = tabList.filter(item => item.default)[0] || tabList[0];
}
const activeKeyProps = {
defaultActiveKey: tabDefaultValue && tabDefaultValue.key,
};
if (activeTabKey !== undefined) {
activeKeyProps.activeKey = activeTabKey;
}
return (
<div className={clsString}>
{breadcrumb}
......@@ -147,8 +154,7 @@ export default class PageHeader extends PureComponent {
tabList.length && (
<Tabs
className={styles.tabs}
defaultActiveKey={(tabDefaultValue && tabDefaultValue.key)}
activeKey={activeTabKey}
{...activeKeyProps}
onChange={this.onChange}
>
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册