Vue报错:[Vue warn]: Error compiling template:
Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
错误原因:template里面只能一个根元素
下面这种是正确的
我是父组件
给出错误示例:
我是父组件
这种也是正确的。只能包含一个根元素
我是父组件


![[Vue warn]: Error compiling template: Component template should contain exactly one root element. [Vue warn]: Error compiling template: Component template should contain exactly one root element.](http://www.mshxw.com/aiimages/31/999797.png)
