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(); });