mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
306 lines
14 KiB
JSON
306 lines
14 KiB
JSON
{
|
|
"$id": "https://houtai.baidu.com/v2/schemas/list.json#",
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"allOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"dependencies": {},
|
|
"patternProperties": {
|
|
"^(\\$ref|showHeader|showFooter|listItem|data|className|footerClassName|headerClassName|placeholder|source|title|toolbarClassName|header|footer)$": {}
|
|
},
|
|
"properties": {
|
|
"$schema": {
|
|
"description": "绑定 JSON 格式说明,可忽略!",
|
|
"format": "uri",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"const": "list",
|
|
"description": "指定为 list 类型",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
]
|
|
}
|
|
],
|
|
"definitions": {
|
|
"body": {
|
|
"description": "内容容器",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field"
|
|
},
|
|
{
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field"
|
|
},
|
|
{
|
|
"description": "**不推荐使用数组,请用 hbox 包裹**",
|
|
"items": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field"
|
|
},
|
|
"type": "array"
|
|
}
|
|
]
|
|
},
|
|
"type": "array"
|
|
}
|
|
]
|
|
},
|
|
"common": {
|
|
"description": "AMis list 渲染器格式说明。",
|
|
"properties": {
|
|
"$ref": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
|
|
"description": "引用页面中的定义"
|
|
},
|
|
"className": {
|
|
"default": "panel-default",
|
|
"description": "外层 CSS 类名",
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"description": "默认的数据"
|
|
},
|
|
"footer": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container",
|
|
"description": "底部容器"
|
|
},
|
|
"footerClassName": {
|
|
"default": "crud-list-footer",
|
|
"description": "底部外层 CSS 类名",
|
|
"type": "string"
|
|
},
|
|
"header": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container",
|
|
"description": "顶部容器"
|
|
},
|
|
"headerClassName": {
|
|
"default": "amis-list-header",
|
|
"description": "顶部外层 CSS 类名",
|
|
"type": "string"
|
|
},
|
|
"listItem": {
|
|
"description": "成员内容配置",
|
|
"properties": {
|
|
"actions": {
|
|
"items": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"avatar": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl",
|
|
"description": "头像,支持tpl"
|
|
},
|
|
"body": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/body"
|
|
},
|
|
"desc": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl",
|
|
"description": "描述,支持tpl"
|
|
},
|
|
"remark": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl",
|
|
"description": "tooltip 说明"
|
|
},
|
|
"subTitle": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl",
|
|
"description": "副标题, 支持tpl"
|
|
},
|
|
"title": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl",
|
|
"description": "标题, 支持tpl"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"placeholder": {
|
|
"description": "占位符"
|
|
},
|
|
"showFooter": {
|
|
"default": true,
|
|
"description": "是否显示底部",
|
|
"type": "boolean"
|
|
},
|
|
"showHeader": {
|
|
"default": true,
|
|
"description": "是否显示头部",
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"description": "数据源:绑定当前环境变量"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"field": {
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"if": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test"
|
|
},
|
|
"then": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common"
|
|
},
|
|
"else": {
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"properties": {
|
|
"label": {
|
|
"description": "字段名称",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "绑定字段名",
|
|
"type": "string"
|
|
},
|
|
"popOver": {
|
|
"description": "配置查看详情功能",
|
|
"oneOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"properties": {},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"quickEdit": {
|
|
"description": "配置快速编辑功能",
|
|
"oneOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"properties": {},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"copyable": {
|
|
"description": "配置点击复制功能",
|
|
"oneOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"properties": {},
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"test": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "list"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "AMis list 渲染器格式说明。",
|
|
"type": "object"
|
|
} |