From acf2a957fffef153be68746533e5e8ba09cdc9a8 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Tue, 16 May 2023 09:01:28 +0800 Subject: [PATCH] Update docs (17267) Signed-off-by: ester.zhou --- .../reference/arkui-ts/ts-container-panel.md | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/en/application-dev/reference/arkui-ts/ts-container-panel.md b/en/application-dev/reference/arkui-ts/ts-container-panel.md index f67b201b35..5b7e99a535 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-panel.md +++ b/en/application-dev/reference/arkui-ts/ts-container-panel.md @@ -11,6 +11,10 @@ The **** component is a slidable panel that presents lightweight content Supported +> **NOTE** +> +> Built-in components and custom components are allowed, with support for ([if/else](../../quick-start/arkts-rendering-control-ifelse.md), [ForEach](../../quick-start/arkts-rendering-control-foreach.md), and [LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md)) rendering control. + ## APIs @@ -20,19 +24,20 @@ Panel(show: boolean) | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| show | boolean | Yes| Whether the panel is shown.| - +| show | boolean | Yes| Whether the panel is shown.
**NOTE**
The panel is hidden and does not take up space in the layout if this parameter is set to **false** or [Visible.None](ts-universal-attributes-visibility.md) is set.| ## Attributes +In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. + | Name| Type| Description| | -------- | -------- | -------- | | type | [PanelType](#paneltype)| Type of the panel.
Default value: **PanelType.Foldable**| -| mode | [PanelMode](#panelmode) | Initial status of the panel.| +| mode | [PanelMode](#panelmode) | Initial status of the panel.
Default value for the Minibar type: **PanelMode.Mini**
Default value for other types: **PanelMode.Half** | | dragBar | boolean | Whether to enable a drag bar. The value **true** means that the drag bar will be displayed, and **false** means the opposite.
Default value: **true**| -| fullHeight | string \| number | Panel height in the **PanelMode.Full** mode.| -| halfHeight | string \| number | Panel height in the **PanelMode.Half** mode. The default value is half of the screen height.| -| miniHeight | string \| number | Panel height in the **PanelMode.Mini** mode.| +| fullHeight | string \| number | Panel height in the **PanelMode.Full** mode.
Default value: main axis height of the panel minus 8 vp
**NOTE**
This attribute cannot be set in percentage.| +| halfHeight | string \| number | Panel height in the **PanelMode.Half** mode.
Default value: half of the main axis height of the panel
**NOTE**
This attribute cannot be set in percentage.| +| miniHeight | string \| number | Panel height in the **PanelMode.Mini** mode.
Default value: **48**
Unit: vp
**NOTE**
This attribute cannot be set in percentage.| | show | boolean | Whether to show the panel.| | backgroundMask9+|[ResourceColor](ts-types.md#resourcecolor)|Background mask of the panel.| @@ -52,9 +57,10 @@ Panel(show: boolean) | Half | Displays a **foldable** or **temporary** panel in a medium-sized (halfscreen-like) area. This attribute does not take effect for **minibar** panels.| | Full | Displays a panel in a large (fullscreen-like) area.| - ## Events +In addition to the [universal events](ts-universal-events-click.md), the following events are supported. + | Name| Description| | -------- | -------- | | onChange(event: (width: number, height: number, mode: PanelMode) => 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 panel height is the sum of the drag bar height and content area height.| -- GitLab