赞
踩
- <el-table-column prop="user_info" label="用户信息" width="120">
- <template slot-scope="scope">
- <span
- :title="scope.row.user_info"
- style="
- display: -webkit-box;
- text-overflow: ellipsis;
- overflow: hidden;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- white-space: pre-line;
- "
- >
- {{ scope.row.user_info}}
- </span>
- </template>
- </el-table-column>
- <el-table :data="tableData" tooltip-effect="light">
- <el-table-column prop="user_info" label="用户信息" width="120" :show-overflow-tooltip="true"></el-table-column>
- </el-table>
- <el-table-column prop="user_info" label="用户信息">
- <template slot-scope="scope">
- <el-popover trigger="hover" placement="top">
- <span>{{ scope.row.user_info }}</span>
- <div slot="reference">
- <span style="
- display: -webkit-box;;
- text-overflow: ellipsis;
- overflow: hidden;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- white-space: pre-line;
- ">
- {{ scope.row.user_info }}
- </span>
- </div>
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column prop="user_info" label="用户信息">
- <template slot-scope="scope">
- <el-tooltip :content="scope.row.user_info" placement="top" effect="light">
- <span style="
- display: -webkit-box;;
- text-overflow: ellipsis;
- overflow: hidden;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- white-space: pre-line;
- ">
- {{ scope.row.user_info }}
- </span>
- </el-tooltip>
- </template>
- </el-table-column>
1、可以在点击单元格的时候,展开全部内容;可以在省略文字和全部文字之间切换;
2、可以先对内容长度进行判断,然后对超出的显示内容进行截取操作,点击显示全部;
3、通过动态类名的方式实现;
4、。。。此处省略 1 万字;
5、感谢!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。