提交 0ff3064a 编写于 作者: E esterzhou

update docs (11437)

Signed-off-by: Nesterzhou <ester.zhou@huawei.com>
上级 ce095302
# GridCol # GridCol
The **\<GridCol>** component must be used as a child component of the [GridRow](ts-container-gridrow.md) container. The **\<GridCol>** component must be used as a child component of the **[\<GridRow>](ts-container-gridrow.md)** container.
> **NOTE** > **NOTE**
> >
...@@ -16,10 +16,10 @@ GridCol(option?:{span?: number | GridColColumnOption, offset?: number | GridColC ...@@ -16,10 +16,10 @@ GridCol(option?:{span?: number | GridColColumnOption, offset?: number | GridColC
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name| Type | Mandatory| Description |
| ------ | ----------------------------- | ---- | ------------------------------------------------------------ | | ------ | ----------------------------------------------------- | ---- | ------------------------------------------------------------ |
| span | number \| GridColColumnOption | No | Number of occupied columns. If it is set to **0**, the element is not involved in layout calculation, that is, the element is not rendered.<br>Default value: **1**| | span | number \| [GridColColumnOption](#gridcolcolumnoption) | No | Number of occupied columns. If it is set to **0**, the element is not involved in layout calculation, that is, the element is not rendered.<br>Default value: **1**|
| offset | number \| GridColColumnOption | No | Number of offset columns relative to the previous child component of the grid<br>Default value: **0** | | offset | number \| [GridColColumnOption](#gridcolcolumnoption) | No | Number of offset columns relative to the previous child component of the grid<br>Default value: **0** |
| order | number \| GridColColumnOption | No | Sequence number of the element. Child components of the grid are sorted in ascending order based on their sequence numbers.<br>Default value: **0**| | order | number \| [GridColColumnOption](#gridcolcolumnoption) | No | Sequence number of the element. Child components of the grid are sorted in ascending order based on their sequence numbers.<br>Default value: **0**|
## Attributes ## Attributes
......
...@@ -12,14 +12,14 @@ The show/hide event is triggered when a component is mounted or unmounted from t ...@@ -12,14 +12,14 @@ The show/hide event is triggered when a component is mounted or unmounted from t
| Name | Bubbling Supported| Description | | Name | Bubbling Supported| Description |
| ------------------------------------------------ | -------- | -------------------------- | | ------------------------------------------------ | -------- | -------------------------- |
| onAppear(event: () =&gt; void) | No | Triggered when the component is displayed.| | onAppear(event: () =&gt; void) | No | Triggered when the component is displayed.|
| onDisappear(event: () =&gt; void) | No | Triggered when the component is hidden. | | onDisAppear(event: () =&gt; void) | No | Triggered when the component is hidden.|
## Example ## Example
```ts ```ts
// xxx.ets // xxx.ets
import prompt from '@ohos.prompt' import promptAction from '@ohos.promptAction'
@Entry @Entry
@Component @Component
...@@ -38,14 +38,14 @@ struct AppearExample { ...@@ -38,14 +38,14 @@ struct AppearExample {
Text(this.myText).fontSize(26).fontWeight(FontWeight.Bold) Text(this.myText).fontSize(26).fontWeight(FontWeight.Bold)
.onAppear(() => { .onAppear(() => {
this.changeAppear = 'Hide Text' this.changeAppear = 'Hide Text'
prompt.showToast({ promptAction.showToast({
message: 'The text is shown', message: 'The text is shown',
duration: 2000 duration: 2000
}) })
}) })
.onDisAppear(() => { .onDisAppear(() => {
this.changeAppear = 'Show Text' this.changeAppear = 'Show Text'
prompt.showToast({ promptAction.showToast({
message: 'The text is hidden', message: 'The text is hidden',
duration: 2000 duration: 2000
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册