amis/schemas/button-group.json

86 lines
2.8 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
2020-08-21 15:28:22 +08:00
"$id": "https://houtai.baidu.com/v2/schemas/button-group.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/button-group.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|btnClassName|buttons|className|size|disabled|disabledOn|hiddenOn|hidden|visible|visbileOn)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"type": {
"const": "button-group",
"description": "指定为提交按钮类型"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
},
"required": ["type"],
"type": "object"
}
],
"definitions": {
"test": {
"properties": {
"type": {
"const": "button-group"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
}
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"common": {
"description": "amis Button Group 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#buttongroup",
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"btnClassName": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "给 Button 配置 className。"
},
"buttons": {
"description": "按钮集合",
"items": {
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#"
},
"type": "array"
},
"className": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 className"
},
"disabled": {
"description": "是否为禁用状态。",
"type": "boolean"
},
"disabledOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前表单项的禁用状态。"
},
"hiddenOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前表单项是否隐藏。"
},
"visibleOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前表单项是否显示"
},
"size": {
"description": "按钮大小",
"enum": ["xs", "sm", "md", "lg"],
"type": "string"
}
},
"type": "object"
}
},
"description": "amis Button Group 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#buttongroup",
"type": "object"
}