<el-tabs v-model="defaultData.activeName" :tab-position="defaultData.tabPosition">
<el-tab-pane v-for="testPaperChapter in defaultData.testBankList" :key="testPaperChapter.id" :name="testPaperChapter.id">
<template #label>
<el-tooltip class="item" effect="light" :content="testPaperChapter.testBankName" placement="right">
<div class="tooltip-div">{{testPaperChapter.testBankName.length > 6 ?testPaperChapter.testBankName.slice(0, 6) + '....' : testPaperChapter.testBankName }}</div>
</el-tooltip>
</template>
</el-tab-pane>
</el-tabs>
注:Vue3 插槽 使用方法从slot="label" 变为 #label