Showing
1 changed file
with
2 additions
and
4 deletions
| @@ -132,7 +132,7 @@ export struct ZhSingleColumn09 { | @@ -132,7 +132,7 @@ export struct ZhSingleColumn09 { | ||
| 132 | .width('100%') | 132 | .width('100%') |
| 133 | 133 | ||
| 134 | Grid() { | 134 | Grid() { |
| 135 | - ForEach(this.operDataList, (item: ContentDTO, index: number) => { | 135 | + ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => { |
| 136 | GridItem() { | 136 | GridItem() { |
| 137 | Stack({ alignContent: Alignment.TopEnd }) { | 137 | Stack({ alignContent: Alignment.TopEnd }) { |
| 138 | Image(this.loadImg ? item.coverUrl : '') | 138 | Image(this.loadImg ? item.coverUrl : '') |
| @@ -161,7 +161,7 @@ export struct ZhSingleColumn09 { | @@ -161,7 +161,7 @@ export struct ZhSingleColumn09 { | ||
| 161 | .objectFit(ImageFit.Contain) | 161 | .objectFit(ImageFit.Contain) |
| 162 | } | 162 | } |
| 163 | .width('100%') | 163 | .width('100%') |
| 164 | - .height('100%') | 164 | + .aspectRatio(2 / 1) |
| 165 | } | 165 | } |
| 166 | .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) | 166 | .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) |
| 167 | .onClick(() => { | 167 | .onClick(() => { |
| @@ -174,9 +174,7 @@ export struct ZhSingleColumn09 { | @@ -174,9 +174,7 @@ export struct ZhSingleColumn09 { | ||
| 174 | }) | 174 | }) |
| 175 | }) | 175 | }) |
| 176 | } | 176 | } |
| 177 | - .height(90) | ||
| 178 | .columnsTemplate('1fr 1fr 1fr 1fr') | 177 | .columnsTemplate('1fr 1fr 1fr 1fr') |
| 179 | - .rowsTemplate('1fr 1fr') | ||
| 180 | .margin({ bottom: 5 }) | 178 | .margin({ bottom: 5 }) |
| 181 | 179 | ||
| 182 | Row() { | 180 | Row() { |
-
Please register or login to post a comment