amis/schemas/form/array.json

146 lines
6.2 KiB
JSON
Raw Permalink Normal View History

2020-05-27 14:57:40 +08:00
{
"$id": "https://houtai.baidu.com/v2/schemas/form/array.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/array.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|addButtonClassName|addButtonText|addable|items|draggable|maxLength|minLength|removeAble|subFormMode|conditions|formClassName|typeSwitchable|deleteApi|deleteConfirmText|noBorder|dragIcon|deleteIcon|scaffold|multiple|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": "array",
"description": "指定为数组输入框类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "数组输入框框格式说明",
"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": "引用页面中的定义"
},
"scaffold": {
"description": "单组表单项初始值。默认为 `{}`",
"type": "object"
},
"deleteIcon": {
"description": "删除按钮的图标",
"type": "string"
},
"dragIcon": {
"description": "拖动按钮的图标",
"type": "string"
},
"noBorder": {
"default": "true",
"description": "是否含有边框",
"type": "boolean"
},
"deleteConfirmText": {
"description": "确认删除时的提示",
"type": "string"
},
"deleteApi": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
"description": "删除时调用的api"
},
"typeSwitchable": {
"default": "false",
"description": "是否可切换条件,配合`conditions`使用",
"type": "boolean"
},
"conditions": {
"description": "符合某类条件后才渲染的schema",
"type": "array"
},
"formClassName": {
"description": "内部单组表单项的类名",
"type": "string"
},
"addButtonClassName": {
"description": "新增按钮CSS类名",
"type": "string"
},
"addButtonText": {
"default": "新增",
"description": "新增按钮文字",
"type": "string"
},
"addable": {
"description": "是否可新增",
"type": "boolean"
},
"items": {
"description": "数组输入框的子项",
"items": {
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controlItem"
},
"type": "array"
},
"draggable": {
"description": "是否可拖拽排序",
"type": "boolean"
},
"maxLength": {
"description": "限制最大个数",
"type": "number"
},
"minLength": {
"description": "限制最小个数",
"type": "number"
},
"multiple": {
"description": "是否可多选",
"type": "boolean"
},
"removeAble": {
"description": "是否可删除",
"type": "boolean"
},
"subFormMode": {
"default": "normal",
"description": "设置 form 的模式",
"enum": [
"normal",
"horizontal",
"inline"
],
"type": "string"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "array"
}
}
}
},
"description": "数组输入框框格式说明",
"type": "object"
}