diff --git a/components/breadcrumb/Breadcrumb.jsx b/components/breadcrumb/Breadcrumb.jsx index 5113e86c22..45a228a396 100644 --- a/components/breadcrumb/Breadcrumb.jsx +++ b/components/breadcrumb/Breadcrumb.jsx @@ -27,6 +27,7 @@ export default class Breadcrumb extends React.Component { if (routes && routes.length > 0) { const paths = []; crumbs = routes.map((route, i) => { + route.path = route.path || ''; let path = route.path.replace(/^\//, ''); Object.keys(params).forEach(key => { path = path.replace(`:${key}`, params[key]); diff --git a/components/menu/index.md b/components/menu/index.md index d26110aa5f..8f871339ac 100644 --- a/components/menu/index.md +++ b/components/menu/index.md @@ -37,7 +37,7 @@ english: Menu | defaultOpenKeys | 初始展开的菜单项 key 数组 | | | | onSelect | 被选中时调用,参数 {item, key, selectedKeys} 对象 | function | 无 | | onDeselect | 取消选中时调用,参数 {item, key, selectedKeys} 对象,仅在 multiple 生效 | function | 无 | -| onClick | 点击 menuitem 调用此函数,参数为 {item, key} | function | 无 | +| onClick | 点击 menuitem 调用此函数,参数为 {item, key, keyPath} | function | 无 | | style | 根节点样式 | object | | | ### Menu.Item props