<el-table-column label="名称" align="center" key="userId" prop="title" v-if="columns[0].visible">
<template slot-scope="scope">
<el-tooltip v-if="scope.row.title" :content="scope.row.title" raw-content placement="top-start">
<a v-if="scope.row.title && scope.row.title.length <= 7" @click="detail(scope.row)" class="p-link">{{ scope.row.title }}</a>
<a v-if="scope.row.title && scope.row.title.length > 7" @click="detail(scope.row)" class="p-link">{{ scope.row.title.substr(0, 7) + "..." }}</a>
</el-tooltip>
</template>
</el-table-column>
vue+elementUI 超长文本省略显示,多余文字鼠标移入时显示全部
最新推荐文章于 2024-06-17 10:39:14 发布