commit
d8de604ff5
6 changed files with 69 additions and 2 deletions
|
@ -73,7 +73,7 @@
|
|||
type: [String, Number],
|
||||
default: 'auto',
|
||||
validator (value) {
|
||||
return value === 'auto' || toString.call(value) === '[object Number]';
|
||||
return value === 'auto' || Object.prototype.toString.call(value) === '[object Number]';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -68,7 +68,7 @@ function notice (type, options) {
|
|||
key: noticeKey.toString(),
|
||||
duration: duration,
|
||||
style: {},
|
||||
transitionName: 'move-right',
|
||||
transitionName: 'move-notice',
|
||||
content: content,
|
||||
onClose: onClose,
|
||||
closable: true
|
||||
|
|
|
@ -117,3 +117,45 @@
|
|||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// specific transition for Notice
|
||||
|
||||
.move-motion(move-notice, ivuMoveNotice);
|
||||
@import '../components/notice.less';
|
||||
|
||||
@keyframes ivuMoveNoticeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform-origin: 0 0;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform-origin: 0 0;
|
||||
transform: translateX(0%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ivuMoveNoticeOut {
|
||||
0% {
|
||||
transform-origin: 0 0;
|
||||
transform: translateX(0%);
|
||||
opacity: 1;
|
||||
}
|
||||
70% {
|
||||
transform-origin: 0 0;
|
||||
transform: translateX(100%);
|
||||
height: auto;
|
||||
padding: @notice-padding;
|
||||
margin-bottom: @notice-margin-bottom;
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform-origin: 0 0;
|
||||
transform: translateX(100%);
|
||||
height: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue