ChartItemComponent.ets
956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { LiveRoomItemBean } from 'wdBean/Index'
@Component
export struct ChatItemComponent {
item: LiveRoomItemBean = {} as LiveRoomItemBean
aboutToAppear(): void {
}
build() {
Row() {
Text() {
// if (this.item.senderUserName) {
// Span(' 主持人 ')
// .fontSize(11)
// .lineHeight(20)
// .textBackgroundStyle({ color: '#808562', radius: 2 })
// Span(' ')
// }
Span(this.item.senderUserName + ': ')
.fontColor('#FFFFC63F')
.padding({ right: 118 })
//
Span(this.item.text)
}
.fontSize(14)
.fontColor('#FFFFFFFF')
.lineHeight(22)
.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 })
}
}