daiwei 1 سال پیش
والد
کامیت
5407b0544d
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      packages/compiler-core/src/transforms/vSlot.ts

+ 7 - 0
packages/compiler-core/src/transforms/vSlot.ts

@@ -411,6 +411,13 @@ function hasForwardedSlots(children: TemplateChildNode[]): boolean {
       case NodeTypes.IF:
         if (hasForwardedSlots(child.branches)) return true
         break
+      case NodeTypes.SKIP:
+        if (
+          hasForwardedSlots(child.consequent.children) ||
+          hasForwardedSlots(child.alternate.children)
+        )
+          return true
+        break
       case NodeTypes.IF_BRANCH:
       case NodeTypes.FOR:
         if (hasForwardedSlots(child.children)) return true