amis/schemas/form/radios.json
2020-09-03 11:45:31 +08:00

70 lines
2.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$id": "/schemas/form/radios.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "/schemas/form/radios.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|options|source|columnsCount|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|validations|validationErrors|validateOnChange|submitOnChange|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "radios",
"description": "指定为单选框"
}
},
"type": "object",
"required": ["type"]
}
],
"definitions": {
"common": {
"description": "单选框格式说明",
"allOf": [
{
"$ref": "/schemas/form.json#/definitions/item"
},
{
"properties": {
"$ref": {
"$ref": "/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"columnsCount": {
"default": 1,
"description": "每行显示多少个",
"type": "number"
},
"options": {
"$ref": "/schemas/form.json#/definitions/optionsType",
"description": "选项集合"
},
"source": {
"$ref": "/schemas/page.json#/definitions/api",
"description": "可用来通过 API 拉取 options。详情https://baidu.github.io/amis/docs/api#formitem也可以从当前作用域拉取数据 $typeOptions"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "radios"
}
}
}
},
"description": "单选框格式说明",
"type": "object"
}