Showing
1 changed file
with
4 additions
and
1 deletions
| @@ -91,7 +91,8 @@ export struct ZhCarouselLayout01 { | @@ -91,7 +91,8 @@ export struct ZhCarouselLayout01 { | ||
| 91 | ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => { | 91 | ForEach(this.compDTO?.operDataList, (item: ContentDTO, index: number) => { |
| 92 | CarouselLayout01CardView({ | 92 | CarouselLayout01CardView({ |
| 93 | item: item, | 93 | item: item, |
| 94 | - length: this.compDTO.operDataList.length | 94 | + length: this.compDTO.operDataList.length, |
| 95 | + showPicBorderRadius: this.compDTO.operDataList.length == 1 | ||
| 95 | }) | 96 | }) |
| 96 | .onClick((event: ClickEvent) => { | 97 | .onClick((event: ClickEvent) => { |
| 97 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 98 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| @@ -188,6 +189,7 @@ struct CarouselLayout01CardView { | @@ -188,6 +189,7 @@ struct CarouselLayout01CardView { | ||
| 188 | @State loadImg: boolean = false; | 189 | @State loadImg: boolean = false; |
| 189 | private item: ContentDTO = new ContentDTO(); | 190 | private item: ContentDTO = new ContentDTO(); |
| 190 | private length: number = 1; // 轮播图数量 | 191 | private length: number = 1; // 轮播图数量 |
| 192 | + private showPicBorderRadius: boolean = false; | ||
| 191 | 193 | ||
| 192 | async aboutToAppear(): Promise<void> { | 194 | async aboutToAppear(): Promise<void> { |
| 193 | this.loadImg = await onlyWifiLoadImg(); | 195 | this.loadImg = await onlyWifiLoadImg(); |
| @@ -200,6 +202,7 @@ struct CarouselLayout01CardView { | @@ -200,6 +202,7 @@ struct CarouselLayout01CardView { | ||
| 200 | .height(CommonConstants.FULL_PARENT) | 202 | .height(CommonConstants.FULL_PARENT) |
| 201 | .objectFit(ImageFit.Cover) | 203 | .objectFit(ImageFit.Cover) |
| 202 | .backgroundColor(0xf5f5f5) | 204 | .backgroundColor(0xf5f5f5) |
| 205 | + .borderRadius(this.showPicBorderRadius ? $r('app.float.image_border_radius') : 0) | ||
| 203 | 206 | ||
| 204 | Row() | 207 | Row() |
| 205 | .width(CommonConstants.FULL_PARENT) | 208 | .width(CommonConstants.FULL_PARENT) |
-
Please register or login to post a comment