78 lines
2.1 KiB
JSON
78 lines
2.1 KiB
JSON
{
|
||
"$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"
|
||
}
|