TabInfoComponent.ets
1.07 KB
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
44
45
46
47
48
49
50
import { LiveDetailsBean } from 'wdBean/Index'
import { LiveCountdownComponent } from './LiveCountdownComponent'
@Component
export struct TabInfoComponent {
@Consume liveDetailsBean: LiveDetailsBean
aboutToAppear(): void {
}
build() {
Column() {
this.showLiveTitle()
this.showLiveDetails()
LiveCountdownComponent({liveDetailsBean:this.liveDetailsBean})
}.margin({
top: 13,
left: 16,
right: 16
})
.height('100%')
.alignItems(HorizontalAlign.Start)
}
aboutToDisappear(): void {
}
@Builder
showLiveTitle() {
Text(this.liveDetailsBean.newsTitle)
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('18vp')
.lineHeight('26vp')
.fontWeight(500)
.fontColor('#222222')
}
@Builder
showLiveDetails() {
Text(this.liveDetailsBean.newIntroduction)
.maxLines(5)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize('14vp')
.fontWeight(400)
.fontColor('#666666')
.lineHeight('22vp')
.margin({ top: 8 })
}
}