Showing
1 changed file
with
5 additions
and
7 deletions
| @@ -141,8 +141,10 @@ export struct ZhCarouselLayout01 { | @@ -141,8 +141,10 @@ export struct ZhCarouselLayout01 { | ||
| 141 | top: $r('app.float.card_comp_pagePadding_tb'), | 141 | top: $r('app.float.card_comp_pagePadding_tb'), |
| 142 | bottom: $r('app.float.card_comp_pagePadding_tb') | 142 | bottom: $r('app.float.card_comp_pagePadding_tb') |
| 143 | }) | 143 | }) |
| 144 | - | ||
| 145 | - // .backgroundColor($r('app.color.white')) | 144 | + .onClick((event: ClickEvent) => { |
| 145 | + Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`); | ||
| 146 | + ProcessUtils.processPage(this.compDTO.operDataList[this.swiperIndex]) | ||
| 147 | + }) | ||
| 146 | } else { | 148 | } else { |
| 147 | EmptyComponent({ emptyHeight: 200 }) | 149 | EmptyComponent({ emptyHeight: 200 }) |
| 148 | } | 150 | } |
| @@ -173,7 +175,7 @@ struct CarouselLayout01CardView { | @@ -173,7 +175,7 @@ struct CarouselLayout01CardView { | ||
| 173 | colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]] | 175 | colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]] |
| 174 | }) | 176 | }) |
| 175 | // 文本信息 | 177 | // 文本信息 |
| 176 | - Text(`${this.item.newsTitle}`) | 178 | + Text(`${this.item.corner}${this.item.newsTitle}`) |
| 177 | .width(CommonConstants.FULL_PARENT) | 179 | .width(CommonConstants.FULL_PARENT) |
| 178 | .height(39) | 180 | .height(39) |
| 179 | .padding({ | 181 | .padding({ |
| @@ -195,10 +197,6 @@ struct CarouselLayout01CardView { | @@ -195,10 +197,6 @@ struct CarouselLayout01CardView { | ||
| 195 | .aspectRatio(CompUtils.ASPECT_RATIO_2_1) | 197 | .aspectRatio(CompUtils.ASPECT_RATIO_2_1) |
| 196 | .alignContent(Alignment.BottomStart) | 198 | .alignContent(Alignment.BottomStart) |
| 197 | .hoverEffect(HoverEffect.Scale) | 199 | .hoverEffect(HoverEffect.Scale) |
| 198 | - .onClick((event: ClickEvent) => { | ||
| 199 | - Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.index}`); | ||
| 200 | - ProcessUtils.processPage(this.item) | ||
| 201 | - }) | ||
| 202 | } | 200 | } |
| 203 | } | 201 | } |
| 204 | 202 |
-
Please register or login to post a comment