mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
update upload animation code style
This commit is contained in:
parent
3a134c7219
commit
e23372b6e8
@ -22,7 +22,6 @@ export default React.createClass({
|
||||
}
|
||||
},
|
||||
handleClose(file) {
|
||||
let matchWay = (!file.uid) ? 'byName' : 'byUid';
|
||||
let items = this.state.items;
|
||||
let removeItem = getFileItem(file, items);
|
||||
if (removeItem) {
|
||||
@ -41,13 +40,13 @@ export default React.createClass({
|
||||
{statusIcon}
|
||||
<b className={prefixCls + '-item-name'}>{file.filename}</b>
|
||||
<i className="anticon anticon-cross" ref="theCloseBtn"
|
||||
onClick={this.handleClose.bind(this, file)}></i>
|
||||
onClick={this.handleClose.bind(this, file)}></i>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
return (<div className={prefixCls + '-list'}>
|
||||
<Animate transitionName='m-top'>
|
||||
{items.map(downloadItem)}
|
||||
<Animate transitionName={prefixCls + '-margin-top'}>
|
||||
{items.map(downloadItem)}
|
||||
</Animate>
|
||||
</div>);
|
||||
}
|
||||
|
@ -99,24 +99,26 @@
|
||||
color: @success-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.m-top-enter{
|
||||
animation:marginTopIn .3s @ease-in-out-circ;
|
||||
}
|
||||
.m-top-leave{
|
||||
animation:marginTopOut .3s @ease-in-out-circ;
|
||||
}
|
||||
@keyframes marginTopIn {
|
||||
from{
|
||||
margin-top: -25px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes marginTopOut {
|
||||
to{
|
||||
margin-top: -25px;
|
||||
opacity: 0;
|
||||
.@{upload-prefix-cls}-margin-top-enter {
|
||||
animation: marginTopIn .3s @ease-in-out-circ;
|
||||
}
|
||||
|
||||
.@{upload-prefix-cls}-margin-top-leave {
|
||||
animation: marginTopOut .3s @ease-in-out-circ;
|
||||
}
|
||||
|
||||
@keyframes marginTopIn {
|
||||
from {
|
||||
margin-top: -25px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes marginTopOut {
|
||||
to {
|
||||
margin-top: -25px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user