Merge pull request #16063 from gxvv/master

fix: loading circle button can handle pointer events.
This commit is contained in:
偏右 2019-04-14 14:03:45 +08:00 committed by GitHub
commit a091c726f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View File

@ -606,7 +606,7 @@ exports[`renders ./components/button/demo/icon.md correctly 1`] = `
`;
exports[`renders ./components/button/demo/loading.md correctly 1`] = `
<span>
<div>
<button
class="ant-btn ant-btn-primary ant-btn-loading"
type="button"
@ -746,7 +746,7 @@ exports[`renders ./components/button/demo/loading.md correctly 1`] = `
</svg>
</i>
</button>
</span>
</div>
`;
exports[`renders ./components/button/demo/multiple.md correctly 1`] = `

View File

@ -32,7 +32,7 @@ class App extends React.Component {
render() {
return (
<span>
<div>
<Button type="primary" loading>
Loading
</Button>
@ -49,7 +49,7 @@ class App extends React.Component {
<br />
<Button shape="circle" loading />
<Button type="primary" shape="circle" loading />
</span>
</div>
);
}
}

View File

@ -107,14 +107,17 @@
}
}
&&-loading {
position: relative;
pointer-events: none;
}
&&-loading::before {
display: block;
}
&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
position: relative;
padding-left: 29px;
pointer-events: none;
.@{iconfont-css-prefix}:not(:last-child) {
margin-left: -14px;
}