`[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.报这个错。。模板明明是在 <div class="tabs"> 这一个根元素上的啊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>',
添加回答
举报
0/150
提交
取消