Skip to content

Commit

Permalink
fix(table): 修复加载数据时 loading 动画丢失的问题,revert layui#1773
Browse files Browse the repository at this point in the history
REVERT
commit 13b0b42
  • Loading branch information
Sight-wcg committed May 7, 2024
1 parent 7f610ba commit b3d92ac
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/modules/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,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 @@ -2707,14 +2704,6 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
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 b3d92ac

Please sign in to comment.