mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
83 lines
3.2 KiB
JSON
83 lines
3.2 KiB
JSON
{
|
|
"$id": "https://houtai.baidu.com/v2/schemas/form/city.json#",
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"allOf": [
|
|
{
|
|
"$ref": "https://houtai.baidu.com/v2/schemas/form/city.json#/definitions/common"
|
|
},
|
|
{
|
|
"additionalProperties": false,
|
|
"patternProperties": {
|
|
"^(\\$ref|allowCity|allowDistrict|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": "city",
|
|
"description": "指定为 city 类型"
|
|
}
|
|
},
|
|
"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": "引用页面中的定义"
|
|
},
|
|
"allowCity": {
|
|
"default": true,
|
|
"description": "是否允许选择城市",
|
|
"type": "boolean"
|
|
},
|
|
"allowDistrict": {
|
|
"default": true,
|
|
"description": "是否允许选择区域",
|
|
"type": "boolean"
|
|
},
|
|
"delimiter": {
|
|
"default": ",",
|
|
"description": "分割符",
|
|
"type": "string"
|
|
},
|
|
"joinValues": {
|
|
"default": true,
|
|
"description": "选中的多个选项的 `value` 会通过 `delimiter` 连接起来",
|
|
"type": "boolean"
|
|
},
|
|
"extractValue": {
|
|
"default": true,
|
|
"description": "开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"test": {
|
|
"properties": {
|
|
"type": {
|
|
"const": "city"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "城市选择格式说明",
|
|
"type": "object"
|
|
} |