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.

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.

组件模板精确到包含一个root,如果有多个要加判断语句

错误:

 

 

 

 


 

 

vue.js:634 [Vue warn]: Error compiling template:

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.

1  |  <div>关于我们</div><div>更多关于我们</div>
   |                 ^^^^^^^^^^^^^^^^^

found in

---> <Anonymous>
       <Root>

posted @ 2020-09-02 11:04  码哥之旅  阅读(541)  评论(0编辑  收藏  举报