优化 `table.reload()` 造成 `window resize` 事件重复绑定的问题

pull/1321/head
贤心 2023-08-10 12:50:24 +08:00
parent fe735b84df
commit ef1b952068
1 changed files with 11 additions and 9 deletions

View File

@ -2494,15 +2494,17 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
layer.close(that.tipsIndex);
});
// 适应
_WIN.on('resize', function(){
that.resize();
});
};
//一次性事件
;(function(){
// 全局事件
(function(){
// 自适应尺寸
_WIN.on('resize', function(){
layui.each(thisTable.that, function(){
this.resize();
});
});
// 全局点击
_DOC.on('click', function(){
_DOC.trigger('table.remove.tool.panel');