Showing
1 changed file
with
12 additions
and
10 deletions
| @@ -15,20 +15,21 @@ export struct TabLiveItemComponent { | @@ -15,20 +15,21 @@ export struct TabLiveItemComponent { | ||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | build() { | 17 | build() { |
| 18 | + Column() { | ||
| 18 | Row() { | 19 | Row() { |
| 19 | Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') : this.item.senderUserAvatarUrl) | 20 | Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') : this.item.senderUserAvatarUrl) |
| 20 | .borderRadius(90) | 21 | .borderRadius(90) |
| 21 | .width(24) | 22 | .width(24) |
| 22 | .height(24) | 23 | .height(24) |
| 23 | - | ||
| 24 | - Column() { | ||
| 25 | - Row() { | 24 | + .id("senderUserAvatar") |
| 26 | Text(this.item.senderUserName) | 25 | Text(this.item.senderUserName) |
| 27 | .maxLines(1) | 26 | .maxLines(1) |
| 28 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 27 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 29 | .fontSize('14vp') | 28 | .fontSize('14vp') |
| 30 | .fontWeight(400) | 29 | .fontWeight(400) |
| 31 | .fontColor('#222222') | 30 | .fontColor('#222222') |
| 31 | + .alignRules({center:{anchor:"senderUserAvatar",align:VerticalAlign.Center}}) | ||
| 32 | + .margin({left:8}) | ||
| 32 | Text(this.item.role === 'host' ? '主持人' : '嘉宾') | 33 | Text(this.item.role === 'host' ? '主持人' : '嘉宾') |
| 33 | .maxLines(1) | 34 | .maxLines(1) |
| 34 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 35 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -71,7 +72,9 @@ export struct TabLiveItemComponent { | @@ -71,7 +72,9 @@ export struct TabLiveItemComponent { | ||
| 71 | .width(100) | 72 | .width(100) |
| 72 | .visibility(1 == this.item.isTop ? Visibility.Visible : Visibility.None) | 73 | .visibility(1 == this.item.isTop ? Visibility.Visible : Visibility.None) |
| 73 | } | 74 | } |
| 74 | - | 75 | + .justifyContent(FlexAlign.Start) |
| 76 | + .width("100%") | ||
| 77 | + Column() { | ||
| 75 | Text(this.item.text) | 78 | Text(this.item.text) |
| 76 | .fontSize('14vp') | 79 | .fontSize('14vp') |
| 77 | .fontWeight(400) | 80 | .fontWeight(400) |
| @@ -171,17 +174,16 @@ export struct TabLiveItemComponent { | @@ -171,17 +174,16 @@ export struct TabLiveItemComponent { | ||
| 171 | } | 174 | } |
| 172 | } | 175 | } |
| 173 | .margin({ | 176 | .margin({ |
| 174 | - left: 8, | ||
| 175 | - right: 16 | 177 | + left: 32, |
| 176 | }) | 178 | }) |
| 177 | - .layoutWeight(1) | ||
| 178 | .alignItems(HorizontalAlign.Start) | 179 | .alignItems(HorizontalAlign.Start) |
| 180 | + .justifyContent(FlexAlign.Start) | ||
| 179 | } | 181 | } |
| 180 | - .alignItems(VerticalAlign.Top) | ||
| 181 | .padding({ | 182 | .padding({ |
| 182 | left: 17, | 183 | left: 17, |
| 183 | - top: 8, | ||
| 184 | - bottom: 8, | 184 | + top: 12, |
| 185 | + right: 16, | ||
| 186 | + bottom: 4, | ||
| 185 | }) | 187 | }) |
| 186 | } | 188 | } |
| 187 | 189 |
-
Please register or login to post a comment