{ "$id": "https://houtai.baidu.com/v2/schemas/form/picker.json#", "$schema": "http://json-schema.org/draft-07/schema#", "allOf": [ { "$ref": "https://houtai.baidu.com/v2/schemas/form/picker.json#/definitions/common" }, { "additionalProperties": false, "patternProperties": { "^(\\$ref|embed|delimiter|joinValues|multiple|modalMode|options|pickerSchema|valueField|labelField|size|source|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": "picker", "description": "指定为选项器类型" } }, "required": [ "type" ], "type": "object" } ], "definitions": { "common": { "description": "Text文本框格式说明", "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": "引用页面中的定义" }, "delimiter": { "default": ",", "description": "分割符", "type": "string" }, "embed": { "default": false, "description": "是否开启内嵌模式,内嵌模式时,picker 直接显示选项提供选择", "type": "boolean" }, "joinValues": { "default": true, "description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。", "type": "boolean" }, "modalMode": { "default": "dialog", "enum": [ "dialog", "drawer" ], "type": "string" }, "multiple": { "description": "是否可多选", "type": "boolean" }, "options": { "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/optionsType", "description": "选项集合" }, "valueField": { "description": "value匹配的字段", "type": "string" }, "labelField": { "description": "label匹配的字段", "type": "string" }, "size": { "description": "value匹配的字段", "enum": [ "xs", "sm", "base", "md", "lg" ], "type": "string" }, "pickerSchema": { "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/common", "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" } }, "type": "object" } ], "type": "object" }, "test": { "properties": { "type": { "const": "picker" } } } }, "description": "Text文本框格式说明", "type": "object" }