yangchenggong1_wd

fix |> 19889 疑难-竖屏直播间,评论区顶部应是渐隐效果,见截图,参考安卓。

... ... @@ -10,54 +10,57 @@ export struct ChatItemComponent {
}
build() {
Row() {
Text() {
if (this.item.role == LiveMessageRole.host) {
Span(' 主持人 ')
.fontSize(11)
// .lineHeight(16)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
.fontColor('#FFFFFFFF')
.fontFamily('PingFang SC-Regular')
.fontWeight(400)
Span(' ')
}
if (this.item.role == LiveMessageRole.guest) {
Span(' 嘉宾 ')
.fontSize(11)
// .lineHeight(16)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
Row(){
Row() {
Text() {
if (this.item.role == LiveMessageRole.host) {
Span(' 主持人 ')
.fontSize(11)
// .lineHeight(16)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
.fontColor('#FFFFFFFF')
.fontFamily('PingFang SC-Regular')
.fontWeight(400)
Span(' ')
}
if (this.item.role == LiveMessageRole.guest) {
Span(' 嘉宾 ')
.fontSize(11)
// .lineHeight(16)
.textBackgroundStyle({ color: "#70FFC63F", radius: 2 })
.fontColor('#FFFFFFFF')
.fontFamily('PingFang SC-Regular')
.fontWeight(400)
Span(' ')
}
Span(this.item.senderUserName + ': ')
.fontSize(14)
.lineHeight(22)
.fontColor('#FFFFC63F')
.padding({ right: 118 })
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
Span(this.item.text)
.fontSize(14)
.lineHeight(22)
.fontColor('#FFFFFFFF')
.fontFamily('PingFang SC-Regular')
.fontWeight(400)
Span(' ')
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
}
Span(this.item.senderUserName + ': ')
.fontSize(14)
.lineHeight(22)
.fontColor('#FFFFC63F')
.padding({ right: 118 })
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
.textShadow({ offsetX: 1, offsetY: 1, color: '#4D000000', radius: 1 })
Span(this.item.text)
.fontSize(14)
.lineHeight(22)
.fontColor('#FFFFFFFF')
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
}
.textShadow({ offsetX: 1, offsetY: 1, color: '#4D000000', radius: 1 })
}
.backgroundColor('#4D000000')
.borderRadius(3)
.padding({
top: 6,
bottom: 6,
left: 8,
right: 8
})
.margin({ left: 16, bottom: 4 })
.backgroundColor('#4D000000')
.borderRadius(3)
.padding({
top: 6,
bottom: 6,
left: 8,
right: 8
})
.margin({ left: 16, bottom: 4 })
}.width("100%")
.backgroundColor(Color.Transparent)
}
}
\ No newline at end of file
... ...
... ... @@ -100,16 +100,22 @@ export struct PlayerCommentComponent {
ForEach(this.liveChatList, (item: LiveRoomItemBean) => {
ListItem() {
ChatItemComponent({ item: item })
}
}.blendMode(BlendMode.SRC_IN, BlendApplyType.OFFSCREEN)
})
}
.width('80%')
.width('100%')
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
}
.constraintSize({
maxHeight: 280
}).width("80%")
.linearGradient({ angle: 0,
colors: [[0xff000000, 0.85], [0x01000000, 1.0]]
})
.blendMode(BlendMode.SRC_OVER, BlendApplyType.OFFSCREEN)
// 收藏、分享、点赞是否需要根据字段显隐
LiveOperRowListView({
... ...