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
douaojie
2024-05-15 17:19:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cbe6ea2766139f44eeaab506d3fb69241d693f0e
cbe6ea27
1 parent
fd19b3f6
fix: 添加标签
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
20 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
cbe6ea2
...
...
@@ -35,7 +35,9 @@ export struct Card11Component {
build() {
Column() {
Stack() {
if (this.contentDTO.objectType == '5') {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text() {
...
...
@@ -48,12 +50,14 @@ export struct Card11Component {
Span(this.contentDTO.newsTitle)
}
}
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
cbe6ea2
...
...
@@ -34,7 +34,9 @@ export struct Card3Component {
build() {
Column() {
Stack() {
if (this.contentDTO.objectType == '5') {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text() {
...
...
@@ -47,10 +49,12 @@ export struct Card3Component {
Span(this.contentDTO.newsTitle)
}
}
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
.fontSize($r("app.float.font_size_16"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.width(CommonConstants.FULL_WIDTH)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
// 评论等信息
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
cbe6ea2
...
...
@@ -53,7 +53,9 @@ export struct Card5Component {
})
Row() {
Stack() {
if (this.contentDTO.objectType == '5') {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
...
...
@@ -67,13 +69,15 @@ export struct Card5Component {
Span(this.contentDTO.newsTitle)
}
}
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.normal_text_size'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
.textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
(this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
this.contentDTO.objectType == '5' ? 30 : 0)
}.alignContent(Alignment.TopStart)
}
.justifyContent(FlexAlign.Start)
...
...
Please
register
or
login
to post a comment