mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
fix(nuxt): use suspense for child pages on client-side navigation (#4677)
This commit is contained in:
parent
ee64714771
commit
ab3971d302
@ -26,7 +26,7 @@ export default defineComponent({
|
|||||||
default: (routeProps: RouterViewSlotProps) => routeProps.Component &&
|
default: (routeProps: RouterViewSlotProps) => routeProps.Component &&
|
||||||
_wrapIf(Transition, routeProps.route.meta.pageTransition ?? defaultPageTransition,
|
_wrapIf(Transition, routeProps.route.meta.pageTransition ?? defaultPageTransition,
|
||||||
wrapInKeepAlive(routeProps.route.meta.keepalive,
|
wrapInKeepAlive(routeProps.route.meta.keepalive,
|
||||||
isNested
|
isNested && nuxtApp.isHydrating
|
||||||
// Include route children in parent suspense
|
// Include route children in parent suspense
|
||||||
? h(routeProps.Component, { key: generateRouteKey(props.pageKey, routeProps) } as {})
|
? h(routeProps.Component, { key: generateRouteKey(props.pageKey, routeProps) } as {})
|
||||||
: h(Suspense, {
|
: h(Suspense, {
|
||||||
|
Loading…
Reference in New Issue
Block a user