DetailTitleSummaryView.ets
1.72 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const FULL_PARENT: string = '100%';
const TAG = 'DetailTitleSummaryView';
@Entry
@Component
export struct DetailTitleSummaryView {
@State title: string = 'title'
@State newsSummary: string = 'newsSummary'
aboutToAppear() {
this.newsSummary = 'newsSummary 0 newsSummary newsSummary newsSummary newsSummary newsSummary 0 newsSummary newsSummary newsSummary newsSummary'
}
build() {
Stack() {
Text('1')
.width('100%')
.margin({ top: 10 })
.fontColor(Color.White)
.fontSize(30)
.maxLines(1)
}
.height('60%')
.backgroundColor(Color.Black)
// Column() {
// Text(this.title)
// .width('100%')
// .margin({ top: 10 })
// .fontColor(Color.White)
// .fontSize(30)
// .maxLines(1)
//
// List() {
// ListItem() {
// Text(this.newsSummary)
// .width(FULL_PARENT)
// .fontWeight(FontWeight.Bold)
// .fontColor(Color.White)
// .maxLines(10)
// .textOverflow({ overflow: TextOverflow.Ellipsis })
// }
// }
// .constraintSize({ maxHeight: '40%' })
// .margin({ top: 5 })
//
// Image($r('app.media.ic_close'))
// .height(24)
// .width(24)
// .margin({ top: 10 })
// .alignRules({
// right: { anchor: "__container__", align: HorizontalAlign.End },
// center: { anchor: "__container__", align: VerticalAlign.Center } })
// .id('img_close')
// .onClick((event: ClickEvent) => {
// // console.info(TAG, "img_close")
// router.back()
// })
// }
// .margin({ left: 14, right: 14 })
// .backgroundColor(Color.Black)
}
}