fix(runtime-core): should correctly call beforeEnter
inside Suspense
(#1805)
fix #1795
This commit is contained in:
parent
3991ff03ce
commit
bc6f252c4a
@ -752,19 +752,17 @@ function baseCreateRenderer(
|
||||
if (treeOwnerId && treeOwnerId !== scopeId) {
|
||||
hostSetScopeId(el, treeOwnerId + '-s')
|
||||
}
|
||||
|
||||
if (transition && !transition.persisted) {
|
||||
transition.beforeEnter(el)
|
||||
}
|
||||
}
|
||||
|
||||
hostInsert(el, container, anchor)
|
||||
// #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved
|
||||
// #1689 For inside suspense + suspense resolved case, just call it
|
||||
const needCallTransitionHooks =
|
||||
(!parentSuspense || (parentSuspense && parentSuspense!.isResolved)) &&
|
||||
transition &&
|
||||
!transition.persisted
|
||||
if (needCallTransitionHooks) {
|
||||
transition!.beforeEnter(el)
|
||||
}
|
||||
hostInsert(el, container, anchor)
|
||||
if (
|
||||
(vnodeHook = props && props.onVnodeMounted) ||
|
||||
needCallTransitionHooks ||
|
||||
|
Loading…
Reference in New Issue
Block a user