List
Introduction
The list widget is a user interface element that displays a group of related items. It helps users quickly browse, select, or manage items.
Configuration items
Categorization |
Configuration |
Example |
Description |
Content |
Data source |
|
The data source for the list. |
Primary key |
The primary key is a field that uniquely identifies each data record. It ensures data integrity and accuracy. |
||
Interaction |
Hide |
Controls the default display state of the list widget. If this parameter is set to |
|
Selectable |
Specifies whether data items can be selected and display a selected state. |
||
Default selection |
This takes effect when **Selectable** is enabled. The value is the primary key of the data item. |
||
Paging settings |
The paging configuration for the list. If enabled, paging is supported. |
||
Loading |
The loading state of the list. |
||
Style |
Height |
For more information, see Common properties |
|
Margin |
For more information, see Common properties |
||
Padding |
For more information, see Common properties |
||
List format |
The display format of the list. |
||
Line separator |
|
This takes effect in list mode. It specifies whether to use a line separator between data items. |
|
Columns |
This takes effect when **List format** is set to Grid. It specifies the number of data items to display in a row. |
||
Grid size |
This takes effect when **List format** is set to Grid. It specifies the spacing between data items. |
||
Empty state text |
The text to display when the list data source is empty. |
||
CSS style |
Overflow |
Sets the behavior for data that overflows the list. This corresponds to the CSS overflow property. For more information, see the MDN documentation |
|
Background color |
Sets the background color. This corresponds to the CSS background-color property. For more information, see the MDN documentation |
||
Background |
|
Sets various background properties, such as color, image, origin, size, and repeat. This corresponds to the CSS background property. For more information, see the MDN documentation |
|
Background image |
|
Sets one or more background images. This corresponds to the CSS background-image property. For more information, see the MDN documentation |
|
Shadow |
|
Sets a shadow effect. This corresponds to the CSS box-shadow property. For more information, see the MDN documentation |
|
Top border |
Sets the top border properties. This corresponds to the CSS border-top property. For more information, see the MDN documentation |
||
Bottom border |
Sets the bottom border properties. This corresponds to the CSS border-bottom property. For more information, see the MDN documentation |
||
Left border |
Sets the left border properties. This corresponds to the CSS border-left property. For more information, see the MDN documentation |
||
Right border |
Sets the right border properties. This corresponds to the CSS border-right property. For more information, see the MDN documentation |
||
Border radius |
The border radius of the list widget. This corresponds to the CSS border-radius property. For more information, see the MDN documentation |
||
Border |
The border of the list widget. This corresponds to the CSS border property. For more information, see the MDN documentation |
||
Selected state background color |
This takes effect when **Selectable** is set to |
||
Selected state hover background color |
|
This takes effect when **Selectable** is set to |
Properties and methods
Name |
Type |
Example |
Description |
dataSource |
array |
|
The data source of the current list widget. |
loading |
boolean |
|
The loading state of the current list widget. |
selectedKey |
string |
|
The primary key value of the currently selected data item. |
pagination |
object |
|
Read-only. The paging information of the current list widget. |
setDataSource |
func |
|
Sets the data for the list widget to |
clearDataSource |
func |
|
Clears the data from the list widget. |
setLoading |
func |
|
Sets the loading state of the list widget. The parameter value can be |
clearLoading |
func |
|
Clears the loading state of the list widget. |
setSelectedKey |
func |
|
Sets the primary key of the selected data item in the list widget to |
clearSelectedKey |
func |
|
Clears the primary key of the selected data item in the list widget. |
Event callbacks
Configuration |
Description |
The event that is triggered when a list item is clicked. |





