Showing
3 changed files
with
27 additions
and
4 deletions
| @@ -18,7 +18,14 @@ export struct PeopleShipHomeAttentionComponent { | @@ -18,7 +18,14 @@ export struct PeopleShipHomeAttentionComponent { | ||
| 18 | .height(20) | 18 | .height(20) |
| 19 | .color($r('app.color.color_fff')) | 19 | .color($r('app.color.color_fff')) |
| 20 | }else { | 20 | }else { |
| 21 | - Text('+ 关注') | 21 | + Image($r('app.media.people_ship_top_add')) |
| 22 | + .objectFit(ImageFit.Auto) | ||
| 23 | + .width('16vp') | ||
| 24 | + .height('16pv') | ||
| 25 | + .margin({ | ||
| 26 | + right: '4vp' | ||
| 27 | + }) | ||
| 28 | + Text('关注') | ||
| 22 | .fontColor(Color.White) | 29 | .fontColor(Color.White) |
| 23 | .fontSize($r('app.float.vp_14')) | 30 | .fontSize($r('app.float.vp_14')) |
| 24 | .fontWeight(500) | 31 | .fontWeight(500) |
| @@ -62,7 +62,25 @@ export struct PeopleShipHomePageNavComponent { | @@ -62,7 +62,25 @@ export struct PeopleShipHomePageNavComponent { | ||
| 62 | 62 | ||
| 63 | if (this.isAttention == '0') { | 63 | if (this.isAttention == '0') { |
| 64 | // 关注 | 64 | // 关注 |
| 65 | - Button('+ 关注', { type: ButtonType.Normal, stateEffect: true }) | 65 | + Button({ type: ButtonType.Normal, stateEffect: true }) { |
| 66 | + Row(){ | ||
| 67 | + Image($r('app.media.people_ship_top_add')) | ||
| 68 | + .objectFit(ImageFit.Auto) | ||
| 69 | + .width('12vp') | ||
| 70 | + .height('12pv') | ||
| 71 | + .margin({ | ||
| 72 | + right: '2vp' | ||
| 73 | + }) | ||
| 74 | + Text('关注') | ||
| 75 | + .fontSize($r('app.float.vp_12')) | ||
| 76 | + .fontColor(Color.White) | ||
| 77 | + } | ||
| 78 | + .alignSelf(ItemAlign.Center) | ||
| 79 | + .justifyContent(FlexAlign.Center) | ||
| 80 | + .width('100%') | ||
| 81 | + .height('100%') | ||
| 82 | + } | ||
| 83 | + | ||
| 66 | .borderRadius(4) | 84 | .borderRadius(4) |
| 67 | .backgroundColor($r('app.color.color_ED2800')) | 85 | .backgroundColor($r('app.color.color_ED2800')) |
| 68 | .width('54vp') | 86 | .width('54vp') |
| @@ -77,8 +95,6 @@ export struct PeopleShipHomePageNavComponent { | @@ -77,8 +95,6 @@ export struct PeopleShipHomePageNavComponent { | ||
| 77 | left: '12vp', | 95 | left: '12vp', |
| 78 | }) | 96 | }) |
| 79 | .padding(0) | 97 | .padding(0) |
| 80 | - .fontSize($r('app.float.vp_12')) | ||
| 81 | - .fontColor(Color.White) | ||
| 82 | .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden)) | 98 | .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden)) |
| 83 | } else { | 99 | } else { |
| 84 | Button('已关注', { type: ButtonType.Normal, stateEffect: true }) | 100 | Button('已关注', { type: ButtonType.Normal, stateEffect: true }) |
-
Please register or login to post a comment