layui table 表格高度動態調整

減掉頂部塊的高度css

function changeHeight() {
      var fromHeight = $(".xxx")[0]
        ? $(".xxx")[0].scrollHeight
        : 0;
      var top = fromHeight + 183 + "px";
      $(".layui-table-body").css({
        height: "calc(100vh - " + top + ")",
      });
}
相關文章
相關標籤/搜索