Browse Source

revert: 恢复 #1773 的变更,以避免设置自动宽度的列被拖拽时的异常问题 (#2169)

revert #1773
pull/2171/head
morning-star 3 months ago committed by GitHub
parent
commit
b4fe5f7101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      src/modules/table.js

13
src/modules/table.js

@ -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);
// 各级容器
@ -2791,14 +2788,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]);
}
};
// 全局事件

Loading…
Cancel
Save