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-05-22 19:39:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3dd9d0695a501ebd5b7bfeb24c4a04e329a9d64e
3dd9d069
1 parent
6e90a55f
视频类型稿件详情页-全部评论,点赞数未统计
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
40 deletions
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LikeComponent.ets
View file @
3dd9d06
...
...
@@ -178,43 +178,43 @@ export struct LikeComponent {
.width(24)
.height(24)
if (this.likeCount > 0){
RelativeContainer() {
Image(this.likeStatus ? $r('app.media.ic_like_back_Select') : $r('app.media.ic_like_back'))
.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")
RelativeContainer() {
Image(this.likeStatus ? $r('app.media.ic_like_back_Select') : $r('app.media.ic_like_back'))
.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('#ffffff')// .backgroundColor('#ED2800')
.height(12)
.textAlign(TextAlign.Center)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})/*动态计算文字宽度*/
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))// Text("44444444")
.fontSize(8)
.fontColor('#ffffff')// .backgroundColor('#ED2800')
.height(12)
.textAlign(TextAlign.Center)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})/*动态计算文字宽度*/
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.offset({
x: 12
})
}
.offset({
x: 12
})
}
// Column() {
// // Image(this.likeStatus ? $r('app.media.icon_like_select') : $r('app.media.icon_like_default'))
...
...
@@ -259,19 +259,21 @@ export struct LikeComponent {
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : '#FFF5F5F5')
.backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' :
this.pageComponentType === 8 ? Color.Transparent :
'#FFF5F5F5')
Row() {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
.fontSize(8)
.fontColor(Color.White)
.padding({ left:
4
, right: 2 })
.padding({ left:
8
, right: 2 })
}
.height(12)
.alignItems(VerticalAlign.Center)
.position({ x: '100%', })
.position({ x: '100%',
y: 10
})
.markAnchor({ x: '100%' })
.backgroundImage($r('app.media.ic_like_back'))
.backgroundImageSize(ImageSize.Auto)
.backgroundImageSize({height: 13})
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.width(36)
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/CommentDialogView.ets
View file @
3dd9d06
...
...
@@ -90,7 +90,7 @@ export struct DetailDialog {
}).layoutWeight(1)
OperRowListView({
componentType:
1
,
componentType:
4
,
pageComponentType: 8,
showBackIcon: false,
operationButtonList: ['comment', 'like', 'collect', 'share'],
...
...
Please
register
or
login
to post a comment