layui.use('carousel', function() {
var carousel = layui.carousel;
var ins = carousel.render({
elem: '#test1',
width: '100%', //設置容器寬度
height: '100%',
arrow: 'always', //始終顯示箭頭
//,anim: 'updown' //切換動畫方式
autoplay: false
});
//重置輪播
ins.reload({
elem: '#test1',
width: '100%', //設置容器寬度
height: '100%',
arrow: 'always', //始終顯示箭頭
//,anim: 'updown' //切換動畫方式
autoplay: false
});
});
需要在最后重置一下輪播
