diff --git a/packages/runtime-core/src/components/BaseTransition.ts b/packages/runtime-core/src/components/BaseTransition.ts index 1a92dffe..b2d7c32e 100644 --- a/packages/runtime-core/src/components/BaseTransition.ts +++ b/packages/runtime-core/src/components/BaseTransition.ts @@ -43,14 +43,14 @@ export interface BaseTransitionProps { onLeaveCancelled?: (el: HostElement) => void // only fired in persisted mode } -export interface TransitionHooks { +export interface TransitionHooks { persisted: boolean - beforeEnter(el: RendererElement): void - enter(el: RendererElement): void - leave(el: RendererElement, remove: () => void): void + beforeEnter(el: HostElement): void + enter(el: HostElement): void + leave(el: HostElement, remove: () => void): void afterLeave?(): void delayLeave?( - el: RendererElement, + el: HostElement, earlyRemove: () => void, delayedLeave: () => void ): void @@ -272,9 +272,9 @@ export function resolveTransitionHooks( ) } - const hooks: TransitionHooks = { + const hooks: TransitionHooks = { persisted, - beforeEnter(el: TransitionElement) { + beforeEnter(el) { if (!appear && !state.isMounted) { return } @@ -295,7 +295,7 @@ export function resolveTransitionHooks( callHook(onBeforeEnter, [el]) }, - enter(el: TransitionElement) { + enter(el) { if (!appear && !state.isMounted) { return } @@ -320,7 +320,7 @@ export function resolveTransitionHooks( } }, - leave(el: TransitionElement, remove) { + leave(el, remove) { const key = String(vnode.key) if (el._enterCb) { el._enterCb(true /* cancelled */) diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index b1d02603..b7a5f338 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -120,7 +120,7 @@ export interface VNode { component: ComponentInternalInstance | null suspense: SuspenseBoundary | null dirs: DirectiveBinding[] | null - transition: TransitionHooks | null + transition: TransitionHooks | null // DOM el: HostNode | null