鸿蒙开发 Grid自动高度

2024-05-14  本文已影响0人  青柠盛夏

在设置高度这里通过真实数组中的个数来取

getCategoryRowCount() {

  return Math.ceil(this.images.length / 2);

}

getCategoryViewHeight() {

  return `${100 * this.getCategoryRowCount()}vp`;

}

上一篇 下一篇

猜你喜欢

热点阅读