如下代码,给Swiper设置圆角后,如何让子组件的Image也显示圆角?
Swiper(){
ForEach(this.bannerList, (banner: NewsBannerContentlist, index: number) =>{
Image(this.getImgUrl(banner.conentimg)).width('100%').height('100%')
})
}.width(this.deviceWidth - CommonConstants.MARGIN_LEFT - CommonConstants.MARGIN_RIGHT)
.height((this.deviceWidth - CommonConstants.MARGIN_LEFT - CommonConstants.MARGIN_RIGHT) * 152 / 359)
.margin({
left: CommonConstants.MARGIN_LEFT,
right: CommonConstants.MARGIN_RIGHT
})
.clip(true)
.backgroundColor(Color.White)
.borderRadius(8)
.padding(2)
.indicator(
Indicator.dot()
.right(0)
.itemWidth(6)
.itemHeight(6)
.selectedItemWidth(12)
.selectedItemHeight(6)
.color($r('app.color.color99FFFFFF'))
.selectedColor(Color.White)
)
.loop(true)
.autoPlay(true)
.interval(5000)
子组件Image要再设置: