layui 轮播图动态数据不显示问题

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

需要在最后重置一下轮播

posted @ 2018-12-18 17:59  abcByme  阅读(4819)  评论(0编辑  收藏  举报