forked from p96170835/amis
142 lines
4.6 KiB
JSON
142 lines
4.6 KiB
JSON
{
|
||
"$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"
|
||
}
|