若依表格中单元格内容过长显示处理方法?

绪风

关注

阅读 95

2022-07-18


1、使用系统自带的方法格式化处理

{
field: 'remark',
title: '备注',
align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},

2、添加css控制

.select-table table {
table-layout:fixed;
}

.select-table .table td {
/* 超出部分隐藏 */
overflow:hidden;
/* 超出部分显示省略号 */
text-overflow:ellipsis;
/*规定段落中的文本不进行换行 */
white-space:nowrap;
/* 配合宽度来使用 */
height:40px;
}

精彩评论(0)

0 0 举报