style: optimization dropdown menu style (#21768)

* style: optimization dropdown menu style

* fix: use var

* fix right

* Update index.less

Co-authored-by: 偏右 <afc163@gmail.com>
This commit is contained in:
xrkffgg 2020-03-04 11:53:15 +08:00 committed by GitHub
parent 3c292b9d62
commit 1556582884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -37,7 +37,7 @@ class OverlayVisible extends React.Component {
<Menu onClick={this.handleMenuClick}>
<Menu.Item key="1">Clicking me will not close the menu.</Menu.Item>
<Menu.Item key="2">Clicking me will not close the menu also.</Menu.Item>
<Menu.Item key="3">Clicking me will close the menu</Menu.Item>
<Menu.Item key="3">Clicking me will close the menu.</Menu.Item>
</Menu>
);
return (

View File

@ -41,9 +41,9 @@ title: Dropdown
| icon | 右侧的 icon | ReactNode | - | |
| overlay | 菜单 | [Menu](/components/menu/) | - | |
| placement | 菜单弹出位置:`bottomLeft` `bottomCenter` `bottomRight` `topLeft` `topCenter` `topRight` | String | `bottomLeft` | |
| size | 按钮大小,和 [Button](/components/button/) 一致 | string | 'default' | |
| size | 按钮大小,和 [Button](/components/button/) 一致 | string | `default` | |
| trigger | 触发下拉的行为 | Array&lt;`click`\|`hover`\|`contextMenu`> | `['hover']` | |
| type | 按钮类型,和 [Button](/components/button/) 一致 | string | 'default' | |
| type | 按钮类型,和 [Button](/components/button/) 一致 | string | `default` | |
| visible | 菜单是否显示 | boolean | - | |
| onClick | 点击左侧按钮的回调,和 [Button](/components/button/) 一致 | Function | - | |
| onVisibleChange | 菜单显示状态改变时调用,参数为 visible | Function | - | |

View File

@ -189,6 +189,7 @@
}
&-icon {
margin-right: 0;
color: @text-color-secondary;
font-style: normal;
.iconfont-size-under-12px(10px);
@ -203,11 +204,11 @@
}
&-submenu-title {
padding-right: 26px;
padding-right: @control-padding-horizontal + @font-size-sm;
.@{dropdown-prefix-cls}-rtl & {
padding-right: @control-padding-horizontal;
padding-left: 26px;
padding-left: @control-padding-horizontal + @font-size-sm;
}
}