列表

要显示列表,我们使用组件列表。

const listJSON =  {
    "component": "list", //tells the component name
    "data": "@languages", // an array of list items
},

在这里,语言是一个简单的字符串数组。 languages = ["English", "Hindi", "French"]
如果要呈现对象列表,可以使用项目配置指定结构。

const listJSON =  {
    "component": "list", //tells the component name
    "data": "@projects", // an array of list items
    "itemConfig": { // used to define the structure of the list items.
    "component": "widget",
    "id": "checkbox_label"
    }
},

itemConfig通常为widget。 若要了解有关小组件的更多信息,请转到小组件

渲染的列表将如下所示:

列表

recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178