{ "$id": "/schemas/dropdown-button.json#", "$schema": "http://json-schema.org/draft-07/schema#", "allOf": [ { "$ref": "/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 类型" } }, "required": ["type"], "type": "object" } ], "definitions": { "common": { "description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button", "properties": { "$ref": { "$ref": "/schemas/page.json#/definitions/$ref", "description": "引用页面中的定义" }, "block": { "default": false, "description": "是否独占一行 `display: block`", "type": "boolean" }, "btnClassName": { "$ref": "/schemas/page.json#/definitions/className", "description": "给 Button 配置 className。" }, "buttons": { "description": "按钮集合", "items": { "allOf": [ { "oneOf": [ { "$ref": "/schemas/action.json#/definitions/baseAction" }, { "type": "object", "properties": { "type": { "const": "divider" } }, "additionalProperties": false, "description": "分割符号" } ] }, { "properties": { "className": { "$ref": "/schemas/page.json#/definitions/className", "description": "配置容器 className" }, "icon": { "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", "type": "string" }, "label": { "description": "按钮名字", "type": "string" } }, "type": "object" } ] }, "type": "array" }, "className": { "$ref": "/schemas/page.json#/definitions/className", "description": "配置容器 className" }, "disabled": { "description": "是否为禁用状态。", "type": "boolean" }, "disabledOn": { "$ref": "/schemas/page.json#/definitions/expression", "description": "通过 JS 表达式来配置当前表单项的禁用状态。" }, "hiddenOn": { "$ref": "/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": "/schemas/page.json#/definitions/expression", "description": "通过 JS 表达式来配置当前表单项是否显示" }, "closeOnOutside": { "type": "boolean", "description": "点击外部是否关闭" }, "closeOnClick": { "type": "boolean", "description": "点击内容是否关闭" } }, "type": "object" }, "test": { "properties": { "type": { "const": "dropdown-button" } } } }, "dependencies": {}, "description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button" }