wangyong_wd

fix:优化轮播图点击事件;标题加上corner字段

... ... @@ -141,8 +141,10 @@ export struct ZhCarouselLayout01 {
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
// .backgroundColor($r('app.color.white'))
.onClick((event: ClickEvent) => {
Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.swiperIndex}`);
ProcessUtils.processPage(this.compDTO.operDataList[this.swiperIndex])
})
} else {
EmptyComponent({ emptyHeight: 200 })
}
... ... @@ -173,7 +175,7 @@ struct CarouselLayout01CardView {
colors: [[0x7508111A, 0.0], [0x7508111A, 0.3], [Color.Transparent, 1.0]]
})
// 文本信息
Text(`${this.item.newsTitle}`)
Text(`${this.item.corner}${this.item.newsTitle}`)
.width(CommonConstants.FULL_PARENT)
.height(39)
.padding({
... ... @@ -195,10 +197,6 @@ struct CarouselLayout01CardView {
.aspectRatio(CompUtils.ASPECT_RATIO_2_1)
.alignContent(Alignment.BottomStart)
.hoverEffect(HoverEffect.Scale)
.onClick((event: ClickEvent) => {
Logger.info(TAG, `ZhCarouselLayout01 onClick event index: ${this.index}`);
ProcessUtils.processPage(this.item)
})
}
}
... ...