把modal的fade移到fade.less,modal的fade缺少appear导至第一次出来没动画

This commit is contained in:
jljsj 2015-09-15 16:15:07 +08:00
parent 872b215930
commit 4b320fb1dc
2 changed files with 11 additions and 51 deletions

View File

@ -17,35 +17,4 @@
filter: alpha(opacity=50);
}
&-wrap-hidden > &-mask&-fade-enter,
&-wrap-hidden > &-mask&-fade-leave {
display: block;
}
.fade-effect() {
animation-duration: 0.3s;
animation-fill-mode: both;
animation-timing-function: @ease-in;
}
&-fade-enter {
opacity: 0;
.fade-effect();
animation-play-state: paused;
}
&-fade-leave {
.fade-effect();
animation-play-state: paused;
}
&-fade-enter&-fade-enter-active {
animation-name: antFadeIn;
animation-play-state: running;
}
&-fade-leave&-fade-leave-active {
animation-name: antFadeOut;
animation-play-state: running;
}
}

View File

@ -1,25 +1,16 @@
.fade-enter, .fade-appear {
opacity: 0;
.motion-common();
animation-timing-function: linear;
animation-play-state: paused;
.fade-motion(@className, @keyframeName) {
.make-motion(@className, @keyframeName);
.@{className}-enter, .@{className}-appear {
opacity: 0;
animation-timing-function: linear;
}
.@{className}-leave {
animation-timing-function: linear;
}
}
.fade-leave {
.motion-common();
animation-timing-function: linear;
animation-play-state: paused;
}
.fade-enter.fade-enter-active, .fade-appear.fade-appear-active {
animation-name: antFadeIn;
animation-play-state: running;
}
.fade-leave.fade-leave-active {
animation-name: antFadeOut;
animation-play-state: running;
}
.fade-motion(fade, antFade);
.fade-motion(ant-modal-fade, antFade);
@keyframes antFadeIn {
0% {