Compare commits

...

2 Commits

Author SHA1 Message Date
jilx951102
caadcc5554
Merge e5b4e15110 into 9bf8465806 2024-11-19 17:34:11 -05:00
jilixiang
e5b4e15110 fix(nuxt): change the name of the RouteProvider componet when keepalive 2024-07-18 20:29:56 +08:00

View File

@ -126,7 +126,7 @@ export default defineComponent({
trackRootNodes: hasTransition,
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'
}
return providerVNode