> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The **<List>** component provides a list container that presents a series of list items arranged in a column with the same width. It supports presentations of the same type of data in a multiple and coherent row style, for example, images or text.
The **List** component provides a list container that presents a series of list items arranged in a column with the same width. It supports presentation of the same type of data in a multiple and coherent row style, for example, images or text.
## Required Permissions
...
...
@@ -23,7 +23,7 @@ This component contains the child component [<ListItem>](ts-container-listitem.m
| space | number | No | 0 | Spacing between list items. |
| initialIndex | number | No | 0 | Item displayed at the beginning of the component when the current list is loaded for the first time, that is, the first item to be displayed. If the configured sequence number is greater than the sequence number of the last item, the setting does not take effect. |
| editMode | boolean | false | Whether the **<List>** component is in editable mode. |
| edgeEffect | EdgeEffect | EdgeEffect.Spring | Sliding effect. For details, see EdgeEffect enums. |
| chainAnimation | boolean | false | Whether to display chained animations on this list when it slides or its top and bottom are dragged. The list items are separated with even space, and one item animation starts after the previous animation during basic sliding interactions. The chained animation effect is similar with spring physics.<br/>- **false**: No chained animations are displayed.<br/>- **true**: Chained animations are displayed. |
| multiSelectable<sup>8+</sup> | boolean | false | Whether to enable mouse frame selection.<br/>- **false**: The mouse frame selection is disabled.<br/>- **true**: The mouse frame selection is disabled. |
| restoreId<sup>8+</sup> | number | - | Migration ID of the component. During application migration, the status of the component is migrated to the component with the same migration ID on the peer end.<br/>For a **<List>** component, the status includes the item serial number displayed at the start position. |
| multiSelectable<sup>8+</sup> | boolean | false | Whether to enable mouse frame selection.<br/>- **false**: The mouse frame selection is disabled.<br/>- **true**: The mouse frame selection is enabled. |
| restoreId<sup>8+</sup> | number | - | Migration ID of the component. During application migration, the status of the component is migrated to the component with the same migration ID on the peer end.<br/>For a **List** component, the status includes the item serial number displayed at the start position. |
- EdgeEffect enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| Spring | Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by touching the knob of the scrollbar. After you release your hand, the knob is rebounded. |
| None | No effect after the scroll bar is moved to the edge. |
| onItemDelete(index: number) => boolean | Triggered when a list item is deleted. |
| onScrollIndex(firstIndex: number, lastIndex: number) => void | Triggered when the start position and end position of the current list are changed. |
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...
...
@@ -27,12 +27,12 @@ ListItem()
| Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- |
| sticky | Sticky | Sticky.None | Sticky effect of the list item. For details, see Sticky enums. |
| sticky | Sticky | Sticky.None | Sticky effect of the list item. For details, see **Sticky** enums. |
| editable | boolean | false | Whether the list item is editable. A list item can be deleted in editing mode. |
| selectable<sup>8+</sup> | boolean | true | Whether the current **<ListItem>** is selectable by the mouse.<br/>> ![icon-note.gif](public_sys-resources/icon-note.gif)**NOTE**<br/>> This attribute takes effect only when mouse frame selection is enabled for the parent **<List>** container. |
| selectable<sup>8+</sup> | boolean | true | Whether the current **ListItem;** is selectable by the mouse.<br/>**NOTE**<br/>This attribute takes effect only when mouse frame selection is enabled for the parent **<List>** container. |
- Sticky enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| None | No sticky. |
| Normal | The list item is sticky. |
...
...
@@ -40,7 +40,7 @@ ListItem()
## Events
| Name | Description |
| Name | Description |
| -------- | -------- |
| onSelect(callback: (isSelected: boolean) => any)<sup>8+</sup> | Triggered when the selected state of the **<ListItem>** changes.<br/>**isSelected**: Returns **true** if the **<ListItem>** is selected by the mouse; returns **false** otherwise. |
| target | string | Yes | - | Path of the target page to be redirected to. |
| type | NavigationType | No | NavigationType.Push | Navigation type. |
...
...
@@ -40,9 +40,9 @@ Creates a navigator.
## Attributes
| Name | Parameters | Default Value | Description |
| Name | Parameters | Default Value | Description |
| -------- | -------- | -------- | -------- |
| active | boolean | - | Whether the **<Navigator>** component is activated. If the component is activated, the corresponding navigation takes effect. |
| active | boolean | - | Whether the **Navigator** component is activated. If the component is activated, the corresponding navigation takes effect. |
| params | Object | undefined | Data that needs to be passed to the target page during redirection. You can use **router.getParams()** to obtain the data on the target page. |