Astra GateEnglish

Group

v2 插件界面组件 Group(布局)的属性、子节点与示例

分组:布局 · 子节点:任意多个子节点

可以作为 tray.panel 的根节点。

属性

属性类型
title文本
description文本
footer文本
actions节点数组
dense布尔

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

示例

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

代码json
{
  "type": "Group",
  "props": {
    "title": "Detection",
    "description": "What counts as a hit",
    "footer": "Applies to every request"
  },
  "children": [
    {
      "type": "Row",
      "props": {
        "label": "Case sensitive"
      },
      "children": [
        {
          "type": "Switch",
          "props": {
            "name": "case",
            "checked": false
          }
        }
      ]
    },
    {
      "type": "Row",
      "props": {
        "label": "Action",
        "detail": "When a word is found"
      },
      "children": [
        {
          "type": "Segmented",
          "props": {
            "name": "action",
            "value": "mask",
            "options": [
              {
                "value": "mask",
                "label": "Mask"
              },
              {
                "value": "reject",
                "label": "Reject"
              }
            ]
          }
        }
      ]
    }
  ]
}