amis/schemas/form/tabs.json
2020-05-27 14:57:40 +08:00

147 lines
5.8 KiB
JSON
Raw 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/tabs.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/tabs.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|className|hiddenOn|tabClassName|tabs|visibleOn|visible|hidden)$": {}
},
"properties": {
"$schema": {
"description": "绑定 JSON 格式说明,可忽略!",
"format": "uri",
"type": "string"
},
"type": {
"const": "tabs",
"description": "指定当前 JSON 为 tabs 渲染器。"
}
},
"required": [
"type"
]
}
],
"definitions": {
"common": {
"description": "AMis Tabs 渲染器格式说明",
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"className": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 Tabs className"
},
"hiddenOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前表单项是否隐藏。"
},
"tabClassName": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 Tab className"
},
"tabs": {
"description": "选项卡信息",
"items": {
"$ref": "https://houtai.baidu.com/v2/schemas/form/tabs.json#/definitions/tab",
"type": ["object"]
},
"type": "array"
},
"visibleOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前表单项是否显示"
}
},
"type": "object"
},
"tab": {
"additionalProperties": false,
"properties": {
"body": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container",
"title": "内容区域"
},
"className": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 fieldSet className"
},
"controls": {
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls",
"description": "FormItem 集合"
},
"disabledOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前 Tab 是否禁用。"
},
"hiddenOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前 Tab 是否隐藏。"
},
"horizontal": {
"additionalProperties": false,
"default": {
"left": "col-sm-2",
"offset": "col-sm-offset-2",
"right": "col-sm-10"
},
"description": "当 mode 为 horizontal 时有用,用来控制 label 和 input 的宽度占比。",
"properties": {
"left": {
"type": "string"
},
"offset": {
"type": "string"
},
"right": {
"type": "string"
}
},
"type": "object"
},
"icon": {
"description": "图标",
"type": "string"
},
"mode": {
"default": "normal",
"description": "表单展示方式可以是normal、horizontal 或者 inline。示例https://baidu.github.io/amis/docs/demo/forms/mode",
"enum": [
"normal",
"horizontal",
"inline"
],
"type": "string"
},
"title": {
"description": "标题",
"type": "string"
},
"hash": {
"description": "链接中的hash",
"type": "string"
},
"visibleOn": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression",
"description": "通过 JS 表达式来配置当前 Tab 是否显示"
}
},
"type": "object"
},
"test": {
"properties": {
"type": {
"const": "tabs"
}
}
}
},
"description": "AMis Tabs 渲染器格式说明",
"type": "object"
}