跳到主要内容
此为 React Native 中文网 0.72 版的文档,现已不再积极维护。
最新的文档请参阅 最新版本 (0.83)。
Version: 0.72

布局事件对象

LayoutEvent object is returned in the callback as a result of component layout change, for example onLayout in View component.

示例

js
{
layout:{
width:520,
height:70.5,
x:0,
y:42.5
},
target:1127
}

属性与值

height

Height of the component after the layout changes.

TypeOptional
numberNo

width

Width of the component after the layout changes.

TypeOptional
numberNo

x

Component X coordinate inside the parent component.

TypeOptional
numberNo

y

Component Y coordinate inside the parent component.

TypeOptional
numberNo

target

The node id of the element receiving the PressEvent.

TypeOptional
number, null, undefinedNo

被下列组件引用

AltStyle によって変換されたページ (->オリジナル) /