陈剑华

fix: 16813 精选评论卡,点击点赞按钮没有反应;爱心和android 展示不一致

... ... @@ -30,6 +30,7 @@ const TAG = 'Zh_Single_Row-06'
@Component
export struct ZhSingleRow06 {
@State compDTO: CompDTO = {} as CompDTO
@State likeBl: boolean = false;
build() {
Column() {
... ... @@ -81,7 +82,7 @@ export struct ZhSingleRow06 {
.fontColor(0x999999)
Row(){
Image($r('app.media.icon_like_no'))
Image(this.likeBl ? $r('app.media.icon_like_select') : $r('app.media.icon_like'))
.width(16)
.height(16)
.margin({right: 3})
... ... @@ -90,6 +91,13 @@ export struct ZhSingleRow06 {
.fontSize(14)
.fontColor(0x999999)
}
.onClick(() => {
if (this.likeBl) {
this.likeBl = false;
} else {
this.likeBl = true;
}
})
}
.justifyContent(FlexAlign.SpaceBetween)
.width('100%')
... ...