From 5065153b867ba50a7c1bf9db8e64ae57a53c9a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 14 Oct 2023 16:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20nav=20=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=B1=95=E5=BC=80=E6=94=B6=E7=BC=A9=E7=9A=84?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/element.js b/src/modules/element.js index 27efb098..1c7ba291 100644 --- a/src/modules/element.js +++ b/src/modules/element.js @@ -298,7 +298,7 @@ layui.define('jquery', function(exports){ // 若有子菜单,则展开 if(child[0]){ - child.slideToggle(200, function() { + child.stop().slideToggle(200, function() { isNone || parent.removeClass(NAV_ITEMED); }); parent[isNone ? 'addClass': 'removeClass'](NAV_EXPAND); @@ -308,7 +308,7 @@ layui.define('jquery', function(exports){ parent.siblings().removeClass([ NAV_ITEMED, NAV_EXPAND - ].join(' ')).children('.'+NAV_CHILD).slideUp(200); + ].join(' ')).children('.'+NAV_CHILD).stop().slideUp(200); } } }