amis/schemas/card.json
2020-09-03 11:45:31 +08:00

92 lines
2.4 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": "/schemas/card.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "/schemas/card.json#/definitions/common"
},
{
"additionalProperties": false,
"dependencies": {},
"patternProperties": {
"^(\\$ref|name|className|header|body|bodyClassName|actions)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "card",
"description": "指定为 card 类型",
"type": "string"
}
},
"required": ["type"],
"type": "object"
}
],
"definitions": {
"common": {
"description": "amis Card 渲染器格式说明。https://baidu.github.io/amis/docs/renderers/Card",
"properties": {
"$ref": {
"$ref": "/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"className": {
"$ref": "/schemas/page.json#/definitions/className",
"description": "配置容器 className"
},
"header": {
"description": "头部内容设置",
"type": "object"
},
"header": {
"properties": {
"className": {
"description": "类名",
"type": "string"
},
"title": {
"description": "标题",
"type": "string"
},
"subTitle": {
"description": "副标题",
"type": "string"
},
"avatar": {
"description": "图片",
"type": "string"
},
"avatarClassName": {
"description": "图片类名",
"type": "string"
},
"highlight": {
"description": "是否点亮",
"type": "boolean"
}
},
"type": "object"
},
"actions": {
"description": "按钮",
"type": "array"
}
}
},
"test": {
"properties": {
"type": {
"const": "card"
}
}
}
},
"description": "amis Card 渲染器格式说明。https://baidu.github.io/amis/docs/renderers/Card",
"type": "object"
}