优化 util.on()
在特殊情况下的用法问题
Closes: https://gitee.com/layui/layui/issues/I8M528
This commit is contained in:
parent
a03b4d6c24
commit
3b781390fe
@ -427,7 +427,7 @@ layui.define('jquery', function(exports){
|
|||||||
var callbacks = dataCache.callbacks;
|
var callbacks = dataCache.callbacks;
|
||||||
|
|
||||||
// 根据 attr 记录事件集合
|
// 根据 attr 记录事件集合
|
||||||
events = $.extend(true, dataCache.events, events) || {};
|
events = dataCache.events[attr] = $.extend(true, dataCache.events[attr], events);
|
||||||
|
|
||||||
// 清除事件委托,避免重复绑定
|
// 清除事件委托,避免重复绑定
|
||||||
elem.off(options.trigger, attrSelector, callbacks[attr]);
|
elem.off(options.trigger, attrSelector, callbacks[attr]);
|
||||||
|
Loading…
Reference in New Issue
Block a user