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

89 lines
4.3 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/date-range.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/item"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|format|inputFormat|minDate|maxDate|joinValues|delimiter|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": "date-range",
"description": "指定为日期范围输入类型"
}
},
"required": [
"type"
],
"type": "object"
}
],
"definitions": {
"common": {
"description": "日期范围格式说明",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/date-range.json#/definitions/common"
},
{
"properties": {
"$ref": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref",
"description": "引用页面中的定义"
},
"delimiter": {
"default": ",",
"description": "分割符",
"type": "string"
},
"format": {
"default": "X",
"description": "默认 `X` 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.",
"type": "string"
},
"inputFormat": {
"default": "YYYY-MM-DD",
"description": "默认 `YYYY-MM-DD` 用来配置显示的时间格式。",
"type": "string"
},
"joinValues": {
"default": true,
"description": "开启后将选中的选项 value 的值用连接符拼接起来,作为当前表单项的值。如: `value1,value2` 否则为 `[value1, value2]`",
"type": "boolean"
},
"maxDate": {
"description": "最大日期限制,支持变量 $xxx 来取值,或者用相对值如:* `-2mins` 2分钟前\n * `+2days` 2天后\n* `-10week` 十周前\n可用单位 `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。",
"type": "string"
},
"minDate": {
"description": "最小日期限制,支持变量 $xxx 来取值,或者用相对值如:* `-2mins` 2分钟前\n * `+2days` 2天后\n* `-10week` 十周前\n可用单位 `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。",
"type": "string"
},
"value": {
"description": "这里面 value 需要特殊说明一下,因为支持相对值。* `-2mins` 2分钟前\n * `+2days` 2天后\n* `-10week` 十周前\n可用单位 `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "date-range"
}
}
}
},
"description": "日期范围格式说明",
"type": "object"
}