1.首先在页面顶部加入该样式
.layui-table-cell {
height: auto;
word-break: normal;
display: block;
white-space: pre-wrap;
word-wrap: break-word;
overflow: hidden;
padding:0 10px !important;
}
如果我们使用了 checkbox:true,fixed:‘right’ 固定列 就会导致 固定列的行高和table其他列的行高不一致,结果如下:
解决方案:
table.reload(‘pageList’, {
url: “url”,
where: config,
parseData: function (res) {
return {
“code”: res.result.code, //解析接口状态
“msg”: res.result.msg, //解析提示文本
“count”: res.result.count, //解析数据长度
“data”: res.result.data //解析数据列表
};
},
response: {
statusCode: 200 //规定成功的状态码,默认: