amis/schemas/form/rating.json

73 lines
2.6 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
"$id": "https://houtai.baidu.com/v2/schemas/form/rating.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/color.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|count|readOnly|half|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": "rating",
"description": "指定为 rating 类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "评分格式说明",
"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": "引用页面中的定义"
},
"readOnly": {
"default": true,
"description": "是否只读",
"type": "boolean"
},
"half": {
"default": true,
"description": "允许选择半星",
"type": "boolean"
},
"count": {
"default": 5,
"description": "最大值",
"type": "number"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "rating"
}
}
}
},
"description": "评分格式说明",
"type": "object"
}