forked from p96170835/amis
140 lines
4.6 KiB
JSON
140 lines
4.6 KiB
JSON
{
|
|
"$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": "轮播间隔时间"
|
|
},
|
|
"duration": {
|
|
"type": "number",
|
|
"description": "动画时长"
|
|
},
|
|
"className": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className",
|
|
"description": "配置容器 className"
|
|
},
|
|
"width": {
|
|
|
|
"description": "设置宽度",
|
|
"oneOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"height": {
|
|
"oneOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"description": "设置高度"
|
|
},
|
|
"controlsTheme": {
|
|
"type": "string",
|
|
"enum": ["light", "dark"]
|
|
},
|
|
"placeholder": {
|
|
"type": "string",
|
|
"description": "占位"
|
|
},
|
|
"controls": {
|
|
"description": "配置控件内容",
|
|
"oneOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"const": [
|
|
"dots",
|
|
"arrows"
|
|
]
|
|
}
|
|
},
|
|
|
|
{
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"animation": {
|
|
"type": "string",
|
|
"description": "动画类型",
|
|
"enum": [
|
|
"fade",
|
|
"slide"
|
|
]
|
|
},
|
|
"itemSchema": {
|
|
"type": "object",
|
|
"description": "配置单条呈现模板"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "绑定变量"
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"description": "配置固定值",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "video"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "AMis 轮播渲染器",
|
|
"id": "https://houtai.baidu.com/v2/schemas/carousel.json#",
|
|
"type": "object"
|
|
} |