amis/schemas/form/password.json

170 lines
8.3 KiB
JSON
Raw Permalink 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/password.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/form/password.json#/definitions/common"
},
{
"additionalProperties": false,
"patternProperties": {
"^(\\$ref|options|source|autoComplete|clearValue|resetValue|hint|trimContents|addOn|size|multiple|joinValues|delimiter|extractValue|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": "password",
"description": "指定为密码输入框"
}
},
"type": "object",
"required": [
"type"
]
}
],
"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": "引用页面中的定义"
},
"hint": {
"description": "当输入框获得焦点的时候显示,用来提示用户输入内容",
"type": "string"
},
"trimContents": {
"default": "false",
"description": "是否去除首尾空白",
"type": "boolean"
},
"size": {
"default": "full",
"description": "表单项大小可以是xs, sm, base, md, lg。",
"enum": [
"xs",
"sm",
"base",
"md",
"lg"
],
"type": "string"
},
"addOn": {
"allOf": [
{
"$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction"
},
{
"properties": {
"icon": {
"description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/",
"type": "string"
},
"label": {
"description": "文本",
"type": "string"
},
"level": {
"description": "按钮级别",
"enum": [
"info",
"success",
"warning",
"danger",
"link",
"primary"
],
"type": "string"
},
"type": {
"description": "定义类型只支持text、button和submit。",
"enum": [
"text",
"button",
"submit"
],
"type": "string"
},
"position": {
"description": "addOn 的位置",
"type": "string",
"enum": [
"left",
"right"
]
}
},
"type": "object"
}
],
"description": "输入框附加组件",
"type": "object"
},
"source": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
"description": "可用来通过 API 拉取 options。详情https://baidu.github.io/amis/docs/api#formitem也可以从当前作用域拉取数据 $typeOptions"
},
"autoComplete": {
"$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api",
"description": "跟 source 不同的是,每次用户输入都会去接口获取提示,请不要跟 source 同时使用。"
},
"options": {
"$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/optionsType",
"description": "选项集合"
},
"multiple": {
"default": false,
"description": "是否为多选",
"type": "boolean"
},
"joinValues": {
"default": true,
"description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。",
"type": "boolean"
},
"delimiter": {
"default": ",",
"description": "分割符",
"type": "string"
},
"extractValue": {
"default": true,
"description": "开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。",
"type": "boolean"
},
"resetValue": {
"default": "",
"description": "清除时设置的值"
},
"clearValue": {
"description": "是否显示清除按钮",
"type": "boolean"
}
},
"type": "object"
}
]
},
"test": {
"properties": {
"type": {
"const": "password"
}
}
}
},
"description": "密码框格式说明",
"type": "object"
}