vue所遇问题If you are using v-if on multiple elements, use v-else-if to chain them instead.解决办法
错误提示: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模板只能有一个根对象所以用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模板只能有一个根对象
所以用div或者别的标签包裹住所有标签就好了。
更多推荐
已为社区贡献6条内容
所有评论(0)