diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 8efba9ca9e1da4ca74d3f185e243439cbd9dad1a..7eb6de182c519e97501371d88e277e1e73fcd91c 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -43,10 +43,13 @@ export default class PageHeader extends PureComponent { // Generated according to props conversionFromProps= () => { const { - breadcrumbList, linkElement = 'a', + breadcrumbList, breadcrumbSeparator, linkElement = 'a', } = this.props; return ( - + {breadcrumbList.map(item => ( {item.href ? (createElement(linkElement, { @@ -58,7 +61,7 @@ export default class PageHeader extends PureComponent { ); } conversionFromLocation = (routerLocation, breadcrumbNameMap) => { - const { linkElement = 'a' } = this.props; + const { breadcrumbSeparator, linkElement = 'a' } = this.props; // Convert the path to an array const pathSnippets = routerLocation.pathname.split('/').filter(i => i); // Loop data mosaic routing @@ -84,7 +87,10 @@ export default class PageHeader extends PureComponent { ); return ( - + {extraBreadcrumbItems} ); @@ -94,7 +100,7 @@ export default class PageHeader extends PureComponent { * Convert parameters into breadcrumbs */ conversionBreadcrumbList = () => { - const { breadcrumbList } = this.props; + const { breadcrumbList, breadcrumbSeparator } = this.props; const { routes, params, routerLocation, breadcrumbNameMap } = this.getBreadcrumbProps(); if (breadcrumbList && breadcrumbList.length) { return this.conversionFromProps(); @@ -108,6 +114,7 @@ export default class PageHeader extends PureComponent { routes={routes.filter(route => route.breadcrumbName)} params={params} itemRender={this.itemRender} + separator={breadcrumbSeparator} /> ); }