错误原因
-
写了多个root节点,这个情况很常见
-
第二种原因就奇葩一些,root元素使用html保留的关键字。比如 frame。解决方法就是避开html关键字,或者改为大写
Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instea

错误原因
写了多个root节点,这个情况很常见
第二种原因就奇葩一些,root元素使用html保留的关键字。比如 frame。解决方法就是避开html关键字,或者改为大写
Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instea
本文标题:Vue单文件组件提示错误:Component template
本文链接:https://www.haomeiwen.com/subject/gdejhktx.html
网友评论