Skip to content

Commit

Permalink
revert: layui#1773
Browse files Browse the repository at this point in the history
1. fix layui#2020
  • Loading branch information
Sight-wcg committed Jun 18, 2024
1 parent 249d6db commit de8c7ce
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/modules/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
that.renderStyle();

// 生成替代元素
if(hasRender[0]){
that.resizeObserver && that.resizeObserver.unobserve(that.elem[0]);
hasRender.remove(); // 如果已经渲染,则 Rerender
}
hasRender[0] && hasRender.remove(); // 如果已经渲染,则 Rerender
othis.after(reElem);

// 各级容器
Expand Down Expand Up @@ -2753,15 +2750,6 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
e.preventDefault();
that.layMain.scrollTop(scrollTop + (delta > 0 ? -step : step));
});

if(window.ResizeObserver){
if(!that.resizeObserver){
that.resizeObserver = new ResizeObserver(function(){
table.resize(that.key);
});
}
that.resizeObserver.observe(that.elem[0]);
}
};

// 全局事件
Expand Down

0 comments on commit de8c7ce

Please sign in to comment.