mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(nuxt): change the name of the RouteProvider componet when keepalive
This commit is contained in:
parent
42ef331816
commit
e5b4e15110
@ -126,7 +126,7 @@ export default defineComponent({
|
|||||||
trackRootNodes: hasTransition,
|
trackRootNodes: hasTransition,
|
||||||
vnodeRef: pageRef,
|
vnodeRef: pageRef,
|
||||||
})
|
})
|
||||||
if (import.meta.client && keepaliveConfig) {
|
if (import.meta.client && keepaliveConfig && !(providerVNode.type as any).name) {
|
||||||
(providerVNode.type as any).name = (routeProps.Component.type as any).name || (routeProps.Component.type as any).__name || 'RouteProvider'
|
(providerVNode.type as any).name = (routeProps.Component.type as any).name || (routeProps.Component.type as any).__name || 'RouteProvider'
|
||||||
}
|
}
|
||||||
return providerVNode
|
return providerVNode
|
||||||
|
Loading…
Reference in New Issue
Block a user