Showing
2 changed files
with
11 additions
and
2 deletions
| @@ -10,6 +10,7 @@ export struct ChatItemComponent { | @@ -10,6 +10,7 @@ export struct ChatItemComponent { | ||
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | build() { | 12 | build() { |
| 13 | + Row(){ | ||
| 13 | Row() { | 14 | Row() { |
| 14 | Text() { | 15 | Text() { |
| 15 | if (this.item.role == LiveMessageRole.host) { | 16 | if (this.item.role == LiveMessageRole.host) { |
| @@ -59,5 +60,7 @@ export struct ChatItemComponent { | @@ -59,5 +60,7 @@ export struct ChatItemComponent { | ||
| 59 | right: 8 | 60 | right: 8 |
| 60 | }) | 61 | }) |
| 61 | .margin({ left: 16, bottom: 4 }) | 62 | .margin({ left: 16, bottom: 4 }) |
| 63 | + }.width("100%") | ||
| 64 | + .backgroundColor(Color.Transparent) | ||
| 62 | } | 65 | } |
| 63 | } | 66 | } |
| @@ -100,16 +100,22 @@ export struct PlayerCommentComponent { | @@ -100,16 +100,22 @@ export struct PlayerCommentComponent { | ||
| 100 | ForEach(this.liveChatList, (item: LiveRoomItemBean) => { | 100 | ForEach(this.liveChatList, (item: LiveRoomItemBean) => { |
| 101 | ListItem() { | 101 | ListItem() { |
| 102 | ChatItemComponent({ item: item }) | 102 | ChatItemComponent({ item: item }) |
| 103 | - } | 103 | + }.blendMode(BlendMode.SRC_IN, BlendApplyType.OFFSCREEN) |
| 104 | }) | 104 | }) |
| 105 | } | 105 | } |
| 106 | - .width('80%') | 106 | + .width('100%') |
| 107 | .scrollBar(BarState.Off) | 107 | .scrollBar(BarState.Off) |
| 108 | + .edgeEffect(EdgeEffect.None) | ||
| 108 | 109 | ||
| 109 | } | 110 | } |
| 110 | .constraintSize({ | 111 | .constraintSize({ |
| 111 | maxHeight: 280 | 112 | maxHeight: 280 |
| 113 | + }).width("80%") | ||
| 114 | + .linearGradient({ angle: 0, | ||
| 115 | + colors: [[0xff000000, 0.85], [0x01000000, 1.0]] | ||
| 112 | }) | 116 | }) |
| 117 | + .blendMode(BlendMode.SRC_OVER, BlendApplyType.OFFSCREEN) | ||
| 118 | + | ||
| 113 | 119 | ||
| 114 | // 收藏、分享、点赞是否需要根据字段显隐 | 120 | // 收藏、分享、点赞是否需要根据字段显隐 |
| 115 | LiveOperRowListView({ | 121 | LiveOperRowListView({ |
-
Please register or login to post a comment