amis/schemas/form/textarea.json

77 lines
2.9 KiB
JSON

{
"$id": "https://houtai.baidu.com/v2/schemas/form/textarea.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/textarea.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|minRows|maxRows|hint|trimContents|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": "textarea",
"description": "指定为多行文本框"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "Textarea多行文本框格式说明",
"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": "引用页面中的定义"
},
"hint": {
"description": "当输入框获得焦点的时候显示,用来提示用户输入内容",
"type": "string"
},
"trimContents": {
"default": "false",
"description": "是否去除首尾空白",
"type": "boolean"
},
"maxRows": {
"default": 20,
"description": "最大行数",
"type": "number"
},
"minRows": {
"default": 3,
"description": "最小行数",
"type": "number"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "textarea"
}
}
}
},
"description": "Textarea多行文本框格式说明",
"type": "object"
}