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-21 10:57:37 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9ca2e2859b3abf7daff9b0b35fd081221950dd15
9ca2e285
2 parents
034cd699
2c0ed3d5
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
9ca2e28
...
...
@@ -258,7 +258,7 @@ export struct MorningEveningPaperComponent {
})
}
}
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
.scrollBar(BarState.Off)
PaperTitleComponent()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
9ca2e28
...
...
@@ -412,7 +412,7 @@ export struct PaperSingleColumn999CardView {
} else if (hours < 24) {
result = `${hours}小时前`;
} else {
result =
`${days}天前`
;
result =
''
;
}
console.log(result);
...
...
@@ -422,12 +422,13 @@ export struct PaperSingleColumn999CardView {
build() {
Column() {
Text(this.item?.newsTitle)
.fontColor('#222222')
.fontSize(16)
.fontWeight(FontWeight.Bold)
.alignSelf(ItemAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.margin({ left:
22, right: 22, top: 28
})
.margin({ left:
16, right: 16, top: 16
})
if (this.item?.coverUrl) {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.item?.coverUrl)
...
...
@@ -462,35 +463,36 @@ export struct PaperSingleColumn999CardView {
.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.End)
}
}.margin({ left:
22, right: 22
})
}.margin({ left:
16, right: 16
})
}
if (this.item?.newsSummary) {
Text(this.item?.newsSummary)
.fontColor('#6666666')
.fontSize(14)
.padding({ top: 10 })
.alignSelf(ItemAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.margin({ left:
22, right: 22
})
.margin({ left:
16, right: 16
})
}
if (this.item) {
Row() {
Row() {
Text(this.item?.source)
.fontSize(12)
.fontColor(Color.Gray)
.margin({ left: 22 })
.fontColor('#B0B0B0')
.margin({ left: 16 })
Image($r('app.media.point'))
.width(16)
.height(16)
.margin({ top: 10, bottom: 10 })
Text(this.getPublishTime())
.fontSize(12)
.fontColor(Color.Gray)
if (this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
.fontColor('#B0B0B0')
if (this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
Text(this.interactData.commentNum + "评")
.fontSize(12)
.fontColor(
Color.Gray
)
.fontColor(
'#B0B0B0'
)
.margin({ left: 6 })
}
}
...
...
Please
register
or
login
to post a comment