forked from p96170835/amis
141 lines
5.2 KiB
JSON
141 lines
5.2 KiB
JSON
{
|
|
"$id": "https://houtai.baidu.com/v2/schemas/form/fieldSet.json#",
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"allOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/form/fieldSet.json#/definitions/common"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"patternProperties": {
|
|
"^(\\$ref|title|className|body|size|controls|collapsed|collapsable|mode|horizontal|hiddenOn|visibleOn|visible|hidden)$": {}
|
|
},
|
|
"properties": {
|
|
"$schema": {
|
|
"format": "uri",
|
|
"type": "string",
|
|
"description": "绑定 JSON 格式说明,可忽略!"
|
|
},
|
|
"type": {
|
|
"const": "fieldSet",
|
|
"description": "指定为 fieldSet 类型渲染器"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
}
|
|
],
|
|
"definitions": {
|
|
"common": {
|
|
"description": "AMis FieldSet 渲染器格式说明",
|
|
"properties": {
|
|
"$ref": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
|
|
"description": "引用页面中的定义"
|
|
},
|
|
"body": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container",
|
|
"title": "内容区域"
|
|
},
|
|
"className": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
"description": "配置容器 fieldSet className"
|
|
},
|
|
"collapsable": {
|
|
"type": "boolean",
|
|
"description": "是否可折叠"
|
|
},
|
|
"collapsed": {
|
|
"default": false,
|
|
"description": "是否默认收起来",
|
|
"type": "boolean"
|
|
},
|
|
"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 表达式来配置当前表单项是否隐藏。"
|
|
},
|
|
"hidden": {
|
|
"type": "boolean",
|
|
"description": "是否隐藏"
|
|
},
|
|
"title": {
|
|
"description": "标题",
|
|
"type": "string"
|
|
},
|
|
"visibleOn": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
|
|
"description": "通过 JS 表达式来配置当前表单项是否显示"
|
|
},
|
|
"visible": {
|
|
"type": "boolean",
|
|
"description": "是否显示"
|
|
},
|
|
"size": {
|
|
"description": "大小",
|
|
"enum": [
|
|
"xs",
|
|
"sm",
|
|
"md",
|
|
"lg"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"horizontal": {
|
|
"additionalProperties": false,
|
|
"default": {
|
|
"left": 2
|
|
},
|
|
"description": "当表单的展示方式为水平方式时,用来控制 label 和 input 的宽度占比。",
|
|
"properties": {
|
|
"left": {
|
|
"type": "number"
|
|
},
|
|
"leftFixed": {
|
|
"oneOf": [
|
|
{
|
|
"type":"string",
|
|
"const": [
|
|
"",
|
|
"xs",
|
|
"sm",
|
|
"md",
|
|
"lg"
|
|
]
|
|
},
|
|
{
|
|
"type":"boolean"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"mode": {
|
|
"description": "配置当前表单项展示模式",
|
|
"type": "string",
|
|
"enum": [
|
|
"normal",
|
|
"inline",
|
|
"horizontal"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"test": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "fieldSet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "AMis FieldSet 渲染器格式说明",
|
|
"type": "object"
|
|
} |