Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让 TileList 组件根据其内容自动调整大小?我尝试将其设置为 100%,但似乎无济于事。我不想硬编码高度,因为内容会有所不同,而且我不想显示滚动条。请帮忙。
这就是我最终解决此问题的方式:首先,我设置了 rowHeight 和 maxColumn 属性的值。然后我做了一个小函数,触发 TileList 的 updateComplete 事件,通过执行 rowHeight * 行数来计算 tileList 的高度。那行得通。
尝试在 tilelist 更改时创建事件处理程序,根据子项计算高度,然后根据该值调整子列表的大小。