amis/schemas/nav.json

79 lines
2.8 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
"$id": "https://houtai.baidu.com/v2/schemas/nav.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/common"
},
{
"additionalProperties": false,
"dependencies": {},
"patternProperties": {
"^(\\$ref|className|stacked|links)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "nav",
"description": "指定为导航类型",
"type": "string"
}
},
"required": [
"type"
]
}
],
"definitions": {
"common": {
"description": "AMis Nav 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#nav",
"properties": {
"className": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 className"
},
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"links": {
"items": {
"properties": {
"icon": {
"description": "图标类名,参考 fontawesome。",
"type": "string"
},
"label": {
"description": "文字说明",
"type": "string"
},
"to": {
"description": "Link 地址。",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"stacked": {
"description": "true 为垂直排列false 为水平排列类似如 tabs。",
"type": "boolean"
}
}
},
"test": {
"properties": {
"type": {
"enum": ["nav", "navigation"]
}
}
}
},
"description": "AMis Nav 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#nav",
"type": "object"
}