mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
89 lines
3.9 KiB
JSON
89 lines
3.9 KiB
JSON
{
|
||
"$id": "https://houtai.baidu.com/v2/schemas/form/checkboxes.json#",
|
||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
"allOf": [
|
||
{
|
||
"$ref": "https://houtai.baidu.com/v2/schemas/form/checkboxes.json#/definitions/common"
|
||
},
|
||
{
|
||
"additionalProperties": false,
|
||
"patternProperties": {
|
||
"^(\\$ref|options|source|defaultCheckAll|checkAll|joinValues|delimiter|columnsCount|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": "checkboxes",
|
||
"description": "指定为复选框"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"type"
|
||
]
|
||
}
|
||
],
|
||
"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": "引用页面中的定义"
|
||
},
|
||
"checkAll": {
|
||
"description": "是否开启全选功能",
|
||
"type": "boolean"
|
||
},
|
||
"defaultCheckAll": {
|
||
"description": "是否默认全选",
|
||
"type": "boolean"
|
||
},
|
||
"columnsCount": {
|
||
"default": 1,
|
||
"description": "每行显示多少个",
|
||
"type": "number"
|
||
},
|
||
"delimiter": {
|
||
"default": ",",
|
||
"description": "分割符",
|
||
"type": "string"
|
||
},
|
||
"joinValues": {
|
||
"default": false,
|
||
"description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。",
|
||
"type": "boolean"
|
||
},
|
||
"options": {
|
||
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/optionsType",
|
||
"description": "选项集合"
|
||
},
|
||
"source": {
|
||
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
|
||
"description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem ,也可以从当前作用域拉取数据 $typeOptions"
|
||
}
|
||
},
|
||
"type": "object"
|
||
}
|
||
]
|
||
},
|
||
"test": {
|
||
"properties": {
|
||
"type": {
|
||
"const": "checkboxes"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"description": "复选框格式说明",
|
||
"type": "object"
|
||
} |