diff --git a/components/menu/index.md b/components/menu/index.md index 7271ab6773..459c317500 100644 --- a/components/menu/index.md +++ b/components/menu/index.md @@ -51,8 +51,11 @@ english: Menu | 参数 | 说明 | 类型 | 默认值 | |----------|----------------|----------|--------------| +| disabled | 是否禁用 | Boolean | false | +| key | 唯一标志 | String | | | title | 子菜单项值 | String or React.Element | | | children | 子菜单的菜单项 | (MenuItem or SubMenu)[] | | +| onTitleClick | 点击子菜单标题 | Function({ eventKey, domEvent }) | | ### Menu.ItemGroup props diff --git a/components/menu/style/index.less b/components/menu/style/index.less index b4190c3e3c..460fc4fcce 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -130,6 +130,7 @@ &-item, &-submenu-title { margin: 0; + padding: 0 20px; position: relative; display: block; white-space: nowrap; @@ -144,6 +145,11 @@ pointer-events: none; } } + + .anticon { + width: 14px; + margin-right: 8px; + } } & > &-item-divider { @@ -201,14 +207,6 @@ } } - &-item, - &-submenu-title { - .anticon { - width: 14px; - margin-right: 8px; - } - } - &-horizontal { border: 0; border-bottom: 1px solid @border-color-split; @@ -217,7 +215,6 @@ > .@{menu-prefix-cls}-item, > .@{menu-prefix-cls}-submenu { - padding: 0 20px; position: relative; top: 1px; float: left;