Merge pull request #1043 from hotlcc/feature/develop-table-cell-multiline-open

table单元格存在多行文本时支持点击“...”展开
This commit is contained in:
贤心 2022-06-20 19:25:40 +08:00 committed by GitHub
commit a1214cb4e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1727,7 +1727,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
if(hide){
othis.find('.layui-table-grid-down').remove();
} else if(elemCell.prop('scrollWidth') > elemCell.outerWidth()){
} else if(elemCell.prop('scrollWidth') > elemCell.outerWidth() || elemCell.find("br").size() > 0){
if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return;
othis.append('<div class="'+ ELEM_GRID_DOWN +'"><i class="layui-icon layui-icon-down"></i></div>');
}