Преглед изворни кода

fix(runtime-core): pass props and children to loadingComponent (#13997)

indykoning пре 5 месеци
родитељ
комит
40c4b2a876
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      packages/runtime-core/src/apiAsyncComponent.ts

+ 4 - 1
packages/runtime-core/src/apiAsyncComponent.ts

@@ -241,7 +241,10 @@ export function defineAsyncComponent<
             error: error.value,
           })
         } else if (loadingComponent && !delayed.value) {
-          return createVNode(loadingComponent)
+          return createInnerComp(
+            loadingComponent as ConcreteComponent,
+            instance,
+          )
         }
       }
     },