Does the vue component template have only one root element that still reports an error?

`[Vue warn]: Error compiling template:

<div class="tabs">      <div class="tabs-bar">        <div          :class="tabCls(item)"          v-for="(item, index) in navList"          @click="handleChange(index)"          {{ item.label }}        </div>      </div>      <div class="tabs-content">        <slot></slot>      </div>    </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.

report this error. The template is obviously on the root element < div class= "tabs" >

.
\
        <slot></slot>\
      </div>\
    </div>",
Mar.06,2021

is missing a parenthesis:
clipboard.png

Menu