fix: jsx throw error
parent
1884a7c4c6
commit
51b2d2f5ad
|
@ -6,6 +6,7 @@ import { ConfigConsumerProps } from '../config-provider';
|
||||||
import BreadcrumbItem from './BreadcrumbItem';
|
import BreadcrumbItem from './BreadcrumbItem';
|
||||||
import Menu from '../menu';
|
import Menu from '../menu';
|
||||||
|
|
||||||
|
const MenuItem = Menu.Item;
|
||||||
const Route = PropTypes.shape({
|
const Route = PropTypes.shape({
|
||||||
path: PropTypes.string,
|
path: PropTypes.string,
|
||||||
breadcrumbName: PropTypes.string,
|
breadcrumbName: PropTypes.string,
|
||||||
|
@ -77,7 +78,7 @@ export default {
|
||||||
overlay = (
|
overlay = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{route.children.map(child => (
|
{route.children.map(child => (
|
||||||
<Menu.Item key={child.breadcrumbName || child.path}>
|
<MenuItem key={child.breadcrumbName || child.path}>
|
||||||
{itemRender({
|
{itemRender({
|
||||||
route: child,
|
route: child,
|
||||||
params,
|
params,
|
||||||
|
@ -85,7 +86,7 @@ export default {
|
||||||
paths: this.addChildPath(paths, child.path, params),
|
paths: this.addChildPath(paths, child.path, params),
|
||||||
h: this.$createElement,
|
h: this.$createElement,
|
||||||
})}
|
})}
|
||||||
</Menu.Item>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue