The swiper carousel component is introduced into vue-cli. When the carousel is turned on, the first picture always flashes by.

I am a globally introduced swiper component, which is normal before auto-rotation is enabled, but after it is enabled. I found a mistake. It"s normal until the last one, but when it comes to the last one, it seems to take a little longer, and then the first one flashes by and suddenly jumps to the second one. The screenshot of
code is as follows:

there is no other code. I have been doing it for almost a day, and there is also a problem with the iview rotation used before, but now there is a problem again. If there are other good vue carousel components recommended, trouble boss.


is the data obtained by the back-end interface ajax?

try
this.$nextTick (() = > {

after getting the data
swiper.init() // swiper

})


setTimeout (function () {

              var mySwiper = $('-sharpswiper1').swiper({
            loop: true,
            autoplay: 4000, //ms        
            speed: 500, //:ms        
            autoplayDisableOnInteraction: false, //true        
            observer: true, //swiperswiper        
            observeParents: true, //swiperswiper        
    });
               },500);

package
with a delay timer or put the js initializing swiper after the code that dynamically loads the picture

Menu