Explorar o código

fix(runtime-vapor): pass parentComp to _injectChildStyle for correct style ordering

daiwei hai 1 mes
pai
achega
79190e845b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      packages/runtime-vapor/src/component.ts

+ 4 - 1
packages/runtime-vapor/src/component.ts

@@ -888,7 +888,10 @@ export function mountComponent(
   // custom element style injection
   const { root, type } = instance as GenericComponentInstance
   if (root && root.ce && (root.ce as VaporElement)._hasShadowRoot()) {
-    root.ce!._injectChildStyle(type)
+    root.ce!._injectChildStyle(
+      type,
+      instance.parent ? instance.parent.type : undefined,
+    )
   }
 
   if (__DEV__) {