Skip to main content

LayoutEvent 对象类型

由于组件布局更改,回调中返回 LayoutEvent 对象,例如 View 组件中的 onLayout。

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

示例​

¥Example

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

键和值​

¥Keys and values

height​

布局更改后组件的高度。

¥Height of the component after the layout changes.

类型可选的
number不

width​

布局更改后组件的宽度。

¥Width of the component after the layout changes.

类型可选的
number不

x​

父组件内的组件 X 坐标。

¥Component X coordinate inside the parent component.

类型可选的
number不

y​

父组件内的组件 Y 坐标。

¥Component Y coordinate inside the parent component.

类型可选的
number不

target​

接收 LayoutEvent 的元素的节点 ID。

¥The node id of the element receiving the LayoutEvent.

类型可选的
编号,null,undefined不

使用者​

¥Used by