<el-table-column
prop="pushContent"
label="挂号短信内容"
min-width="10%"
>
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<p style="max-width:600px;">{{ scope.row.pushContent }}</p>
<div slot="reference" class="name-wrapper">
{{ scope.row.pushContent | ellipsis(30) }}
</div>
</el-popover>
</template>
</el-table-column>
//vue script
//表格数据过滤
ellipsis(value, limit) {
if (!value) return "/";
else if (value.length > limit) {
return value.slice(0, limit) + "...";
} else {
return value;
}
},
},
根据自己的需求改下prop值应该就可以了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)