mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
111 lines
4.5 KiB
JSON
111 lines
4.5 KiB
JSON
{
|
||
"$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"
|
||
} |