Bricks Schema 中文文档:边框控件

📄 原始资料  |  展开查看原始 JSON(border.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://controls/border”, “schemaVersion”: “2.3”, “title”: “Border Control”, “description”: “Border settings”, “controlProperties”: [ “type”, “label”, “group”, “css”, “hasRequired”, “ta…

📄 原始资料  |  展开查看原始 JSON(border.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/border",
  "schemaVersion": "2.3",
  "title": "Border Control",
  "description": "Border settings",
  "controlProperties": [
    "type",
    "label",
    "group",
    "css",
    "hasRequired",
    "tab",
    "deprecated",
    "inline"
  ],
  "type": "object",
  "properties": {
    "width": {
      "type": "object",
      "description": "Spacing value with directional properties",
      "properties": {
        "top": {
          "type": "string",
          "description": "Top spacing value with unit",
          "descriptionZh": "顶部间距值(带单位)。"
        },
        "right": {
          "type": "string",
          "description": "Right spacing value with unit",
          "descriptionZh": "右侧间距值(带单位)。"
        },
        "bottom": {
          "type": "string",
          "description": "Bottom spacing value with unit",
          "descriptionZh": "底部间距值(带单位)。"
        },
        "left": {
          "type": "string",
          "description": "Left spacing value with unit",
          "descriptionZh": "左侧间距值(带单位)。"
        }
      },
      "additionalProperties": false,
      "descriptionZh": "带方向属性的间距值。"
    },
    "style": {
      "type": "string",
      "enum": [
        "none",
        "solid",
        "dashed",
        "dotted",
        "double",
        "groove",
        "ridge",
        "inset",
        "outset"
      ]
    },
    "color": {
      "description": "Color value in various formats",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "hex": {
              "type": "string",
              "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
            }
          },
          "required": [
            "hex"
          ]
        },
        {
          "type": "object",
          "properties": {
            "rgb": {
              "type": "string",
              "pattern": "^rgba?\\("
            }
          },
          "required": [
            "rgb"
          ]
        },
        {
          "type": "object",
          "properties": {
            "hsl": {
              "type": "string",
              "pattern": "^hsla?\\("
            }
          },
          "required": [
            "hsl"
          ]
        },
        {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "Raw color value or CSS variable",
              "descriptionZh": "原始颜色值或 CSS 变量。"
            }
          },
          "required": [
            "raw"
          ]
        }
      ],
      "descriptionZh": "各种格式的颜色值。"
    },
    "radius": {
      "type": "object",
      "description": "Spacing value with directional properties",
      "properties": {
        "top": {
          "type": "string",
          "description": "Top spacing value with unit",
          "descriptionZh": "顶部间距值(带单位)。"
        },
        "right": {
          "type": "string",
          "description": "Right spacing value with unit",
          "descriptionZh": "右侧间距值(带单位)。"
        },
        "bottom": {
          "type": "string",
          "description": "Bottom spacing value with unit",
          "descriptionZh": "底部间距值(带单位)。"
        },
        "left": {
          "type": "string",
          "description": "Left spacing value with unit",
          "descriptionZh": "左侧间距值(带单位)。"
        }
      },
      "additionalProperties": false,
      "descriptionZh": "带方向属性的间距值。"
    }
  },
  "titleZh": "边框控件",
  "descriptionZh": "边框设置。"
}

前言

边框设置。

基本信息

  • 英文名称Border Control
  • 中文名称:边框控件
  • Schema IDbricks://controls/border
  • Schema 版本2.3
  • 类型object

属性

  • width (object):带方向属性的间距值。
  • style (string)
  • color:各种格式的颜色值。
  • radius (object):带方向属性的间距值。

Schema 定义

完整 JSON 定义

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/border",
  "schemaVersion": "2.3",
  "title": "Border Control",
  "description": "Border settings",
  "controlProperties": [
    "type",
    "label",
    "group",
    "css",
    "hasRequired",
    "tab",
    "deprecated",
    "inline"
  ],
  "type": "object",
  "properties": {
    "width": {
      "type": "object",
      "description": "Spacing value with directional properties",
      "properties": {
        "top": {
          "type": "string",
          "description": "Top spacing value with unit",
          "descriptionZh": "顶部间距值(带单位)。"
        },
        "right": {
          "type": "string",
          "description": "Right spacing value with unit",
          "descriptionZh": "右侧间距值(带单位)。"
        },
        "bottom": {
          "type": "string",
          "description": "Bottom spacing value with unit",
          "descriptionZh": "底部间距值(带单位)。"
        },
        "left": {
          "type": "string",
          "description": "Left spacing value with unit",
          "descriptionZh": "左侧间距值(带单位)。"
        }
      },
      "additionalProperties": false,
      "descriptionZh": "带方向属性的间距值。"
    },
    "style": {
      "type": "string",
      "enum": [
        "none",
        "solid",
        "dashed",
        "dotted",
        "double",
        "groove",
        "ridge",
        "inset",
        "outset"
      ]
    },
    "color": {
      "description": "Color value in various formats",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "hex": {
              "type": "string",
              "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
            }
          },
          "required": [
            "hex"
          ]
        },
        {
          "type": "object",
          "properties": {
            "rgb": {
              "type": "string",
              "pattern": "^rgba?\\("
            }
          },
          "required": [
            "rgb"
          ]
        },
        {
          "type": "object",
          "properties": {
            "hsl": {
              "type": "string",
              "pattern": "^hsla?\\("
            }
          },
          "required": [
            "hsl"
          ]
        },
        {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "Raw color value or CSS variable",
              "descriptionZh": "原始颜色值或 CSS 变量。"
            }
          },
          "required": [
            "raw"
          ]
        }
      ],
      "descriptionZh": "各种格式的颜色值。"
    },
    "radius": {
      "type": "object",
      "description": "Spacing value with directional properties",
      "properties": {
        "top": {
          "type": "string",
          "description": "Top spacing value with unit",
          "descriptionZh": "顶部间距值(带单位)。"
        },
        "right": {
          "type": "string",
          "description": "Right spacing value with unit",
          "descriptionZh": "右侧间距值(带单位)。"
        },
        "bottom": {
          "type": "string",
          "description": "Bottom spacing value with unit",
          "descriptionZh": "底部间距值(带单位)。"
        },
        "left": {
          "type": "string",
          "description": "Left spacing value with unit",
          "descriptionZh": "左侧间距值(带单位)。"
        }
      },
      "additionalProperties": false,
      "descriptionZh": "带方向属性的间距值。"
    }
  },
  "titleZh": "边框控件",
  "descriptionZh": "边框设置。"
}

补充说明

更多细节可参考 Bricks 官方 Academy 文档