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

22 lines
821 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`,
2020-10-09 22:58:19 +00:00
// appearActiveClass: `antdv-base-transtion`,
2020-10-09 09:37:04 +00:00
appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
enterFromClass: `${transitionName}-enter`,
2020-10-09 22:58:19 +00:00
// enterActiveClass: `antdv-base-transtion`,
2020-10-09 09:37:04 +00:00
enterToClass: `${transitionName}-enter ${transitionName}-enter-active`,
2020-10-09 22:58:19 +00:00
leaveFromClass: ` ${transitionName}-leave`,
2020-10-09 09:37:04 +00:00
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;