wangyong_wd

优化大专题卡样式

... ... @@ -22,7 +22,7 @@ export struct CompStyle_10 {
.margin({ bottom: 19 })
}
// 大图
Image(this.compDTO.operDataList[0].coverUrl)
Image(this.compDTO.operDataList[0] && this.compDTO.operDataList[0].coverUrl)
.width('100%')
// 专题列表--后端返回三个,
Column(){
... ... @@ -74,18 +74,20 @@ export struct CompStyle_10 {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.alignSelf(ItemAlign.Center)
Row(){
// 展示发稿人
if(item.source) {
Text(item.source)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_B0B0B0'))
.layoutWeight(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(1)
.width(item.source.length > 10 ? '60%' : '')
Image($r('app.media.point'))
.width(16)
.height(16)
}
Text(DateTimeUtils.getCommentTime(Number.parseFloat(String(item.publishTime))))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
... ...
... ... @@ -67,9 +67,9 @@ export struct ZhSingleRow04 {
Text(item.source)
.fontSize($r('app.float.font_size_12'))
.fontColor($r('app.color.color_B0B0B0'))
.layoutWeight(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(1)
.width(item.source.length > 10 ? '60%' : '')
Image($r("app.media.point"))
.width(16)
.height(16)
... ...