提交 1fc7f271 编写于 作者: E ester.zhou

update doc

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 dd9ef9fb
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -22,7 +23,7 @@ This component can contain child components. ...@@ -22,7 +23,7 @@ This component can contain child components.
Panel(value:{show:boolean}) Panel(value:{show:boolean})
- Parameter - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| show | boolean | Yes | - | Whether the panel is shown or hidden. | | show | boolean | Yes | - | Whether the panel is shown or hidden. |
...@@ -30,7 +31,7 @@ Panel(value:{show:boolean}) ...@@ -30,7 +31,7 @@ Panel(value:{show:boolean})
## Attributes ## Attributes
| Name | Type | Default Value | Description | | Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | PanelType | PanelType.Foldable | Type of the panel. | | type | PanelType | PanelType.Foldable | Type of the panel. |
| mode | PanelMode | - | Initial status of the panel. | | mode | PanelMode | - | Initial status of the panel. |
...@@ -56,7 +57,7 @@ Panel(value:{show:boolean}) ...@@ -56,7 +57,7 @@ Panel(value:{show:boolean})
## Events ## Events
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| onChange(callback: (width: number, height: number, mode: PanelMode) =&gt; void) | Triggered when the status of the panel changes. The returned height value is the height of the content area. When the value of **dragbar** is **true**, the height of the panel is the dragbar height plus the height of the content area. | | onChange(callback: (width: number, height: number, mode: PanelMode) =&gt; void) | Triggered when the status of the panel changes. The returned height value is the height of the content area. When the value of **dragbar** is **true**, the height of the panel is the dragbar height plus the height of the content area. |
...@@ -88,8 +89,8 @@ struct PanelExample { ...@@ -88,8 +89,8 @@ struct PanelExample {
.type(PanelType.Foldable).mode(PanelMode.Half) .type(PanelType.Foldable).mode(PanelMode.Half)
.dragBar(true) // The dragbar is enabled by default. .dragBar(true) // The dragbar is enabled by default.
.halfHeight(500) // Half of the height by default .halfHeight(500) // Half of the height by default
.onChange((value: any) => { .onChange((width: number, height: number, mode: PanelMode) => {
console.info(`width:${value.width},height:${value.height},mode:${value.mode}`) console.info(`width:${width},height:${height},mode:${mode}`)
}) })
}.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 }) }.width('100%').height('100%').backgroundColor(0xDCDCDC).padding({ top: 5 })
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册