diff --git a/src/compilers/anode-compiler.ts b/src/compilers/anode-compiler.ts index 1ad01bdb..b9afc115 100644 --- a/src/compilers/anode-compiler.ts +++ b/src/compilers/anode-compiler.ts @@ -38,7 +38,12 @@ export class ANodeCompiler { if (TypeGuards.isAForNode(aNode)) return this.compileFor(aNode) if (TypeGuards.isASlotNode(aNode)) return this.compileSlot(aNode) if (TypeGuards.isATemplateNode(aNode)) return this.compileTemplate(aNode) - if (TypeGuards.isAFragmentNode(aNode)) return this.compileFragment(aNode) + if (TypeGuards.isAFragmentNode(aNode)) { + if (isRootElement) { + console.warn('根元素为 不支持反解') + } + return this.compileFragment(aNode) + } const childComponentReference = this.generateRef(aNode) if (childComponentReference) {