From 226e2ea06019713e410d64fde194aba49ccf19f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20table=20=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E5=9C=A8=E5=9B=BA=E5=AE=9A=E5=88=97=E6=BB=9A=E8=BD=AE=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=A7=A6=E5=8F=91=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/table.js b/src/modules/table.js index eb46c59f..eb4981bf 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -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)); + }); }; // 全局事件