zhenghy

评论与点赞展示

... ... @@ -190,6 +190,7 @@ export struct CommentIconComponent {
.width(this.getMeasureText(this.publishCommentModel.totalCommentNumer) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.publishCommentModel.totalCommentNumer ? Visibility.Visible : Visibility.Hidden)
// .offset({
// x: 3
// })
... ...
... ... @@ -55,10 +55,10 @@ export struct LikeComponent {
} else if (this.componentType == 4) {
// 直播,点赞按钮底测有灰色圆角背景+右上点赞数量
this.likeCompStyle4()
} else if (this.componentType == 5) {
} else if (this.componentType == 5) {
// 图集点赞,展示标识
this.likeCompStyle5()
}else {
} else {
//1: 底部栏目样式 默认样式
this.likeCompStyle1()
}
... ... @@ -188,7 +188,7 @@ export struct LikeComponent {
.alignItems(VerticalAlign.Center)
.position({ x: '100%', })
.markAnchor({ x: '100%' })
.backgroundImage(this.likeStatus? $r('app.media.ic_like_back_Select'):$r('app.media.ic_like_back'))
.backgroundImage(this.likeStatus ? $r('app.media.ic_like_back_Select') : $r('app.media.ic_like_back'))
.backgroundImageSize(ImageSize.Auto)
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}.width(24).height(24)
... ... @@ -209,7 +209,7 @@ export struct LikeComponent {
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor(this.pageComponentType === 4 ? '#4D000000' : '#FFF5F5F5')
.backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : '#FFF5F5F5')
Row() {
... ...