vue.runtime.esm.js?2b0e:619 [Vue warn]: Duplicate keys detected: ‘tab-item’. This may cause an update error.

<el-tabs v-model="activeName" @tab-click="handleClick">     
  <el-tab-pane v-for="(item,index) in recentTags" :key="'recent' + index" label="item" name="item">{{item}}</el-tab-pane>
</el-tabs>

问题解决

<el-tabs v-model="activeName" @tab-click="handleClick">     
  <el-tab-pane v-for="(item,index) in recentTags" :key="'recent' + index" :label="item" :name="item">{{item}}</el-tab-pane>
</el-tabs>

…好无语啊

Logo

前往低代码交流专区

更多推荐