一般的写入样式直接换行,如果所有表格都要改成换行,建议放到admin.css全局
.layui-table-cell {/*全局*/
height:auto;
min-height: 20px;
overflow:visible;
text-overflow:inherit;
white-space:normal;
word-break: break-all;
}
表格有固定列的会错位
往js加入bindHeight()方法,done时调用
table.render({
elem: '#test',
height: getTableHgt(),
url: ...,
cols: [[{
type: 'numbers',
fixed: 'left'
}, {
width: 100,
fixed: 'left',
title: '收费编码',
templet:function(row){
return 'C' + row.chargeItemId;
}
}, {
field: 'validFlag',
title: '是否有效',
templet: '#validFlagTpl',
width: 80,
unr