amis/schemas/button-group.json

86 lines
2.6 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
2020-09-03 11:45:31 +08:00
"$id": "/schemas/button-group.json#",
2020-08-21 15:28:22 +08:00
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/button-group.json#/definitions/common"
2020-08-21 15:28:22 +08:00
},
{
"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": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/$ref",
2020-08-21 15:28:22 +08:00
"description": "引用页面中的定义"
},
"btnClassName": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/className",
2020-08-21 15:28:22 +08:00
"description": "给 Button 配置 className。"
},
"buttons": {
"description": "按钮集合",
"items": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/action.json#"
2020-08-21 15:28:22 +08:00
},
"type": "array"
},
"className": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/className",
2020-08-21 15:28:22 +08:00
"description": "配置容器 className"
},
"disabled": {
"description": "是否为禁用状态。",
"type": "boolean"
},
"disabledOn": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/expression",
2020-08-21 15:28:22 +08:00
"description": "通过 JS 表达式来配置当前表单项的禁用状态。"
},
"hiddenOn": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/expression",
2020-08-21 15:28:22 +08:00
"description": "通过 JS 表达式来配置当前表单项是否隐藏。"
},
"visibleOn": {
2020-09-03 11:45:31 +08:00
"$ref": "/schemas/page.json#/definitions/expression",
2020-08-21 15:28:22 +08:00
"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"
}