【Vue】Component template should contain exactly one root element.
问题: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链他...
·
问题:
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模板只支持一个元素,不能并列包含两个及以上。
解决:
更多推荐
已为社区贡献1条内容
所有评论(0)