layui table中固定表頭,彈框縮放之後,表頭對不齊問題

  • 2020 年 11 月 4 日
  • 筆記

新手一枚  直接上解決方案

在layui彈出成功後再渲染表格數據

具體操作就是在layer彈層完成之後的回調中渲染表格數據

layer.open({

  type: 1,

  content:  $(“id”),

  success: function(layero, index){

    table.render({

      //一些程式碼

    })

  }

})