全局样式错位修改
This commit is contained in:
parent
6b7f6e5797
commit
e66a5ecd74
|
|
@ -295,30 +295,3 @@ blockquote {
|
|||
background: #9c9da0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layui-table-fixed .layui-table-body tr,
|
||||
.layui-table-main tr,
|
||||
.layui-table-view .layui-table tr {
|
||||
height: 48px !important;
|
||||
}
|
||||
|
||||
.layui-table td,
|
||||
.layui-table-fixed td {
|
||||
line-height: 48px !important;
|
||||
padding: 0 10px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layui-table td div,
|
||||
.layui-table td span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.splitLine {
|
||||
display: inline-block;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,19 @@ function initTable() {
|
|||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
//动态监听表体高度变化,冻结行跟着改变高度
|
||||
$(".layui-table-body tr").resize(function () {
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
//初始化高度,使得冻结行表体高度一致
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -190,6 +190,19 @@ function initTable() {
|
|||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
//动态监听表体高度变化,冻结行跟着改变高度
|
||||
$(".layui-table-body tr").resize(function () {
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
//初始化高度,使得冻结行表体高度一致
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -239,16 +239,20 @@ function initTable() {
|
|||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
table.resize("currentTableId");
|
||||
|
||||
let trs = document.querySelectorAll(".layui-table-main tr");
|
||||
let fixedTrs = document.querySelectorAll(".layui-table-fixed tr");
|
||||
|
||||
trs.forEach((tr, i) => {
|
||||
if (fixedTrs[i]) {
|
||||
fixedTrs[i].style.height = tr.offsetHeight + "px";
|
||||
}
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
//动态监听表体高度变化,冻结行跟着改变高度
|
||||
$(".layui-table-body tr").resize(function () {
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
//初始化高度,使得冻结行表体高度一致
|
||||
$(".layui-table-body tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||||
});
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue