PlayerCommentView.ets
1.12 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
import router from '@ohos.router';
import { ContentDetailDTO } from 'wdBean/Index';
@Component
export struct PlayerCommentView {
@Consume showComment?: boolean
@Consume isOpenDetail?: boolean
@Consume contentDetailData: ContentDetailDTO
@State comment: string = '';
build() {
Row() {
Image($r('app.media.ic_back'))
.width(24)
.height(24)
.aspectRatio(1)
.onClick(() => {
router.back();
})
if (this.contentDetailData.openComment == 1) {
TextInput({ placeholder: '说两句...', text: this.comment })
.placeholderColor('#999999')
.placeholderFont({ size: 14 })
.fontColor(Color.White)
.fontSize(14)
.maxLines(1)
.layoutWeight(1)
.backgroundColor('#1a1a1a')
.borderRadius(2)
.height(30)
.margin({ left: 12 })
}
}
.backgroundColor(Color.Black)
.alignItems(VerticalAlign.Center)
.padding({
left: 16,
right: 16,
top: 11,
bottom: 11
})
.visibility(this.isOpenDetail ? Visibility.None : Visibility.Visible)
}
}