首页 > 解决方案 > 在循环中使用时,Angular Swiper 在 Ionic 5 中重叠

问题描述

我在 Ionic 5 项目中使用 Angular Swiper。

我在水平的刷卡器中显示固定数量的离子卡,并且在一个循环中有多个垂直刷卡器。

<ng-container *ngFor="let item of List; let i = index;">
  <swiper autoHeight=true>
     <ng-template swiperSlide>
       <ion-card></ion-card>
       <ion-card></ion-card>
     </ng-template>
  </swiper>
</ng-container>

当卡片内容动态更新时,所有垂直滑动条都会重叠。 在此处输入图像描述

标签: angularionic-frameworkionic5swiper.js

解决方案


推荐阅读