forked from p96170835/amis
125 lines
5.7 KiB
JSON
125 lines
5.7 KiB
JSON
|
{
|
||
|
"$id": "https://houtai.baidu.com/v2/schemas/form/button-group.json#",
|
||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
|
"allOf": [
|
||
|
{
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/form/button-group.json#/definitions/common"
|
||
|
},
|
||
|
{
|
||
|
"additionalProperties": false,
|
||
|
"patternProperties": {
|
||
|
"^(\\$ref|buttons|source|options|clearable|size|btnClassName|btnActiveClassName|vertical|multiple|joinValues|delimiter|extractValue|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|validations|validationErrors|validateOnChange|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {}
|
||
|
},
|
||
|
"properties": {
|
||
|
"$schema": {
|
||
|
"format": "uri",
|
||
|
"type": "string",
|
||
|
"description": "绑定 JSON 格式说明,可忽略!"
|
||
|
},
|
||
|
"type": {
|
||
|
"const": "button-group",
|
||
|
"description": "指定为按钮组"
|
||
|
}
|
||
|
},
|
||
|
"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": "引用页面中的定义"
|
||
|
},
|
||
|
"source": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
|
||
|
"description": "获取选项的接口"
|
||
|
},
|
||
|
"btnActiveClassName": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
||
|
"default": "btn-default active",
|
||
|
"description": "配置选中按钮 className"
|
||
|
},
|
||
|
"btnClassName": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
||
|
"default": "btn-default",
|
||
|
"description": "配置按钮 className"
|
||
|
},
|
||
|
"buttons": {
|
||
|
"description": "按钮集合",
|
||
|
"items": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#"
|
||
|
},
|
||
|
"type": "array"
|
||
|
},
|
||
|
"className": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
||
|
"description": "配置 dom className"
|
||
|
},
|
||
|
"clearable": {
|
||
|
"default": false,
|
||
|
"description": "是否可清空",
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"options": {
|
||
|
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/optionsType",
|
||
|
"description": "选项集合"
|
||
|
},
|
||
|
"multiple": {
|
||
|
"default": false,
|
||
|
"description": "是否为多选",
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"joinValues": {
|
||
|
"default": true,
|
||
|
"description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。",
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"delimiter": {
|
||
|
"default": ",",
|
||
|
"description": "分割符",
|
||
|
"type": "string"
|
||
|
},
|
||
|
"extractValue": {
|
||
|
"default": true,
|
||
|
"description": "开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。",
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"vertical": {
|
||
|
"default": "false",
|
||
|
"description": "垂直排列",
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
"size": {
|
||
|
"default": "md",
|
||
|
"description": "设置大小",
|
||
|
"enum": [
|
||
|
"xs",
|
||
|
"sm",
|
||
|
"md",
|
||
|
"lg"
|
||
|
],
|
||
|
"type": "string"
|
||
|
}
|
||
|
},
|
||
|
"type": "object"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"test": {
|
||
|
"properties": {
|
||
|
"type": {
|
||
|
"const": "button-group"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"description": "按钮组格式说明",
|
||
|
"type": "object"
|
||
|
}
|