
private swiperController: SwiperController = new SwiperController()
Swiper(this.swiperController) {
ForEach(this.list, (item: Resource, index) => {
RelativeContainer() {
Image(item)
.width('100%')
.draggable(false)
}
.width('100%')
.height('100%')
})
}
.index($$this.currentIndex)
.loop(this.isLoop)
.autoPlay(this.isAutoPlay)
.interval(5000)
.indicator(false)
.vertical(false)
.displayCount(2)
.effectMode(EdgeEffect.None)
.backgroundColor(0x00ffff)
.width('100%')
.height('100%')
.onGestureSwipe((index, e) => {
console.debug(`swiper onGestureSwipe index:${index} e:${e} `);
})
.onContentDidScroll((selectedIndex: number, index: number, position: number, mainAxisLength: number) => {
console.debug(`swiper selectedIndex:${selectedIndex} index:${index} position:${position} mainAxisLength:${mainAxisLength}`);
})原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。