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

This commit is contained in:
Dmitry Sharshakov 2019-11-04 22:35:00 +03:00 committed by Evan You
parent d70497c0d4
commit 4b9483fd5e

View File

@ -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) {