import { CSSProperties, Ref, ShallowRef } from "vue"; //#region src/use-transition/type.d.ts interface TransitionBase { /** 被应用的目标元素 */ target: ShallowRef | HTMLElement; /** 进入动画结束回调 */ afterEnter?: () => void; /** 进入动画被取消回调(css 实现中阶段被打断时由新阶段直接接管,不会触发) */ enterCanceled?: () => void; /** 离开动画结束回调 */ afterLeave?: () => void; /** 离开动画被取消回调(css 实现中阶段被打断时由新阶段直接接管,不会触发) */ leaveCanceled?: () => void; } interface CssTransitionOptions extends TransitionBase { /** 类的名称, 会生成 `${name}-enter-${'to' | 'active' | 'from'}`, `${name}-leave-${'to' | 'active' | 'from'}这几种类` */ name: ShallowRef | string | Ref; /** 保留进入类 */ keepEnterTo?: boolean; } interface StyleTransitionOptions extends TransitionBase { /** 进入后的样式 */ enterTo: CSSProperties; /** 进入过渡时的样式 */ enterActive: CSSProperties; /** 离开过渡时的样式 */ leaveActive: CSSProperties; } interface Returned { /** * 切换进入/离开动画 * @param active 是否激活 */ toggle(active: boolean | ((active: boolean) => boolean)): void; /** * 标记进入动画, toggle(true)的别名 */ enter(): void; /** * 标记离开动画, toggle(false)的别名 */ leave(): void; } //#endregion export { CssTransitionOptions, Returned, StyleTransitionOptions, TransitionBase }; //# sourceMappingURL=type.d.ts.map