Я получил эту ошибку в слайдере swiper, который упоминается на снимке экрана, и слайдер не отображается должным образом в режиме планшета

Я прикрепил снимок экрана, как он сейчас выглядит. Я добавил 4 слайда, но здесь показан только один слайд в режиме планшета [1]: https://stackru.com/images/363f13c11e4b1844e7a38c6aba98d2581c0c5ebf.png[2]: https://stackru.com/images/47cf5d490c12a70f10b543e3d0ed6b6159e1a490.png

slider.ts

public config: SwiperConfigInterface = { observer:true, direction: 'horizontal', threshold: 50, breakpoints: { 320: { slidesPerView: 2.4, spaceBetween: 16, autoHeight: false, }, 480: { slidesPerView: 2.4, spaceBetween: 16, autoHeight: true, }, 640: { slidesPerView: 3.4, spaceBetween: 16, autoHeight: true, }, 800: { slidesPerView: 4.4, spaceBetween: 16, autoHeight: true, centeredSlides: true, }, 992: { slidesPerView: 5.4, spaceBetween: 16, autoHeight: true, centeredSlides: true, }, 1280: { slidesPerView: 5.3, spaceBetween: 16, autoHeight: true, }, }, };

slider.component.html <swiper [config]="config" [index]="selectedGameIndex"> <div *ngFor="let shop of item?.products" class="shops"> <div class="shop-card-content" (click)=" redirectToupOrVoucher(shop?.type, shop?.category) "> <app-shop-card [shop]="shop"></app-shop-card> </div> </div> </swiper>

0 ответов

Другие вопросы по тегам