Przeglądaj źródła

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

daiwei 1 miesiąc temu
rodzic
commit
79190e845b
1 zmienionych plików z 4 dodań i 1 usunięć
  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__) {