Merge branch '2.x' of github.com:layui/layui into 2.x

pull/1120/head
贤心 2 years ago
commit b0486c1b0a

@ -840,7 +840,6 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-table-hover,
.layui-table-click{background-color: #FAFAFA;}
.layui-table[lay-even] tr:nth-child(even){background-color: #f2f2f2;}
.layui-table th,
.layui-table td,
@ -937,6 +936,7 @@ a cite{font-style: normal; *cursor:pointer;}
.layui-table-body{position: relative; overflow: auto; margin-right: -1px; margin-bottom: -1px;}
.layui-table-body .layui-none{line-height: 26px; padding: 30px 15px; text-align: center; color: #999;}
.layui-table-body .layui-table[lay-even] tr:nth-child(even){background-color: #f2f2f2;}
.layui-table-fixed{position: absolute; left: 0; top: 0; z-index: 101;}
.layui-table-fixed .layui-table-body{overflow: hidden;}
.layui-table-fixed-l{box-shadow: 1px 0 8px rgba(0,0,0,.08);}

@ -790,7 +790,14 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){
}
that.setGroupWidth();
// 如果表格内容为空(无数据 或 请求异常)
if (that.layMain.find('tbody').is(":empty")) {
// 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段
const headerWidth = that.layHeader.first().children('table').width()
that.layMain.find('table').width(headerWidth);
}
that.loading(!0);
};

Loading…
Cancel
Save