前端VUE框架在使用elemen-ui组件时遇到错误:
template syntax error 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.
大概意思是:模板语法错误组件模板应该正好包含一个根元素,如果你使用的是v-if多元素,使用v-else-if链他们。
查询大量资料总结如下:
错误的原因是vue框架中不允许出现多个模块或控件同时并列出现,此时只要将所有控件包裹在一个<div>中即可!!!