amis2/schemas/carousel.json

132 lines
3.3 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
2020-08-21 15:28:22 +08:00
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/carousel.json#/definitions/common"
},
{
"additionalProperties": false,
"dependencies": {},
"patternProperties": {
"^(\\$ref|name|animation|auto|interval|duration|className|width|height|controlsTheme|controls|placeholder|options|visibleOn|visible|hidden|hiddenOn)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "carousel",
"description": "指定为轮播图类型",
"type": "string"
}
},
"required": ["type"]
}
],
"definitions": {
"common": {
"description": "amis Video 渲染器,用来生成视频播放器",
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"auto": {
"description": "是否自动播放",
"type": "boolean"
},
"interval": {
"type": "number",
"description": "轮播间隔时间"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"duration": {
"type": "number",
"description": "动画时长"
},
"className": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
"description": "配置容器 className"
},
"width": {
"description": "设置宽度",
"oneOf": [
{
"type": "number"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
{
"type": "string"
}
]
},
"height": {
"oneOf": [
{
"type": "number"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
{
"type": "string"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
],
"description": "设置高度"
},
"controlsTheme": {
"type": "string",
"enum": ["light", "dark"]
},
"placeholder": {
"type": "string",
"description": "占位"
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"controls": {
"description": "配置控件内容",
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"const": ["dots", "arrows"]
}
},
{
"type": "string"
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
]
},
"animation": {
"type": "string",
"description": "动画类型",
"enum": ["fade", "slide"]
},
"itemSchema": {
"type": "object",
"description": "配置单条呈现模板"
},
"name": {
"type": "string",
"description": "绑定变量"
},
"options": {
"type": "array",
"description": "配置固定值",
"items": {
"type": "object"
}
2020-05-27 14:57:40 +08:00
}
2020-08-21 15:28:22 +08:00
}
2020-05-27 14:57:40 +08:00
},
2020-08-21 15:28:22 +08:00
"test": {
"properties": {
"type": {
"const": "video"
}
}
}
},
"description": "amis 轮播渲染器",
"id": "https://houtai.baidu.com/v2/schemas/carousel.json#",
"type": "object"
}