阅读:3556回复:0
vue element 用 el-popover 实现 列表最多展示10个字,超出省略号;悬停展示所有数据
<template slot-scope="scope">
<el-popover placement="top-start" width="300" trigger="hover" :disabled="scope.row.address.length <= 10" > <div>pw_ scope.row.address </div> <span slot="reference" v-if="scope.row.address.length <= 10">pw_scope.row.address</span> <span slot="reference" v-if="scope.row.address.length > 10">pw_scope.row.address.substr(0, 10) + "..."</span> </el-popover> </template> ———————— ———————— 版权声明:本文为CSDN博主「前端小菜鸡009」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/weixin_49286754/article/details/117740755 |
|