chenjun

人民号冷启动推荐卡 头像描边 文字居中 间距 字号

... ... @@ -15,6 +15,11 @@ export struct PeopleShipRecommendHeadComponent {
.height('44vp')
.borderRadius('22vp')
.objectFit(ImageFit.Cover)
.border({
width: 0.5,
color: '#0D000000', // 5% 透明度的黑色
style: BorderStyle.Solid
})
Image( this.isSelectedRmhInfo() ? $r('app.media.rmh_selected') : $r('app.media.rmh_unselected') )
.width('18vp')
... ... @@ -46,14 +51,18 @@ export struct PeopleShipRecommendHeadComponent {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
Row() {
Text(this.rmhInfo.introduction)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize(12)
.margin({ top: 4, bottom: 14 })
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(2)
.height(34)
.lineHeight(17)
.textAlign(TextAlign.Center)
}
Text(this.rmhInfo.introduction)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.vp_11'))
.margin({ top: 6, bottom: 14 })
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(2)
.height(34)
}
.width('100%')
.height('110vp')
... ...