style: 修复select组件删除\编辑图标样式 (#5946)

* style: 修复select组件删除\编辑图标样式

* feat: 国际化语料补充

* style: 修复select组件删除\编辑图标样式
This commit is contained in:
qinhaoyan 2022-12-19 17:40:12 +08:00 committed by GitHub
parent eb1f154ae0
commit 14c8297304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 20 deletions

View File

@ -88,7 +88,7 @@
.#{$ns}Select-menu {
.#{$ns}Select-option {
height: px2rem(32px);
line-height: px2rem(22px);
line-height: px2rem(32px);
}
.#{$ns}Select-addBtn {
height: px2rem(32px);

View File

@ -1015,25 +1015,6 @@ export class Select extends React.Component<SelectProps, SelectState> {
'is-active': checked
})}
>
{removable ? (
<a data-tooltip={__('Select.clear')} data-position="top">
<Icon
icon="close"
className="icon"
onClick={(e: any) => this.handleDeleteClick(e, item)}
/>
</a>
) : null}
{editable ? (
<a data-tooltip="编辑" data-position="top">
<Icon
icon="pencil"
className="icon"
onClick={(e: any) => this.handleEditClick(e, item)}
/>
</a>
) : null}
{renderMenu ? (
multiple ? (
<Checkbox
@ -1107,6 +1088,24 @@ export class Select extends React.Component<SelectProps, SelectState> {
{item.tip}
</span>
)}
{editable ? (
<a data-tooltip={__('Select.edit')} data-position="left">
<Icon
icon="pencil"
className="icon"
onClick={(e: any) => this.handleEditClick(e, item)}
/>
</a>
) : null}
{removable ? (
<a data-tooltip={__('Select.clear')} data-position="left">
<Icon
icon="close"
className="icon"
onClick={(e: any) => this.handleDeleteClick(e, item)}
/>
</a>
) : null}
</div>
);
};

View File

@ -200,6 +200,7 @@ register('en-US', {
'Checkboxes.selectAll': 'Select/Deselect All',
'Select.checkAll': 'Check all',
'Select.clear': 'Clear',
'Select.edit': 'Edit',
'Select.upload': 'Re upload',
'Select.clearAll': 'Clear all',
'Select.createLabel': 'New option',

View File

@ -206,6 +206,7 @@ register('zh-CN', {
'Checkboxes.selectAll': '全选/不选',
'Select.checkAll': '全选',
'Select.clear': '移除',
'Select.edit': '编辑',
'Select.upload': '重新上传',
'Select.clearAll': '移除所有',
'Select.createLabel': '新增选项',