yanlu

jira: desc:16656 人民号主页中的“+关注”的样式鸿蒙与安卓不一致

... ... @@ -18,7 +18,14 @@ export struct PeopleShipHomeAttentionComponent {
.height(20)
.color($r('app.color.color_fff'))
}else {
Text('+ 关注')
Image($r('app.media.people_ship_top_add'))
.objectFit(ImageFit.Auto)
.width('16vp')
.height('16pv')
.margin({
right: '4vp'
})
Text('关注')
.fontColor(Color.White)
.fontSize($r('app.float.vp_14'))
.fontWeight(500)
... ...
... ... @@ -62,7 +62,25 @@ export struct PeopleShipHomePageNavComponent {
if (this.isAttention == '0') {
// 关注
Button('+ 关注', { type: ButtonType.Normal, stateEffect: true })
Button({ type: ButtonType.Normal, stateEffect: true }) {
Row(){
Image($r('app.media.people_ship_top_add'))
.objectFit(ImageFit.Auto)
.width('12vp')
.height('12pv')
.margin({
right: '2vp'
})
Text('关注')
.fontSize($r('app.float.vp_12'))
.fontColor(Color.White)
}
.alignSelf(ItemAlign.Center)
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
}
.borderRadius(4)
.backgroundColor($r('app.color.color_ED2800'))
.width('54vp')
... ... @@ -77,8 +95,6 @@ export struct PeopleShipHomePageNavComponent {
left: '12vp',
})
.padding(0)
.fontSize($r('app.float.vp_12'))
.fontColor(Color.White)
.visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden))
} else {
Button('已关注', { type: ButtonType.Normal, stateEffect: true })
... ...