mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
166 lines
7.4 KiB
JSON
166 lines
7.4 KiB
JSON
{
|
||
"$id": "https://houtai.baidu.com/v2/schemas/form/combo.json#",
|
||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
"allOf": [
|
||
{
|
||
"$ref": "https://houtai.baidu.com/v2/schemas/form/combo.json#/definitions/common"
|
||
},
|
||
{
|
||
"additionalProperties": false,
|
||
"patternProperties": {
|
||
"^(\\$ref|addButtonClassName|addButtonText|addable|controls|draggable|maxLength|minLength|multiLine|removeAble|subFormMode|flat|conditions|formClassName|typeSwitchable|deleteApi|deleteConfirmText|noBorder|dragIcon|deleteIcon|scaffold|multiple|joinValues|delimiter|extractValue|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": "combo",
|
||
"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"
|
||
},
|
||
"controls": {
|
||
"description": "数组输入框的子项",
|
||
"items": {
|
||
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controlItem"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"delimiter": {
|
||
"default": ",",
|
||
"description": "当扁平化开启并且joinValues为true时,用什么分隔符",
|
||
"type": "string"
|
||
},
|
||
"draggable": {
|
||
"description": "是否可拖拽排序",
|
||
"type": "boolean"
|
||
},
|
||
"flat": {
|
||
"default": false,
|
||
"description": "是否将结果扁平化(去掉name),只有当controls的length为1且multiple为true的时候才有效",
|
||
"type": "boolean"
|
||
},
|
||
"joinValues": {
|
||
"default": true,
|
||
"description": "当扁平化开启的时候,是否用分隔符的形式发送给后端,否则采用array的方式",
|
||
"type": "boolean"
|
||
},
|
||
"maxLength": {
|
||
"description": "限制最大个数",
|
||
"type": "number"
|
||
},
|
||
"minLength": {
|
||
"description": "限制最小个数",
|
||
"type": "number"
|
||
},
|
||
"multiLine": {
|
||
"default": false,
|
||
"description": "是否多行模式,默认一行展示完",
|
||
"type": "boolean"
|
||
},
|
||
"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": "combo"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"description": "数组输入框框格式说明",
|
||
"type": "object"
|
||
} |