Browse Source

carousel autoplay新增'always'支持

pull/1049/head
sunxiaobin89 2 years ago
parent
commit
37b4c404ea
  1. 2
      src/modules/carousel.js

2
src/modules/carousel.js

@ -292,8 +292,10 @@ layui.define('jquery', function(exports){
//移入移出容器 //移入移出容器
options.elem.on('mouseenter', function(){ options.elem.on('mouseenter', function(){
if (that.config.autoplay === 'always') return;
clearInterval(that.timer); clearInterval(that.timer);
}).on('mouseleave', function(){ }).on('mouseleave', function(){
if (that.config.autoplay === 'always') return;
that.autoplay(); that.autoplay();
}); });

Loading…
Cancel
Save