2020-05-27 14:57:40 +08:00
|
|
|
|
{
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$id": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#",
|
|
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
|
"allOf": [
|
|
|
|
|
{
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/common"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"patternProperties": {
|
|
|
|
|
"^(\\$ref|label|closeOnOutside|closeOnClick|block|btnClassName|level|size|primary|tooltip|buttons|className|disabled|disabledOn|hiddenOn|hidden|visible|visbileOn)$": {}
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"$schema": {
|
|
|
|
|
"description": "绑定 JSON 格式说明,可忽略!",
|
|
|
|
|
"format": "uri",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"type": {
|
|
|
|
|
"const": "dropdown-button",
|
|
|
|
|
"description": "指定为 DropDown Button 类型"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"required": ["type"],
|
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"definitions": {
|
|
|
|
|
"common": {
|
|
|
|
|
"description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button",
|
|
|
|
|
"properties": {
|
|
|
|
|
"$ref": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
|
|
|
|
|
"description": "引用页面中的定义"
|
|
|
|
|
},
|
|
|
|
|
"block": {
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "是否独占一行 `display: block`",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"btnClassName": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
|
|
|
"description": "给 Button 配置 className。"
|
|
|
|
|
},
|
|
|
|
|
"buttons": {
|
|
|
|
|
"description": "按钮集合",
|
|
|
|
|
"items": {
|
|
|
|
|
"allOf": [
|
|
|
|
|
{
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction"
|
|
|
|
|
},
|
2020-05-27 14:57:40 +08:00
|
|
|
|
|
2020-08-21 15:28:22 +08:00
|
|
|
|
{
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"type": {
|
|
|
|
|
"const": "divider"
|
|
|
|
|
}
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"description": "分割符号"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"properties": {
|
|
|
|
|
"className": {
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
|
|
|
"description": "配置容器 className"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"icon": {
|
|
|
|
|
"description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/",
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "string"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"label": {
|
|
|
|
|
"description": "按钮名字",
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "string"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
}
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"type": "array"
|
|
|
|
|
},
|
|
|
|
|
"className": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
|
|
|
"description": "配置容器 className"
|
|
|
|
|
},
|
|
|
|
|
"disabled": {
|
|
|
|
|
"description": "是否为禁用状态。",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"disabledOn": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
|
|
|
|
|
"description": "通过 JS 表达式来配置当前表单项的禁用状态。"
|
|
|
|
|
},
|
|
|
|
|
"hiddenOn": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
|
|
|
|
|
"description": "通过 JS 表达式来配置当前表单项是否隐藏。"
|
|
|
|
|
},
|
|
|
|
|
"label": {
|
|
|
|
|
"description": "按钮文字",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"level": {
|
|
|
|
|
"description": "按钮级别",
|
|
|
|
|
"enum": ["info", "success", "warning", "danger", "link", "primary"],
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"primary": {
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "按钮是否为主按钮,影响样式。",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"size": {
|
|
|
|
|
"description": "按钮大小",
|
|
|
|
|
"enum": ["xs", "sm", "md", "lg", "", "base"],
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"tooltip": {
|
|
|
|
|
"description": "按钮提示文字,hover 时显示",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"type": {
|
|
|
|
|
"enum": ["dropdown-button"],
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"visibleOn": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
|
|
|
|
|
"description": "通过 JS 表达式来配置当前表单项是否显示"
|
|
|
|
|
},
|
|
|
|
|
"closeOnOutside": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"description": "点击外部是否关闭"
|
|
|
|
|
},
|
|
|
|
|
"closeOnClick": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"description": "点击内容是否关闭"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"type": "object"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"test": {
|
|
|
|
|
"properties": {
|
|
|
|
|
"type": {
|
|
|
|
|
"const": "dropdown-button"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"dependencies": {},
|
|
|
|
|
"description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button"
|
|
|
|
|
}
|