Showing
1 changed file
with
13 additions
and
22 deletions
| @@ -18,42 +18,33 @@ export struct ZhGridLayoutComponent { | @@ -18,42 +18,33 @@ export struct ZhGridLayoutComponent { | ||
| 18 | @State compDTO: CompDTO = {} as CompDTO | 18 | @State compDTO: CompDTO = {} as CompDTO |
| 19 | 19 | ||
| 20 | aboutToAppear() { | 20 | aboutToAppear() { |
| 21 | - Logger.info(TAG + ' comp:'+ JSON.stringify(this.compDTO)) | 21 | + // Logger.info(TAG + ' comp:'+ JSON.stringify(this.compDTO)) |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | build() { | 24 | build() { |
| 25 | Column() { | 25 | Column() { |
| 26 | Flex({ wrap: FlexWrap.Wrap, | 26 | Flex({ wrap: FlexWrap.Wrap, |
| 27 | justifyContent: FlexAlign.SpaceEvenly, | 27 | justifyContent: FlexAlign.SpaceEvenly, |
| 28 | - alignItems :ItemAlign.End}) { | 28 | + alignItems: ItemAlign.End }) { |
| 29 | ForEach(this.compDTO.operDataList, (item: ContentDTO) => { | 29 | ForEach(this.compDTO.operDataList, (item: ContentDTO) => { |
| 30 | Column() { | 30 | Column() { |
| 31 | - Image(item.coverUrl) | ||
| 32 | - .width(50) | ||
| 33 | - .borderRadius(5) | ||
| 34 | - .aspectRatio(1 / 1) | ||
| 35 | - .autoResize(true) | ||
| 36 | - Text(item.newsTitle) | ||
| 37 | - .fontSize(16) | ||
| 38 | - .padding({ top: 10 }) | ||
| 39 | - }.margin({ | ||
| 40 | - top:5, | ||
| 41 | - bottom:5, | ||
| 42 | - left:5, | ||
| 43 | - right :5 | ||
| 44 | - }) | 31 | + Image(item.coverUrl) |
| 32 | + .width(44) | ||
| 33 | + .borderRadius(5) | ||
| 34 | + .aspectRatio(1 / 1) | ||
| 35 | + .autoResize(true) | ||
| 36 | + Text(item.newsTitle) | ||
| 37 | + .fontSize(13) | ||
| 38 | + .padding({ top: 8 }) | ||
| 39 | + }.height(68).width(75) | ||
| 45 | }, (item: ContentDTO) => JSON.stringify(item)) | 40 | }, (item: ContentDTO) => JSON.stringify(item)) |
| 46 | } | 41 | } |
| 47 | .backgroundColor(Color.White) | 42 | .backgroundColor(Color.White) |
| 48 | - .borderRadius(12) | ||
| 49 | .padding({ | 43 | .padding({ |
| 50 | - top: 10, | ||
| 51 | - bottom: 10 | 44 | + top: 14, |
| 45 | + bottom: 14 | ||
| 52 | }) | 46 | }) |
| 53 | - .width(FULL_PARENT) | ||
| 54 | - .margin(10) | ||
| 55 | } | 47 | } |
| 56 | - | ||
| 57 | } | 48 | } |
| 58 | } | 49 | } |
| 59 | 50 |
-
Please register or login to post a comment