From 37b4c404ea73f1f0fc4395208c870cf1277dbf1e Mon Sep 17 00:00:00 2001 From: sunxiaobin89 <285584806@qq.com> Date: Wed, 22 Jun 2022 11:43:18 +0800 Subject: [PATCH] =?UTF-8?q?carousel=20autoplay=E6=96=B0=E5=A2=9E'always'?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/carousel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/carousel.js b/src/modules/carousel.js index 6d7b29c6..5ada1181 100644 --- a/src/modules/carousel.js +++ b/src/modules/carousel.js @@ -292,8 +292,10 @@ layui.define('jquery', function(exports){ //移入移出容器 options.elem.on('mouseenter', function(){ + if (that.config.autoplay === 'always') return; clearInterval(that.timer); }).on('mouseleave', function(){ + if (that.config.autoplay === 'always') return; that.autoplay(); });