tdesign-vue-next
Version:
TDesign Component for vue-next
36 lines (32 loc) • 1.27 kB
JavaScript
/**
* tdesign v1.11.5
* (c) 2025 tdesign
* @license MIT
*/
import 'vue';
import { useConfig } from '../config-provider/hooks/useConfig.js';
import { EAnimationType } from '../config-provider/utils/context.js';
import 'lodash-es';
import '../_chunks/dep-c75b9b8e.js';
import '@babel/runtime/helpers/typeof';
import '../_chunks/dep-caecb55d.js';
import 'dayjs';
var expand = EAnimationType.expand,
ripple = EAnimationType.ripple,
fade = EAnimationType.fade;
function useKeepAnimation() {
var _useConfig = useConfig("animation"),
globalConfig = _useConfig.globalConfig;
var keepAnimation = function keepAnimation(type) {
var _animationConfig$excl, _animationConfig$incl;
var animationConfig = globalConfig.value;
return animationConfig && !((_animationConfig$excl = animationConfig.exclude) !== null && _animationConfig$excl !== void 0 && _animationConfig$excl.includes(type)) && ((_animationConfig$incl = animationConfig.include) === null || _animationConfig$incl === void 0 ? void 0 : _animationConfig$incl.includes(type));
};
return {
keepExpand: keepAnimation(expand),
keepRipple: keepAnimation(ripple),
keepFade: keepAnimation(fade)
};
}
export { useKeepAnimation as default };
//# sourceMappingURL=useKeepAnimation.js.map