douaojie

fix: 头图卡问题调整,缺省图颜色

... ... @@ -38,9 +38,9 @@ export struct Card11Component {
Column() {
Stack() {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
}
Text() {
if (this.titleMarked) {
... ... @@ -52,6 +52,7 @@ export struct Card11Component {
Span(this.contentDTO.newsTitle)
}
}
.lineHeight(27)
.fontSize($r("app.float.font_size_18"))
.fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
.maxLines(3)
... ... @@ -59,7 +60,7 @@ export struct Card11Component {
.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)
this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
... ...
... ... @@ -48,12 +48,12 @@ export struct Card17Component {
Span(this.contentDTO.newsTitle)
}
}
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_18'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_17'))
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
.width(CommonConstants.FULL_WIDTH)
Stack({ alignContent: Alignment.BottomEnd }) {
// 三个图,
... ... @@ -120,7 +120,7 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({compDTO:this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.padding({
... ... @@ -131,11 +131,3 @@ export struct Card17Component {
})
}
}
// 全局公共样式
@Styles
function ImageSize() {
.padding({ right: 18, left: 18 })
.width('100%')
.margin({ top: 10 })
}
\ No newline at end of file
... ...
... ... @@ -36,9 +36,9 @@ export struct Card3Component {
Column() {
Stack() {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center)
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
}
Text() {
if (this.titleMarked) {
... ... @@ -56,11 +56,11 @@ export struct Card3Component {
.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)
this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
// 评论等信息
CardSourceInfo({compDTO:this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.width(CommonConstants.FULL_WIDTH)
.padding({
... ...
... ... @@ -72,13 +72,12 @@ export struct Card5Component {
.width(CommonConstants.FULL_WIDTH)
.fontColor(Color.White)
.fontSize($r('app.float.font_size_18'))
.fontWeight(FontWeight.Bold)
.maxLines(2)
.align(Alignment.TopStart)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.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)
this.contentDTO.objectType == '5' ? 35 : 0)
}.alignContent(Alignment.TopStart)
}
.justifyContent(FlexAlign.Start)
... ... @@ -88,12 +87,12 @@ export struct Card5Component {
}
.alignContent(Alignment.Bottom)
.width(CommonConstants.FULL_WIDTH)
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
// .padding({
// left: $r('app.float.card_comp_pagePadding_lf'),
// right: $r('app.float.card_comp_pagePadding_lf'),
// top: $r('app.float.card_comp_pagePadding_tb'),
// bottom: $r('app.float.card_comp_pagePadding_tb')
// })
.onClick((event: ClickEvent) => {
this.clicked = true;
ProcessUtils.processPage(this.contentDTO)
... ...
... ... @@ -69,16 +69,16 @@ export struct Card6Component {
Span(this.contentDTO.newsTitle)
}
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.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)
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(3)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.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' ? 35 : 0)
}.alignContent(Alignment.TopStart)
}
... ... @@ -86,7 +86,7 @@ export struct Card6Component {
//bottom 评论等信息
CardSourceInfo({ compDTO: this.compDTO,contentDTO:this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
... ...
... ... @@ -38,11 +38,6 @@ export struct Card9Component {
Column() {
// 顶部标题,最多两行
if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags })
} else if (this.contentDTO.objectType == '5') {
Notes({ objectType: this.contentDTO.objectType })
}
Text() {
if (this.titleMarked) {
Span(this.str01)
... ... @@ -56,14 +51,9 @@ export struct Card9Component {
.fontColor(this.clicked ? 0x848484 : 0x222222)
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_18'))
.fontWeight(600)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.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)
.margin({ top: 10, bottom: 10 })
}
// 大图
Stack() {
... ...