From af792a8452df4e3b0be40ad2760177ce6bbc8369 Mon Sep 17 00:00:00 2001 From: morning-star <26325820+Sight-wcg@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:31:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(form-select):=20=E4=BF=AE=E5=A4=8D=20`lay-a?= =?UTF-8?q?ppend-to`=20=E5=B1=9E=E6=80=A7=E5=BC=80=E5=90=AF=E6=97=B6?= =?UTF-8?q?=E5=9C=A8=20dropdown=20=E4=B8=AD=E7=82=B9=E5=87=BB=20select=20?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=AF=BC=E8=87=B4=20dropdown=20=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E8=A2=AB=E5=85=B3=E9=97=AD=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#2138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(form-select): 开启 `lay-append-to` 时,在 dropdown 中点击 select 面板,会导致 dropdown 面板意外关闭 * update --- src/modules/form.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/form.js b/src/modules/form.js index 75ec033a..aa1403fd 100644 --- a/src/modules/form.js +++ b/src/modules/form.js @@ -745,6 +745,11 @@ layui.define(['lay', 'layer', 'util'], function(exports){ hideDown(true); return false; }); + + // 用于开启 lay-append-to 时兼容 dropdown + dl.on('mousedown pointerdown touchstart', function(e){ + return false; + }) reElem.find('dl>dt').on('click', function(e){ return false;