Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-07-17 14:17:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c922ab409e0a7f72163c7bd78bd5829ade0d4e3b
c922ab40
1 parent
4ce1feaa
fix:功能缺陷-【uat】进入视频直播-肌少症--小心跌倒,点击评论按钮,进入全部评论,底部点赞图标显示和android不一致,看图
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
23 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
View file @
c922ab4
...
...
@@ -58,6 +58,7 @@ export struct LikeComponent {
this.openLikes = this.contentDetailData.openLikes == 1 ? true : false
}
console.log(TAG, 'this.contentDetailData', JSON.stringify(this.contentDetailData))
console.log(TAG, 'this.componentType', this.componentType)
console.log(TAG, 'this.likesStyle', this.likesStyle)
console.log(TAG, 'this.openLikes', this.openLikes)
this.onDataUpdated()
...
...
@@ -93,7 +94,7 @@ export struct LikeComponent {
//卡片底部互动样式
this.likeCompStyle3()
} else if (this.componentType == 4) {
//
直播,点赞按钮底测有灰色圆角背景+右上点赞数量
//
使用包括频道视频底部点赞
this.likeCompStyle4()
} else if (this.componentType == 5) {
// 图集点赞,展示标识
...
...
@@ -286,38 +287,57 @@ export struct LikeComponent {
@Builder
likeCompStyle4() {
Stack({ alignContent: Alignment.Bottom }) {
Column() {
Stack({ alignContent: Alignment.TopEnd }) {
Image(this.transLikeStyle().url)
.width(24)
.height(24)
.onClick(() => {
this.clickButtonEvent()
})
}
.justifyContent(FlexAlign.Center)
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5')
Row() {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
if (this.likeCount != 0) {
RelativeContainer() {
Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select'))
.objectFit(ImageFit.Fill)
.resizable({
slice: {
top: 1,
left: 20,
right: 1,
bottom: 1
}
})
.alignRules({
top: { anchor: "Text", align: VerticalAlign.Top },
left: { anchor: "Text", align: HorizontalAlign.Start },
right: { anchor: "Text", align: HorizontalAlign.End },
bottom: { anchor: "Text", align: VerticalAlign.Bottom },
})
.id("Image")
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))// Text("44444444")
.fontSize(8)
.fontColor(Color.White)
.padding({ left: 8, right: 2 })
}
.height(12)
.alignItems(VerticalAlign.Center)
.position({ x: '100%', y: 10 })
.markAnchor({ x: '100%' })
.backgroundImage($r('app.media.ic_like_back'))
.backgroundImageSize({height: 13})
.textAlign(TextAlign.Center)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
/*动态计算文字宽度*/
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)
8)
.padding({left:2})
.id("Text")
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.width(36)
.height(42)
.offset({
x: 12
})
}
}
.width(24)
.height(24)
.onClick(() => {
this.clickButtonEvent()
})
.visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
}
...
...
Please
register
or
login
to post a comment