소스 검색

feat(compiler): compile suspense children as slots (#419)

Dmitry Sharshakov 6 년 전
부모
커밋
4b9483fd5e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/compiler-core/src/transforms/transformElement.ts

+ 1 - 1
packages/compiler-core/src/transforms/transformElement.ts

@@ -120,7 +120,7 @@ export const transformElement: NodeTransform = (node, context) => {
       if (!hasProps) {
         args.push(`null`)
       }
-      if (isComponent) {
+      if (isComponent || node.tagType === ElementTypes.SUSPENSE) {
         const { slots, hasDynamicSlots } = buildSlots(node, context)
         args.push(slots)
         if (hasDynamicSlots) {