Astra GateEnglish

List

v2 插件界面组件 List(数据)的属性、子节点与示例

分组:数据 · 子节点:不接受子节点

属性

属性类型
itemsJSON
sourceJSON
selectablenone · single · multiple
selectedJSON
reorderable布尔
empty节点
dense布尔
onSelect动作
onReorder动作
onVisible动作
onItemPress动作
onItemAction动作

另有所有组件都有的通用属性。动作类型的属性写动作名,或 { action, args }。

示例

组件画廊和两端比对用的就是这棵树:

代码json
{
  "type": "List",
  "props": {
    "items": [
      {
        "key": "a",
        "title": "secret",
        "detail": "12 hits",
        "icon": "shield"
      },
      {
        "key": "b",
        "title": "password",
        "detail": "3 hits",
        "icon": "shield"
      },
      {
        "key": "c",
        "title": "api key",
        "detail": "no hits",
        "icon": "shield"
      }
    ],
    "onItemPress": "open"
  }
}