mirror of https://github.com/layui/layui
优化 `table.reload()` 造成 `window resize` 事件重复绑定的问题
parent
fe735b84df
commit
ef1b952068
|
@ -2494,15 +2494,17 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
||||||
|
|
||||||
layer.close(that.tipsIndex);
|
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.on('click', function(){
|
||||||
_DOC.trigger('table.remove.tool.panel');
|
_DOC.trigger('table.remove.tool.panel');
|
||||||
|
|
Loading…
Reference in New Issue