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) {
|
if (treeOwnerId && treeOwnerId !== scopeId) {
|
||||||
hostSetScopeId(el, treeOwnerId + '-s')
|
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
|
// #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
|
// #1689 For inside suspense + suspense resolved case, just call it
|
||||||
const needCallTransitionHooks =
|
const needCallTransitionHooks =
|
||||||
(!parentSuspense || (parentSuspense && parentSuspense!.isResolved)) &&
|
(!parentSuspense || (parentSuspense && parentSuspense!.isResolved)) &&
|
||||||
transition &&
|
transition &&
|
||||||
!transition.persisted
|
!transition.persisted
|
||||||
|
if (needCallTransitionHooks) {
|
||||||
|
transition!.beforeEnter(el)
|
||||||
|
}
|
||||||
|
hostInsert(el, container, anchor)
|
||||||
if (
|
if (
|
||||||
(vnodeHook = props && props.onVnodeMounted) ||
|
(vnodeHook = props && props.onVnodeMounted) ||
|
||||||
needCallTransitionHooks ||
|
needCallTransitionHooks ||
|
||||||
|
Loading…
Reference in New Issue
Block a user