Browse Source

loading button should not be transparent

pull/1434/head
afc163 9 years ago
parent
commit
cc2f93a4e1
  1. 6
      components/button/demo/loading.md
  2. 21
      style/components/button.less

6
components/button/demo/loading.md

@ -24,15 +24,15 @@ const App = React.createClass({
render() {
return (
<div>
<Button type="primary" size="large" loading>
加载中
</Button>
<Button type="primary" loading>
加载中
</Button>
<Button type="primary" size="small" loading>
加载中
</Button>
<Button loading>
加载中
</Button>
<br />
<Button type="primary" loading={this.state.loading} onClick={this.enterLoading}>
点击变加载

21
style/components/button.less

@ -46,6 +46,22 @@
.btn-circle(@btn-prefix-cls);
}
&:before {
position: absolute;
top: -1px;
left: -1px;
bottom: -1px;
right: -1px;
background: #fff;
opacity: 0.35;
content: '';
border-radius: inherit;
z-index: 1;
transition: opacity .2s;
pointer-events: none;
display: none;
}
&:after {
font-family: anticon;
content: "\e6a1";
@ -58,11 +74,14 @@
&&-loading {
padding-left: 29px;
pointer-events: none;
opacity: 0.75;
position: relative;
.anticon {
margin-left: -14px;
.transition(all .3s @ease-in-out);
}
&:before {
display: block;
}
}
&-sm&-loading {

Loading…
Cancel
Save