ソースを参照

fix: mark single root for transition block

daiwei 1 年間 前
コミット
41aba70529
1 ファイル変更3 行追加0 行削除
  1. 3 0
      packages/runtime-vapor/src/components/Transition.ts

+ 3 - 0
packages/runtime-vapor/src/components/Transition.ts

@@ -74,6 +74,9 @@ export const VaporTransition: FunctionalVaporComponent = /*@__PURE__*/ decorate(
         const resolvedAttrs = extend({}, attrs)
         const child = findTransitionBlock(children)
         if (child) {
+          // mark single root
+          ;(child as any).$root = true
+
           applyFallthroughProps(child, resolvedAttrs)
           // ensure fallthrough attrs are not happened again in
           // applyTransitionHooks