import React, { PureComponent } from 'react'; import { Tabs, Skeleton } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; import BreadcrumbView from './breadcrumb'; const { TabPane } = Tabs; export default class PageHeader extends PureComponent { onChange = key => { const { onTabChange } = this.props; if (onTabChange) { onTabChange(key); } }; render() { const { title, logo, action, content, extraContent, tabList, className, tabActiveKey, tabDefaultActiveKey, tabBarExtraContent, loading = false, wide = false, hiddenBreadcrumb = false, } = this.props; const clsString = classNames(styles.pageHeader, className); const activeKeyProps = {}; if (tabDefaultActiveKey !== undefined) { activeKeyProps.defaultActiveKey = tabDefaultActiveKey; } if (tabActiveKey !== undefined) { activeKeyProps.activeKey = tabActiveKey; } return (
{hiddenBreadcrumb ? null : }
{logo &&
{logo}
}
{title &&

{title}

} {action &&
{action}
}
{content &&
{content}
} {extraContent &&
{extraContent}
}
{tabList && tabList.length ? ( {tabList.map(item => ( ))} ) : null}
); } }