前言
环境:element-ui、vue2
在表格中的某一列的内容上鼠标悬浮后增加文字提示。
前端代码
使用插槽即可。
<el-table-column label="单位名称" align="center" min-width="100">
<template v-slot="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.boOrgName" placement="top">
<span>{{scope.row.boSimpleName}}</span>
</el-tooltip>
</template>
</el-table-column>
总结
这里就不在做演示。