fix(runtime-core): do not call transition enter hooks when mounting in suspense (#1588)
fix #1583
This commit is contained in:
parent
64c7b2f9ce
commit
246ec5c594
@ -736,14 +736,17 @@ function baseCreateRenderer(
|
||||
}
|
||||
|
||||
hostInsert(el, container, anchor)
|
||||
// #1583 For inside suspense case, enter hook should call when suspense resolved
|
||||
const needCallTransitionHooks =
|
||||
!parentSuspense && transition && !transition.persisted
|
||||
if (
|
||||
(vnodeHook = props && props.onVnodeMounted) ||
|
||||
(transition && !transition.persisted) ||
|
||||
needCallTransitionHooks ||
|
||||
dirs
|
||||
) {
|
||||
queuePostRenderEffect(() => {
|
||||
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode)
|
||||
transition && !transition.persisted && transition.enter(el)
|
||||
needCallTransitionHooks && transition!.enter(el)
|
||||
dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted')
|
||||
}, parentSuspense)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user