mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
126 lines
4.9 KiB
JSON
126 lines
4.9 KiB
JSON
{
|
|
"$id": "https://houtai.baidu.com/v2/schemas/form/group.json#",
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"allOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/form/group.json#/definitions/common"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"patternProperties": {
|
|
"^(\\$ref|label|remark|labelRemark|gap|desc|description|className|horizontal|mode|controls|visible|visibleOn|hidden|hiddenOn|required)$": {}
|
|
},
|
|
"properties": {
|
|
"$schema": {
|
|
"format": "uri",
|
|
"type": "string",
|
|
"description": "绑定 JSON 格式说明,可忽略!"
|
|
},
|
|
"type": {
|
|
"const": "group",
|
|
"description": "指定渲染器类型为表单 Input Group 类型,能让多个表单在一行。"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
]
|
|
}
|
|
],
|
|
"definitions": {
|
|
"common": {
|
|
"description": "AMis 表单集合渲染器格式说明,能让多个表单在一行显示",
|
|
"properties": {
|
|
"$ref": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
|
|
"description": "引用页面中的定义"
|
|
},
|
|
"className": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
"description": "配置容器 Group className"
|
|
},
|
|
"controls": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls",
|
|
"description": "FormItem 集合"
|
|
},
|
|
"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 表达式来配置当前表单项是否显示"
|
|
},
|
|
"label": {
|
|
"description": "描述标题",
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"enum": [
|
|
false
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"labelClassName": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
"description": "配置 label className"
|
|
},
|
|
"description": {
|
|
"description": "描述内容,支持 Html 片段。",
|
|
"type": "string"
|
|
},
|
|
"descriptionClassName": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
"description": "配置描述上的 className"
|
|
},
|
|
"horizontal": {
|
|
"additionalProperties": false,
|
|
"default": {
|
|
"left": 2
|
|
},
|
|
"description": "当表单的展示方式为水平方式时,用来控制 label 和 input 的宽度占比。",
|
|
"properties": {
|
|
"right": {
|
|
"type": "number"
|
|
},
|
|
"left": {
|
|
"type": "number"
|
|
},
|
|
"leftFixed": {
|
|
"oneOf": [
|
|
{
|
|
"type": ["string", "number"]
|
|
},
|
|
{
|
|
"type":"boolean"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"mode": {
|
|
"description": "配置当前表单项展示模式",
|
|
"type": "string",
|
|
"enum": [
|
|
"normal",
|
|
"inline",
|
|
"horizontal"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"test": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "group"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "AMis 表单集合渲染器格式说明,能让多个表单在一行显示",
|
|
"type": "object"
|
|
} |