amis/schemas/form/diff-editor.json

123 lines
4.6 KiB
JSON
Raw Normal View History

2020-05-27 14:57:40 +08:00
{
"$id": "https://houtai.baidu.com/v2/schemas/form/diff-editor.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/diff-editor.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|language|diffValue|theme|disabled|size|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": {
"description": "指定为编辑器类型",
"const": "diff-editor"
}
},
"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": "引用页面中的定义"
},
"language": {
"const": [
"bat",
"c",
"coffeescript",
"cpp",
"csharp",
"css",
"dockerfile",
"fsharp",
"go",
"handlebars",
"html",
"ini",
"java",
"javascript",
"json",
"less",
"lua",
"markdown",
"msdax",
"objective-c",
"php",
"plaintext",
"postiats",
"powershell",
"pug",
"python",
"r",
"razor",
"ruby",
"sb",
"scss",
"sol",
"sql",
"swift",
"typescript",
"vb",
"xml",
"yaml"
],
"default": "javascript",
"description": "语言类型",
"type": "string"
},
"size": {
"default": "sm",
"description": "设置编辑器的大小",
"enum": [
"sm",
"md",
"lg",
"xl",
"xxl"
],
"type": "string"
},
"theme": {
"description": "主题",
"type": "string"
},
"diffValue": {
"description": "左侧值",
"type": "string"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "diff-editor"
}
}
}
},
"description": "编辑器格式说明",
"type": "object"
}