mirror of https://github.com/layui/layui
优化 table 鼠标在固定列滚轮时无法触发滚动条的问题
parent
2e27604e15
commit
226e2ea060
|
@ -2604,6 +2604,15 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
|
|||
|
||||
layer.close(that.tipsIndex);
|
||||
});
|
||||
|
||||
// 固定列滚轮事件 - 临时兼容方案
|
||||
that.layFixed.find(ELEM_BODY).on('mousewheel DOMMouseScroll', function(e) {
|
||||
var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;
|
||||
var scrollTop = that.layMain.scrollTop();
|
||||
var step = 30;
|
||||
|
||||
that.layMain.scrollTop(scrollTop + (delta > 0 ? -step : step));
|
||||
});
|
||||
};
|
||||
|
||||
// 全局事件
|
||||
|
|
Loading…
Reference in New Issue