在设置高度这里通过真实数组中的个数来取
getCategoryRowCount() {
return Math.ceil(this.images.length / 2);
}
getCategoryViewHeight() {
return `${100 * this.getCategoryRowCount()}vp`;
}
![](https://img.haomeiwen.com/i2835571/64a70f0822e3987e.png)
![](https://img.haomeiwen.com/i2835571/d2b653ad8ac9a065.png)
在设置高度这里通过真实数组中的个数来取
getCategoryRowCount() {
return Math.ceil(this.images.length / 2);
}
getCategoryViewHeight() {
return `${100 * this.getCategoryRowCount()}vp`;
}
本文标题:鸿蒙开发 Grid自动高度
本文链接:https://www.haomeiwen.com/subject/dkvmfjtx.html
网友评论