fix: jsx throw error

This commit is contained in:
tanjinzhou 2020-06-09 15:54:11 +08:00
parent 1884a7c4c6
commit 51b2d2f5ad

View File

@ -6,6 +6,7 @@ import { ConfigConsumerProps } from '../config-provider';
import BreadcrumbItem from './BreadcrumbItem';
import Menu from '../menu';
const MenuItem = Menu.Item;
const Route = PropTypes.shape({
path: PropTypes.string,
breadcrumbName: PropTypes.string,
@ -77,7 +78,7 @@ export default {
overlay = (
<Menu>
{route.children.map(child => (
<Menu.Item key={child.breadcrumbName || child.path}>
<MenuItem key={child.breadcrumbName || child.path}>
{itemRender({
route: child,
params,
@ -85,7 +86,7 @@ export default {
paths: this.addChildPath(paths, child.path, params),
h: this.$createElement,
})}
</Menu.Item>
</MenuItem>
))}
</Menu>
);