Showing
1 changed file
with
19 additions
and
22 deletions
| @@ -29,24 +29,14 @@ export struct LiveFollowComponent { | @@ -29,24 +29,14 @@ export struct LiveFollowComponent { | ||
| 29 | @State followStatus: String = '0'; | 29 | @State followStatus: String = '0'; |
| 30 | 30 | ||
| 31 | build() { | 31 | build() { |
| 32 | - Stack() { | ||
| 33 | - Stack() | ||
| 34 | - .height(22) | ||
| 35 | - .width(150) | ||
| 36 | - .backgroundColor('#000000') | ||
| 37 | - .opacity(0.3) | ||
| 38 | - .borderRadius({ | ||
| 39 | - topLeft: 90, | ||
| 40 | - bottomLeft: 90 | ||
| 41 | - }) | ||
| 42 | Row() { | 32 | Row() { |
| 43 | - Stack({alignContent: Alignment.Bottom}){ | 33 | + Stack({ alignContent: Alignment.Bottom }) { |
| 44 | //号主头像 | 34 | //号主头像 |
| 45 | Image(this.rmhInfo.rmhHeadUrl) | 35 | Image(this.rmhInfo.rmhHeadUrl) |
| 46 | .alt($r('app.media.icon_default_head_mater')) | 36 | .alt($r('app.media.icon_default_head_mater')) |
| 47 | .width(24) | 37 | .width(24) |
| 48 | .height(24) | 38 | .height(24) |
| 49 | - .borderRadius(90) | 39 | + .borderRadius(12) |
| 50 | .onClick(() => { | 40 | .onClick(() => { |
| 51 | // 跳转到号主页 | 41 | // 跳转到号主页 |
| 52 | if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | 42 | if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { |
| @@ -57,8 +47,8 @@ export struct LiveFollowComponent { | @@ -57,8 +47,8 @@ export struct LiveFollowComponent { | ||
| 57 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | 47 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) |
| 58 | } | 48 | } |
| 59 | }) | 49 | }) |
| 60 | - if(this.contentDetailData.rmhInfo?.authIcon){ | ||
| 61 | - Row(){ | 50 | + if (this.contentDetailData.rmhInfo?.authIcon) { |
| 51 | + Row() { | ||
| 62 | Image(this.contentDetailData.rmhInfo?.authIcon) | 52 | Image(this.contentDetailData.rmhInfo?.authIcon) |
| 63 | .width(10) | 53 | .width(10) |
| 64 | .height(10) | 54 | .height(10) |
| @@ -67,20 +57,22 @@ export struct LiveFollowComponent { | @@ -67,20 +57,22 @@ export struct LiveFollowComponent { | ||
| 67 | .justifyContent(FlexAlign.End) | 57 | .justifyContent(FlexAlign.End) |
| 68 | } | 58 | } |
| 69 | }.width(24).height(24) | 59 | }.width(24).height(24) |
| 70 | - | 60 | + .margin({ |
| 61 | + left: 0, | ||
| 62 | + top: 0, | ||
| 63 | + bottom: 0, | ||
| 64 | + }) | ||
| 71 | //号主名称 | 65 | //号主名称 |
| 72 | Text(this.rmhInfo.rmhName) | 66 | Text(this.rmhInfo.rmhName) |
| 73 | .fontColor(Color.White) | 67 | .fontColor(Color.White) |
| 74 | - .textOverflow({overflow:TextOverflow.Ellipsis}) | 68 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 75 | .maxLines(1) | 69 | .maxLines(1) |
| 76 | .fontWeight(500) | 70 | .fontWeight(500) |
| 77 | .fontSize('12fp') | 71 | .fontSize('12fp') |
| 78 | - .layoutWeight(1) | ||
| 79 | .margin({ | 72 | .margin({ |
| 80 | left: 4, | 73 | left: 4, |
| 81 | right: 6 | 74 | right: 6 |
| 82 | }) | 75 | }) |
| 83 | - Blank() | ||
| 84 | //关注状态 | 76 | //关注状态 |
| 85 | Text(this.followStatus === '0' ? '关注' : '已关注') | 77 | Text(this.followStatus === '0' ? '关注' : '已关注') |
| 86 | .fontColor(Color.White) | 78 | .fontColor(Color.White) |
| @@ -93,16 +85,21 @@ export struct LiveFollowComponent { | @@ -93,16 +85,21 @@ export struct LiveFollowComponent { | ||
| 93 | bottom: 3 | 85 | bottom: 3 |
| 94 | }) | 86 | }) |
| 95 | .borderRadius(2) | 87 | .borderRadius(2) |
| 96 | - .margin({ right: 2 }) | 88 | + .width(36) |
| 89 | + .margin({right:2}) | ||
| 97 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) | 90 | .backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC')) |
| 98 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) | 91 | .visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None) |
| 99 | .onClick(() => { | 92 | .onClick(() => { |
| 100 | this.handleAccention() | 93 | this.handleAccention() |
| 101 | }) | 94 | }) |
| 102 | } | 95 | } |
| 103 | - .height(22) | ||
| 104 | - .width(150) | ||
| 105 | - } | 96 | + .backgroundColor("#30000000") |
| 97 | + .borderRadius({ | ||
| 98 | + topLeft: 12, | ||
| 99 | + bottomLeft: 12, | ||
| 100 | + topRight: 2, | ||
| 101 | + bottomRight: 2 | ||
| 102 | + }) | ||
| 106 | } | 103 | } |
| 107 | 104 | ||
| 108 | /** | 105 | /** |
-
Please register or login to post a comment