Vue+element uses horse lanterns to carousel broadcast pictures. The switching style of the two pictures is incorrect.

as the title, there are only two pictures when walking lanterns are. I click on the first picture, click the switch on the right, switch to the second picture (no problem), click on the right again to switch to the first picture (there is a problem! ), the animation effect is right slide on the first switch and left slide on the second switch

Jun.09,2021

normal phenomenon, because your picture list has reached the rightmost. If you move to the right, it will move back to the first one. The phenomenon is the opposite direction of the animation. The
idea is

.
1
2;
3js;

example:

 11233'1231'3'3,1'1; 
 21'js1;
 33'js3;

the effect is to broadcast in the same direction all the time;


if there are only two figures 1 answer 2; you need to insert a copy of the pictures in the array into the array, that is, 1 codeshelper id=0 2; each time in the loop, the next picture is different and the style will not be a problem.

Menu