amis/schemas/form/hbox.json
2020-05-27 14:57:40 +08:00

102 lines
3.6 KiB
JSON

{
"$id": "https://houtai.baidu.com/v2/schemas/form/hbox.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/text.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|columns|gap|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|visible|visibleOn|hidden|hiddenOn|required)$": {}
},
"properties": {
"$schema": {
"description": "绑定 JSON 格式说明,可忽略!",
"format": "uri",
"type": "string"
},
"type": {
"const": "hbox",
"description": "指定为hbox类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"column": {
"allOf": [
{
"oneOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer"
},
{
"type": "object",
"properties": {
"controls": {
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls",
"description": "FormItem 集合"
}
}
}
]
},
{
"$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn"
}
],
"description": "列"
},
"columns": {
"description": "列集合",
"items": {
"$ref": "https://houtai.baidu.com/v2/schemas/form/hbox.json#/definitions/column"
},
"type": "array"
},
"common": {
"description": "HBox 格式说明",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/item"
},
{
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"columns": {
"$ref": "https://houtai.baidu.com/v2/schemas/form/hbox.json#/definitions/columns",
"description": "列集合"
},
"gap": {
"type": "string",
"enum": [
"xs", "sm", ""
],
"description": "间隔大小"
}
},
"type": "object"
}
],
"type": "object"
},
"test": {
"properties": {
"type": {
"const": "hbox"
}
}
}
},
"description": "HBox 格式说明",
"type": "object"
}