douaojie

fix: 添加标签

... ... @@ -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)
... ...
... ... @@ -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)
// 评论等信息
... ...
... ... @@ -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)
... ...