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
wangliang_wd
2024-06-04 10:43:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dd15b7cc05d1fd7cb66c876825db82e9e3ce386b
dd15b7cc
1 parent
9ee47536
feat:优化早晚报头视图展示
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/topicInfoView.ets
View file @
dd15b7c
...
...
@@ -17,7 +17,7 @@ export struct topicInfoView {
// } as FrontLinkObject
frontLinkObject: FrontLinkObject = {} as FrontLinkObject
@State isExpansion:boolean = false
aboutToAppear() {
}
...
...
@@ -32,7 +32,7 @@ export struct topicInfoView {
})
.id('img_cover')
if (this.frontLinkObject.linkUrl.length > 0) {
if (this.frontLinkObject.linkUrl.length > 0
|| this.frontLinkObject?.newsId.length > 0
) {
Row() {
Text("查看详情")
.fontSize(14)
...
...
@@ -54,6 +54,8 @@ export struct topicInfoView {
contentDTO.objectType = this.frontLinkObject?.newsType.toString()
contentDTO.objectId = this.frontLinkObject?.newsId
contentDTO.linkUrl = this.frontLinkObject?.linkUrl
contentDTO.relId = this.frontLinkObject?.newsRelId.toString()
contentDTO.relType = this.frontLinkObject?.newsType.toString()
ProcessUtils.processPage(contentDTO)
})
...
...
@@ -65,17 +67,25 @@ export struct topicInfoView {
.id('row_detail')
}
Row(){
Text(this.frontLinkObject?.summary ?? "")
.margin({ top: 10 })
.fontSize(14)
.fontColor($r('app.color.white'))
.maxLines(3)
.fontColor('#CCFFFFFF')
.maxLines(this.isExpansion?999:3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
Text(this.isExpansion?'收起':'展开').onClick(()=>{
this.isExpansion = !this.isExpansion
})
.fontSize(14)
.fontColor($r('app.color.white'))
}.alignItems(VerticalAlign.Bottom)
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom }
bottom: this.frontLinkObject.linkUrl.length > 0
|| this.frontLinkObject?.newsId.length > 0
?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom }
})
.margin({
left: 16, right: 16, bottom: this.frontLinkObject.linkUrl.length > 0
?0:16})
.margin({
top: 10 , left: 16, right: 16, bottom: this.frontLinkObject.linkUrl.length > 0 || this.frontLinkObject?.newsId.length > 0
?0:16})
.id('txt_summary')
Text(this.frontLinkObject?.title ?? "")
...
...
Please
register
or
login
to post a comment