提交 29bf7e94 编写于 作者: G guozejun

fix doc format

Signed-off-by: Nguozejun <guozejun@huawei.com>
Change-Id: I02ab0c9f96117369d0df627e6959bedfb63dfbd2
上级 03bd62e0
...@@ -118,47 +118,47 @@ struct IndexComponent { ...@@ -118,47 +118,47 @@ struct IndexComponent {
## onLayout<sup>9+</sup> ## onLayout<sup>9+</sup>
onLayout?(children: Array\<LayoutChild\>, constraint: [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions)): void onLayout?(children: Array\<LayoutChild\>, constraint: ConstraintSizeOptions): void
**参数:** 框架会在自定义组件布局时,将该自定义组件的子节点信息和自身的尺寸范围通过onLayout传递给该自定义组件。不允许在onLayout函数中改变状态变量。
| 参数名 | 类型 | 说明 | **参数:**
| ---------- | -------------------------------------------------------------------------------- | -------------------- |
| children | Array\<[LayoutChild](#layoutchild9)\> | 子组件布局信息 |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 父组件constraint信息 |
框架会在自定义组件布局时,将该自定义组件的子节点信息和自身的尺寸范围通过onLayout传递给该自定义组件。不允许在onLayout函数中改变状态变量。 | 参数名 | 类型 | 说明 |
| ---------- | -------------------------------------------------------------------------------- | ---------------------- |
| children | Array\<[LayoutChild](#layoutchild9)\> | 子组件布局信息。 |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 父组件constraint信息。 |
## onMeasure<sup>9+</sup> ## onMeasure<sup>9+</sup>
onMeasure?(children: Array\<LayoutChild\>, constraint: [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions)): void onMeasure?(children: Array\<LayoutChild\>, constraint: ConstraintSizeOptions): void
**参数:** 框架会在自定义组件确定尺寸时,将该自定义组件的子节点信息和自身的尺寸范围通过onMeasure传递给该自定义组件。不允许在onMeasure函数中改变状态变量。
| 参数名 | 类型 | 说明 | **参数:**
| ---------- | -------------------------------------------------------------------------------- | -------------------- |
| children | Array\<[LayoutChild](#layoutchild9)\> | 子组件布局信息 |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 父组件constraint信息 |
框架会在自定义组件确定尺寸时,将该自定义组件的子节点信息和自身的尺寸范围通过onMeasure传递给该自定义组件。不允许在onMeasure函数中改变状态变量。 | 参数名 | 类型 | 说明 |
| ---------- | -------------------------------------------------------------------------------- | ---------------------- |
| children | Array\<[LayoutChild](#layoutchild9)\> | 子组件布局信息。 |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 父组件constraint信息。 |
## LayoutChild<sup>9+</sup> ## LayoutChild<sup>9+</sup>
子组件布局信息 子组件布局信息
| 参数 | 参数类型 | 描述 | | 参数 | 参数类型 | 描述 |
| ---------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------ | | ---------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| name | string | 子组件名称 | | name | string | 子组件名称 |
| id | string | 子组件id | | id | string | 子组件id |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 子组件约束尺寸 | | constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 子组件约束尺寸 |
| borderInfo | [LayoutBorderInfo](#layoutborderinfo9) | 子组件border信息 | | borderInfo | [LayoutBorderInfo](#layoutborderinfo9) | 子组件border信息 |
| position | [Position](../reference/arkui-ts/ts-types.md#position) | 子组件位置坐标 | | position | [Position](../reference/arkui-ts/ts-types.md#position) | 子组件位置坐标 |
| measure | (childConstraint: [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions)) => void | 调用此方法对子组件的尺寸范围进行限制 | | measure | (childConstraint: [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions)) => void | 调用此方法对子组件的尺寸范围进行限制 |
| layout | (LayoutInfo: [LayoutInfo](#layoutinfo9)) => void | 调用此方法对子组件的位置信息进行限制 | | layout | (LayoutInfo: [LayoutInfo](#layoutinfo9)) => void | 调用此方法对子组件的位置信息进行限制 |
## LayoutBorderInfo<sup>9+</sup> ## LayoutBorderInfo<sup>9+</sup>
子组件border信息 子组件border信息
| 参数 | 参数类型 | 描述 | | 参数 | 参数类型 | 描述 |
| ----------- | ---------------------------------------------------------- | ---------------------------------------------- | | ----------- | ---------------------------------------------------------- | ---------------------------------------------- |
...@@ -168,12 +168,12 @@ onMeasure?(children: Array\<LayoutChild\>, constraint: [ConstraintSizeOptions](. ...@@ -168,12 +168,12 @@ onMeasure?(children: Array\<LayoutChild\>, constraint: [ConstraintSizeOptions](.
## LayoutInfo<sup>9+</sup> ## LayoutInfo<sup>9+</sup>
子组件layout信息 子组件layout信息
| 参数 | 参数类型 | 描述 | | 参数 | 参数类型 | 描述 |
| ---------- | -------------------------------------------------------------------------------- | -------------- | | ---------- | -------------------------------------------------------------------------------- | ---------------- |
| position | [Position](../reference/arkui-ts/ts-types.md#position) | 子组件位置坐标 | | position | [Position](../reference/arkui-ts/ts-types.md#position) | 子组件位置坐标 |
| constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 子组件约束尺寸 | | constraint | [ConstraintSizeOptions](../reference/arkui-ts/ts-types.md#constraintsizeoptions) | 子组件约束尺寸 |
**示例3:** **示例3:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册