Browse Source

Fix button loading style with icon, close #7709

pull/7716/head
afc163 7 years ago
parent
commit
dd22bae0fc
  1. 2
      components/button/button.tsx
  2. 4
      components/button/style/index.less

2
components/button/button.tsx

@ -146,7 +146,7 @@ export default class Button extends React.Component<ButtonProps, any> {
[`${prefixCls}-${type}`]: type,
[`${prefixCls}-${shape}`]: shape,
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-icon-only`]: !children && icon && !loading,
[`${prefixCls}-icon-only`]: !children && icon,
[`${prefixCls}-loading`]: loading,
[`${prefixCls}-clicked`]: clicked,
[`${prefixCls}-background-ghost`]: ghost,

4
components/button/style/index.less

@ -93,7 +93,7 @@
display: block;
}
&&-loading:not(&-circle):not(&-circle-outline) {
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
padding-left: 29px;
pointer-events: none;
position: relative;
@ -102,7 +102,7 @@
}
}
&-sm&-loading:not(&-circle):not(&-circle-outline) {
&-sm&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
padding-left: 24px;
.@{iconfont-css-prefix} {
margin-left: -17px;

Loading…
Cancel
Save