Skip to content

Commit

Permalink
fix(transition): cancel the delayed execution of the transition enter…
Browse files Browse the repository at this point in the history
… hook
  • Loading branch information
yangchangtao committed Oct 9, 2024
1 parent 35785f3 commit 0881c2e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,14 +712,12 @@ function baseCreateRenderer(
transition!.beforeEnter(el)
}
hostInsert(el, container, anchor)
if (
(vnodeHook = props && props.onVnodeMounted) ||
needCallTransitionHooks ||
dirs
) {
if (needCallTransitionHooks) {
transition!.enter(el)
}
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
queuePostRenderEffect(() => {
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode)
needCallTransitionHooks && transition!.enter(el)
dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted')
}, parentSuspense)
}
Expand Down

0 comments on commit 0881c2e

Please sign in to comment.