// 滚动条
fixTableScroller: function() {
let tableH = $(".master-table-container").height(); // table高度
let winH = $(window).height(); // 浏览器高度
let ol = 0; // table左边距
let wTop = 0; // 滚动条top
$("#scroll-container").css({ // 悬浮scroll宽度
width: ($(".master-table-container").width()) + "px"
});
if ($(".master-table").width() >$(".master-table-container").width()) {
if ($(window).scrollLeft() == 0) {
ol = $(".right").offset().left;
} else {
ol = $(".right").offset().left - $(window).scrollLeft();
}
// 悬浮scroll距离左边的left值
$("#scroll-container").css({
left: (ol+20) + "px",
display: "block"
});
$(".master-scroller-content, .master-batch-operate").css({
width: $(".master-table").width
滚动条悬浮(可以优化)
最新推荐文章于 2024-05-29 16:35:43 发布