amis/schemas/nav.json

78 lines
2.1 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/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"
}