amis/schemas/form/matrix.json
2020-05-27 14:57:40 +08:00

111 lines
4.5 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": "https://houtai.baidu.com/v2/schemas/form/matrix.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/matrix.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|source|rows|columns|rowLabel|singleSelectMode|multiple|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|validations|validationErrors|validateOnChange|submitOnChange|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {}
},
"properties": {
"$schema": {
"format": "uri",
"type": "string",
"description": "绑定 JSON 格式说明,可忽略!"
},
"type": {
"const": "matrix",
"description": "指定为 matrix 类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "Matrix 矩阵勾选框格式说明",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/item"
},
{
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"multiple": {
"default": true,
"description": "配置singleSelectMode时设置为false",
"type": "boolean"
},
"singleSelectMode": {
"description": "设置单选模式multiple为false时有效",
"enum": [
"cell",
"row",
"column"
],
"type": "string"
},
"columns": {
"description": "列信息列表",
"items": {
"properties": {
"label": {
"type": "string"
}
},
"required": [
"label"
],
"type": "object"
},
"type": "array"
},
"rowLabel": {
"description": "行标题说明",
"type": "string"
},
"rows": {
"description": "行信息列表",
"items": {
"properties": {
"label": {
"type": "string"
}
},
"required": [
"label"
],
"type": "object"
},
"type": "array"
},
"source": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
"description": "可用来通过 API 拉取 options。详情https://baidu.github.io/amis/docs/api#matrix也可以从当前作用域拉取数据 $typeOptions"
}
},
"type": "object"
}
],
"type": "object"
},
"test": {
"properties": {
"type": {
"const": "matrix"
}
}
}
},
"description": "Matrix 矩阵勾选框格式说明",
"type": "object"
}