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.
本是后端,学个vue,比着同事写的vue随便敲了几行代码就报了个错,如下图
原因是vue模板中只能有一个根对象
所以你想要出现正常的效果,你的用一个div来或是别的标签来包裹全部的元素。
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.
本是后端,学个vue,比着同事写的vue随便敲了几行代码就报了个错,如下图
原因是vue模板中只能有一个根对象
所以你想要出现正常的效果,你的用一个div来或是别的标签来包裹全部的元素。