amis/schemas/form/time.json

81 lines
3.4 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/time.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/time.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|format|inputFormat|timeFormat|clearable|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": "time",
"description": "指定为时间输入类型"
}
},
"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": "引用页面中的定义"
},
"clearable": {
"default": true,
"description": "是否显示清除按钮",
"type": "boolean"
},
"format": {
"default": "X",
"description": "默认 `X` 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.",
"type": "string"
},
"inputFormat": {
"default": "HH:mm",
"description": "默认 `HH:mm` 用来配置显示的时间格式。",
"type": "string"
},
"timeFormat": {
"default": "HH:mm",
"description": "默认 `HH:mm` 用来配置选择的时间格式。",
"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": "time"
}
}
}
},
"description": "时间输入框格式说明",
"type": "object"
}