ant-design-vue/components/_util/getTransitionProps.js

22 lines
885 B
JavaScript
Raw Normal View History

2018-02-05 11:12:41 +00:00
const getTransitionProps = (transitionName, opt = {}) => {
2020-09-23 09:32:53 +00:00
if (process.env.NODE_ENV === 'test') {
return { css: false, ...opt };
}
2018-02-05 11:12:41 +00:00
const transitionProps = {
2020-06-11 10:27:27 +00:00
appear: true,
2020-10-09 09:37:04 +00:00
appearFromClass: `${transitionName}-appear`,
appearActiveClass: `${transitionName}-appear ${transitionName}-appear-active`,
appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
enterFromClass: `${transitionName}-enter`,
enterActiveClass: `${transitionName}-enter ${transitionName}-enter-active`,
enterToClass: `${transitionName}-enter ${transitionName}-enter-active`,
leaveFormClass: ` ${transitionName}-leave`,
leaveActiveClass: `${transitionName}-leave ${transitionName}-leave-active`,
leaveToClass: `${transitionName}-leave ${transitionName}-leave-active`,
2020-06-11 10:27:27 +00:00
...opt,
2019-01-12 03:33:27 +00:00
};
return transitionProps;
};
2018-02-05 11:12:41 +00:00
2019-01-12 03:33:27 +00:00
export default getTransitionProps;