修复 table `reload` 表格的中对 `cols` 发生变化的时候表头出错问题

pull/1247/head
sunxiaobin89 2023-04-28 18:05:32 +08:00
parent 832ce1d3ad
commit ab16f47dd1
1 changed files with 8 additions and 1 deletions

View File

@ -872,7 +872,14 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
// 对参数进行深度或浅扩展 // 对参数进行深度或浅扩展
that.config = $.extend(deep, {}, that.config, options); that.config = $.extend(deep, {}, that.config, options);
if (type !== 'reloadData') {
layui.each(that.config.cols, function (i1, item1) {
layui.each(item1, function (i2, item2) {
delete item2.colspan2;
})
})
delete that.config.HAS_SET_COLS_PATCH;
}
// 执行渲染 // 执行渲染
that.render(type); that.render(type);
}; };