2020-05-27 14:57:40 +08:00
|
|
|
|
{
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$id": "https://houtai.baidu.com/v2/schemas/table.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|footable|footable|showFooter|columns|tableClassName|data|affixHeader|columnsTogglable|className|footerClassName|headerClassName|placeholder|source|tableClassName|title|toolbarClassName|)$": {}
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"$schema": {
|
|
|
|
|
"description": "绑定 JSON 格式说明,可忽略!",
|
|
|
|
|
"format": "uri",
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"type": {
|
|
|
|
|
"const": "table",
|
|
|
|
|
"description": "指定为 tabel 类型",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"required": ["type"]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"definitions": {
|
|
|
|
|
"columns": {
|
|
|
|
|
"description": "列配置",
|
|
|
|
|
"items": {
|
|
|
|
|
"allOf": [
|
|
|
|
|
{
|
|
|
|
|
"if": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"then": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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": {
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"if": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"then": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"else": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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": {
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"if": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"then": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"else": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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": {
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"if": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"then": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"else": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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"
|
|
|
|
|
}
|
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
|
|
|
|
}
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"properties": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"fixed": {
|
|
|
|
|
"description": "配置是否固定当前列",
|
|
|
|
|
"enum": ["left", "right", "none"],
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"label": {
|
|
|
|
|
"description": "列标题",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"name": {
|
|
|
|
|
"description": "绑定字段名",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"popOver": {
|
|
|
|
|
"description": "配置查看详情功能",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "boolean"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"properties": {},
|
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"quickEdit": {
|
|
|
|
|
"description": "配置快速编辑功能",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "boolean"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"properties": {},
|
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"copyable": {
|
|
|
|
|
"description": "配置点击复制功能",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "boolean"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"properties": {},
|
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"sortable": {
|
|
|
|
|
"description": "配置是否可以排序",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"toggled": {
|
|
|
|
|
"description": "配置是否默认展示",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"width": {
|
|
|
|
|
"description": "列宽度",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
2020-05-27 14:57:40 +08:00
|
|
|
|
"type": "string"
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "number"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"breakpoint": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "填写 *、xs、sm、md、lg指定 footable 的触发条件,可以填写多个用空格隔开"
|
|
|
|
|
}
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"type": "object"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"type": "array"
|
|
|
|
|
},
|
|
|
|
|
"common": {
|
|
|
|
|
"description": "amis table 渲染器格式说明。",
|
|
|
|
|
"properties": {
|
|
|
|
|
"$ref": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
|
|
|
|
|
"description": "引用页面中的定义"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"affixHeader": {
|
|
|
|
|
"description": "是否固定表头",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"className": {
|
|
|
|
|
"default": "panel-default",
|
|
|
|
|
"description": "外层 CSS 类名",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"columns": {
|
|
|
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/columns"
|
|
|
|
|
},
|
|
|
|
|
"columnsTogglable": {
|
|
|
|
|
"description": "展示列显示开关,自动即:列数量大于或等于5个时自动开启",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"const": "auto"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"data": {
|
|
|
|
|
"description": "默认的数据"
|
|
|
|
|
},
|
|
|
|
|
"footable": {
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"description": "是否开启底部展示功能,适合移动端展示",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"properties": {
|
|
|
|
|
"expand": {
|
|
|
|
|
"description": "设置默认展开情况",
|
|
|
|
|
"enum": ["first", "all", "none"],
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"type": "object"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"footerClassName": {
|
|
|
|
|
"default": "crud-table-footer",
|
|
|
|
|
"description": "底部外层 CSS 类名",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"headerClassName": {
|
|
|
|
|
"default": "crud-table-header",
|
|
|
|
|
"description": "顶部外层 CSS 类名",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"placeholder": {
|
|
|
|
|
"description": "占位符"
|
|
|
|
|
},
|
|
|
|
|
"showFooter": {
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "是否显示底部",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"showHeader": {
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "是否显示头部",
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
},
|
|
|
|
|
"source": {
|
|
|
|
|
"description": "数据源:绑定当前环境变量"
|
|
|
|
|
},
|
|
|
|
|
"tableClassName": {
|
|
|
|
|
"default": "table-db table-striped",
|
|
|
|
|
"description": "表格 CSS 类名",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"title": {
|
|
|
|
|
"description": "标题",
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"toolbarClassName": {
|
|
|
|
|
"default": "crud-table-toolbar",
|
|
|
|
|
"description": "工具栏 CSS 类名",
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"required": ["type"]
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"test": {
|
|
|
|
|
"properties": {
|
|
|
|
|
"type": {
|
|
|
|
|
"const": "table"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"description": "amis table 渲染器格式说明。",
|
|
|
|
|
"type": "object"
|
|
|
|
|
}
|