按钮样式优化

This commit is contained in:
2betop 2020-06-08 18:46:28 +08:00
parent 9c5c5125df
commit 6dcc242d98
3 changed files with 5 additions and 8 deletions

View File

@ -205,6 +205,7 @@
height: $height; height: $height;
.#{$ns}Button-icon:first-child:not(:last-child):not(.pull-right), .#{$ns}Button-icon:first-child:not(:last-child):not(.pull-right),
> svg.icon:not(:last-child):not(.pull-right),
> .pull-left { > .pull-left {
margin-right: $padding-x; margin-right: $padding-x;
} }

View File

@ -772,7 +772,7 @@ export default class ComboControl extends React.Component<ComboProps> {
{ {
type: 'dropdown-button', type: 'dropdown-button',
icon: addIcon ? ( icon: addIcon ? (
<Icon icon="plus" className="icon m-r-xs" /> <Icon icon="plus" className="icon" />
) : ( ) : (
'' ''
), ),
@ -797,9 +797,7 @@ export default class ComboControl extends React.Component<ComboProps> {
data-position="left" data-position="left"
data-tooltip={__('新增一条数据')} data-tooltip={__('新增一条数据')}
> >
{addIcon ? ( {addIcon ? <Icon icon="plus" className="icon" /> : null}
<Icon icon="plus" className="icon m-r-xs" />
) : null}
<span>{__(addButtonText || '新增')}</span> <span>{__(addButtonText || '新增')}</span>
</a> </a>
) )
@ -1149,9 +1147,7 @@ export default class ComboControl extends React.Component<ComboProps> {
className={cx(`Button Combo-addBtn`, addButtonClassName)} className={cx(`Button Combo-addBtn`, addButtonClassName)}
data-tooltip={__('新增一条数据')} data-tooltip={__('新增一条数据')}
> >
{addIcon ? ( {addIcon ? <Icon icon="plus" className="icon" /> : null}
<Icon icon="plus" className="icon m-r-xs" />
) : null}
<span>{__(addButtonText || '新增')}</span> <span>{__(addButtonText || '新增')}</span>
</button> </button>
) )

View File

@ -211,7 +211,7 @@ export default class SubFormControl extends React.PureComponent<
disabled={disabled} disabled={disabled}
data-tooltip={__('新增一条数据')} data-tooltip={__('新增一条数据')}
> >
<Icon icon="plus" className="icon m-r-xs" /> <Icon icon="plus" className="icon" />
<span>{__('新增')}</span> <span>{__('新增')}</span>
</button> </button>
]; ];