amis/schemas/form/button.json

118 lines
4.6 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$id": "https://houtai.baidu.com/v2/schemas/form/button.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/button.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|icon|size|level|iconOnly|href|action|tooltip|tooltipPlacement|disabledTip|actionType|api|target|reload|url|link|dialog|drawer|content|feedback|confirmText|blank|nextCondition|name|value|placeholder|label|remark|labelRemark|desc|description|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "button",
"description": "指定为提交按钮类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "按钮格式说明",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/item"
},
{
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction"
},
{
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"icon": {
"description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/",
"type": "string"
},
"label": {
"description": "按钮名字",
"type": "string"
},
"level": {
"description": "按钮级别",
"enum": [
"info",
"success",
"warning",
"danger",
"link",
"primary"
],
"type": "string"
},
"size": {
"description": "按钮大小",
"enum": [
"xs",
"sm",
"md",
"lg"
],
"type": "string"
},
"href": {
"description": "链接",
"type": "string"
},
"feedback": {
"description": "请求返回的响应内部schema格式同dialog",
"type": "object"
},
"tooltip": {
"description": "按钮提示文字hover 时显示",
"type": "string"
},
"disabledTip": {
"description": "禁用时按钮提示文字hover 时显示",
"type": "string"
},
"tooltipPlacement": {
"default": "top",
"description": "按钮提示文字显示的位置",
"enum": [
"left",
"top",
"right",
"bottom"
],
"type": "string"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "button"
}
}
}
},
"description": "按钮格式说明",
"type": "object"
}