Harmony疑难杂症(2)——布局
版本号
DevEco Studio NEXT Release
Build #DS-233.14475.28.36.503900
Build Version: 5.0.3.900, built on October 8, 2024
Runtime version: 17.0.10+1-b1087.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
idea.plugins.compatible.build=IC-233.14475.28
Non-Bundled Plugins:
com.griffin.jsontotypescriptclass (1.0.2)
问题
问题说明 | 解决方式 |
---|---|
将子组件置于父组件左上角 | .aligin(AlignMent.TopStart)属性 |
Grid高度自适应 | 动态计算高度,.height(Math.floor(this.imgList.length / 列数 + 1) * 行高) |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 kaiyu's blog!
评论