Browse Source

add check icon in multi select

pull/11809/merge
HeskeyBaozi 6 years ago
committed by 偏右
parent
commit
ace857d8bf
  1. 5
      components/select/index.tsx
  2. 10
      components/select/style/index.less
  3. 2
      package.json

5
components/select/index.tsx

@ -182,10 +182,15 @@ export default class Select extends React.Component<SelectProps, {}> {
<Icon type="close" className={`${prefixCls}-remove-icon`} />
);
const menuItemSelectedIcon = (
<Icon type="check" className={`${prefixCls}-selected-icon`} />
);
return (
<RcSelect
inputIcon={inputIcon}
removeIcon={removeIcon}
menuItemSelectedIcon={menuItemSelectedIcon}
{...restProps}
{...modeConfig}
prefixCls={prefixCls}

10
components/select/style/index.less

@ -541,7 +541,7 @@
&&--multiple {
.@{select-prefix-cls}-dropdown-menu-item {
&:after {
& .@{select-prefix-cls}-selected-icon {
color: transparent;
.iconfont-size-under-12px(10px);
transition: all 0.2s ease;
@ -553,16 +553,16 @@
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
}
&:hover:after {
&:hover .@{select-prefix-cls}-selected-icon {
color: #ddd;
}
&-disabled:after {
&-disabled .@{select-prefix-cls}-selected-icon {
display: none;
}
&-selected:after,
&-selected:hover:after {
&-selected .@{select-prefix-cls}-selected-icon,
&-selected:hover .@{select-prefix-cls}-selected-icon {
color: @primary-color;
display: inline-block;
}

2
package.json

@ -71,7 +71,7 @@
"rc-pagination": "~1.17.0",
"rc-progress": "~2.2.2",
"rc-rate": "~2.4.0",
"rc-select": "~8.2.3",
"rc-select": "~8.2.6",
"rc-slider": "~8.6.0",
"rc-steps": "~3.3.0",
"rc-switch": "~1.7.0",

Loading…
Cancel
Save