mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-14 08:51:28 +08:00
18 lines
418 B
JavaScript
18 lines
418 B
JavaScript
import animate from './css-animation';
|
|
const getTransitionProps = (transitionName, opt = {}) => {
|
|
const transitionProps = {
|
|
appear: true,
|
|
css: false,
|
|
onEnter: (el, done) => {
|
|
animate(el, `${transitionName}-enter`, done);
|
|
},
|
|
onLeave: (el, done) => {
|
|
animate(el, `${transitionName}-leave`, done);
|
|
},
|
|
...opt,
|
|
};
|
|
return transitionProps;
|
|
};
|
|
|
|
export default getTransitionProps;
|