|
求解答
以下是代码部分
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" *ngFor="let item of list;let i =index" (click)="onClick(item,i)" >
<img [src]="item.logoUrl" class="pic" [alt]="item.tenantName"/>
<div class="mask"></div>
<div class="imgName" *ngIf="!item.logoUrl">
<span class=" ellipsis-1 title-font-family">{{item.tenantName}}</span>
</div>
</div>
</div>
</div>
this.publisherSwiper = new Swiper('.swiper-container', {
modules: [Navigation, Pagination, Scrollbar],
//被选中的滑块居中,默认居左
centeredSlides: true,
slideToClickedSlide: true,
spaceBetween: 0,
loop: true,
autoplay: {
//手势滑动后继续保持自动滑动
disableOnInteraction: false,
delay: 3000,
},
speed: 1000,
loopedSlides: 4, // 可见图片张数
slidesPerView: 4, //控制显示的部分
});
|
|