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.
我需要获取父块高度,我想我必须使用尺寸。但我该怎么做呢?谢谢
正如 Tyler McGinnis 在他的评论中所说,您可以使用onLayout获取尺寸,然后将它们作为道具传递给子组件。