Excuse me, how does loopedSlides automatically get the total number of slide in Swiper?

when Swiper is used to do rowing pictures at work, but the total amount of rotated pictures is not fixed, so loopedSlides cannot write a fixed value.
so, how to make loopedSlides get the total number of slide automatically?
at present, I am using a stupid method (although I meet the requirements, but I always feel that it is not ideal) as follows:

loop: true;
slidesPerview: "auto";
loopedSlides:document.querySelectorAll(".swiper-slide");

Thank you for your answer, thank you very much!

Jan.23,2022

swiper.slides.length

document address: https://www.swiper.com.cn/api.


loopedSlides: document.querySelectorAll ('.swiper-slide'). Length

Menu