修复 table 复杂表头部分字段 hide 在数据异常的情况下出现表头错位的问题

This commit is contained in:
sunxiaobin89 2023-06-12 22:50:28 +08:00
parent 29543f04b3
commit 1b57e28a97

View File

@ -919,6 +919,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
Class.prototype.pullData = function(curr, opts){
var that = this;
var options = that.config;
// 同步表头父列的相关值
options.HAS_SET_COLS_PATCH || that.setColsPatch();
options.HAS_SET_COLS_PATCH = true;
var request = options.request;
var response = options.response;
var sort = function(){
@ -1229,10 +1232,6 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
// 渲染视图
var render = function(){ // 后续性能提升的重点
// 同步表头父列的相关值
options.HAS_SET_COLS_PATCH || that.setColsPatch();
options.HAS_SET_COLS_PATCH = true;
if(!sort && that.sortKey){
return that.sort({
field: that.sortKey.field,