Showing
1 changed file
with
4 additions
and
3 deletions
| @@ -131,9 +131,9 @@ export struct ZhSingleColumn09 { | @@ -131,9 +131,9 @@ export struct ZhSingleColumn09 { | ||
| 131 | .justifyContent(FlexAlign.SpaceBetween) | 131 | .justifyContent(FlexAlign.SpaceBetween) |
| 132 | .width('100%') | 132 | .width('100%') |
| 133 | 133 | ||
| 134 | - Grid() { | 134 | + Flex({wrap: FlexWrap.Wrap}) { |
| 135 | ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => { | 135 | ForEach(this.operDataList.slice(0, 8), (item: ContentDTO, index: number) => { |
| 136 | - GridItem() { | 136 | + Row() { |
| 137 | Stack({ alignContent: Alignment.TopEnd }) { | 137 | Stack({ alignContent: Alignment.TopEnd }) { |
| 138 | Image(this.loadImg ? item.coverUrl : '') | 138 | Image(this.loadImg ? item.coverUrl : '') |
| 139 | .backgroundColor(0xf5f5f5) | 139 | .backgroundColor(0xf5f5f5) |
| @@ -163,6 +163,7 @@ export struct ZhSingleColumn09 { | @@ -163,6 +163,7 @@ export struct ZhSingleColumn09 { | ||
| 163 | .width('100%') | 163 | .width('100%') |
| 164 | .aspectRatio(2 / 1) | 164 | .aspectRatio(2 / 1) |
| 165 | } | 165 | } |
| 166 | + .width('calc((100% - 6vp * 3) / 4)') | ||
| 166 | .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) | 167 | .margin({ right: index % 4 === 3 ? 0 : 6, bottom: 6 }) |
| 167 | .onClick(() => { | 168 | .onClick(() => { |
| 168 | if (this.activeIndexs.includes(index)) { | 169 | if (this.activeIndexs.includes(index)) { |
| @@ -174,7 +175,7 @@ export struct ZhSingleColumn09 { | @@ -174,7 +175,7 @@ export struct ZhSingleColumn09 { | ||
| 174 | }) | 175 | }) |
| 175 | }) | 176 | }) |
| 176 | } | 177 | } |
| 177 | - .columnsTemplate('1fr 1fr 1fr 1fr') | 178 | + // .columnsTemplate('1fr 1fr 1fr 1fr') |
| 178 | .margin({ bottom: 5 }) | 179 | .margin({ bottom: 5 }) |
| 179 | 180 | ||
| 180 | Row() { | 181 | Row() { |
-
Please register or login to post a comment