diff --git a/schemas/action.json b/schemas/action.json deleted file mode 100644 index 0de0c16b6..000000000 --- a/schemas/action.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "$id": "/schemas/action.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/action.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|type|label|block|icon|iconClassName|className|size|level|block|primary|tooltip|tooltipPlacement|actionType|api|dialog|drawer|link|url|target|reload|confirmText|copy|disabled|disabledOn|disabledTip|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为按钮", - "enum": ["button", "submit", "reset"], - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Action 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#action", - "allOf": [ - { - "$ref": "/schemas/action.json#/definitions/baseButton" - }, - { - "$ref": "/schemas/action.json#/definitions/baseAction" - } - ] - }, - "ajaxAction": { - "description": "当前 Action 为 ajax 类型,用来发送 ajax 请求。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actionType": { - "description": "当前 Action 为 ajax 类型,用来发送 ajax 请求。", - "enum": ["ajax"], - "type": "string" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "当按钮为 ajax 类型时,用来配置 ajax 发送得目标地址" - }, - "confirmText": { - "description": "操作前的确认文字设置。", - "type": "string" - }, - "feedback": { - "$ref": "/schemas/dialog.json", - "description": "配置 action 结束后的反馈行为。通过配置此属性,可以自动弹出一个 dialog 继续操作。" - }, - "optimistic": { - "description": "是否启用乐观模式", - "type": "boolean" - }, - "reload": { - "description": "指定此次 Action 之后,需要刷新的组件名字。请填入目标组件的 name 值。", - "type": "string" - } - }, - "required": ["actionType", "api"], - "type": "object" - }, - "baseAction": { - "if": { - "properties": { - "actionType": { - "const": "ajax" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/ajaxAction" - }, - "else": { - "if": { - "properties": { - "actionType": { - "const": "url" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/urlAction" - }, - "else": { - "if": { - "properties": { - "actionType": { - "const": "dialog" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/dialogAction" - }, - "else": { - "if": { - "properties": { - "actionType": { - "const": "drawer" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/drawerAction" - }, - "else": { - "if": { - "properties": { - "actionType": { - "const": "copy" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/copyAction" - }, - "else": { - "if": { - "properties": { - "actionType": { - "const": "reload" - } - } - }, - "then": { - "$ref": "/schemas/action.json#/definitions/reloadAction" - }, - "else": { - "$ref": "/schemas/action.json#/definitions/otherAction" - } - } - } - } - } - } - }, - "baseButton": { - "properties": { - "block": { - "default": false, - "description": "是否独占一行 `display: block`", - "type": "boolean" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hidden": { - "type": "boolean", - "description": "设置是否隐藏" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "iconClassName": { - "type": "string", - "description": "icon 上面的 css 类名" - }, - "label": { - "description": "按钮名字", - "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": ["info", "success", "warning", "danger", "link", "primary"], - "type": "string" - }, - "primary": { - "default": false, - "description": "按钮是否为主按钮,影响样式。", - "type": "boolean" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg", ""], - "type": "string" - }, - "tooltip": { - "description": "按钮提示文字,hover 时显示", - "type": "string" - }, - "tooltipPlacement": { - "default": "top", - "description": "按钮提示文字显示的位置", - "enum": ["left", "top", "right", "bottom"], - "type": "string" - }, - "type": { - "description": "按钮类型", - "enum": ["button", "submit", "reset"], - "type": "string" - }, - "visible": { - "type": "boolean", - "description": "设置是否显示" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "otherAction": { - "properties": { - "actionType": { - "description": "Action 类型", - "enum": ["prev", "next", "cancel", "close", "submit", "confirm", ""], - "type": "string" - }, - "confirmText": { - "description": "操作前的确认文字设置。", - "type": "string" - }, - "target": { - "type": "string", - "description": "可以指定由目标来相应这个事件" - } - }, - "type": "object" - }, - "copyAction": { - "description": "当前 Action 为 copy 类型,用来复制内容到剪切板。", - "properties": { - "actionType": { - "description": "当前 Action 为 copy 类型,用来复制内容到剪切板。", - "enum": ["copy"], - "type": "string" - }, - "copy": { - "$ref": "/schemas/page.json#/definitions/tpl", - "description": "copy 到剪切板的内容" - } - }, - "required": ["actionType", "copy"], - "type": "object" - }, - "dialogAction": { - "description": "当前 Action 为 dialog 类型,用来做弹窗操作。", - "properties": { - "actionType": { - "description": "当前 Action 为 dialog 类型,用来做弹窗操作。", - "enum": ["dialog"], - "type": "string" - }, - "dialog": { - "$ref": "/schemas/dialog.json#/definitions/common", - "description": "dialog的展示schema" - }, - "nextCondition": { - "description": "下一个的条件,写法类似于 disabledOn、visibleOn 等等,用来判断是否还有下一条数据,只有 crud 中才有用。", - "type": "string" - }, - "reload": { - "description": "指定此次 Action 之后,需要刷新的组件名字。请填入目标组件的 name 值。", - "type": "string" - } - }, - "required": ["actionType", "dialog"], - "type": "object" - }, - "drawerAction": { - "description": "当前 Action 为 drawer 类型,用来做抽出式弹窗操作。", - "properties": { - "actionType": { - "description": "当前 Action 为 drawer 类型,用来做抽出式弹窗操作。", - "enum": ["drawer"], - "type": "string" - }, - "drawer": { - "$ref": "/schemas/drawer.json#/definitions/common", - "description": "drawer的展示schema" - }, - "nextCondition": { - "description": "下一个的条件,写法类似于 disabledOn、visibleOn 等等,用来判断是否还有下一条数据,只有 crud 中才有用。", - "type": "string" - }, - "reload": { - "description": "指定此次 Action 之后,需要刷新的组件名字。请填入目标组件的 name 值。", - "type": "string" - } - }, - "required": ["actionType", "drawer"], - "type": "object" - }, - "linkAction": { - "description": "当前 Action 为 link 类型, 用来做站内跳转。", - "properties": { - "actionType": { - "description": "当前 Action 为 link 类型, 用来做站内跳转。", - "enum": ["link"], - "type": "string" - }, - "confirmText": { - "description": "操作前的确认文字设置。", - "type": "string" - }, - "link": { - "description": "站内地址,支持相对路径和绝对路径。同时还支持 `$varName` 或者 `${varName}` 取值。", - "type": "string" - } - }, - "required": ["actionType", "link"], - "type": "object" - }, - "reloadAction": { - "description": "当前 Action 为 reload 类型,用来让目标组件刷新数据。", - "properties": { - "actionType": { - "description": "当前 Action 为 reload 类型,用来让目标组件刷新数据。", - "enum": ["reload"], - "type": "string" - }, - "confirmText": { - "description": "操作前的确认文字设置。", - "type": "string" - }, - "target": { - "description": "reload 的目标对象,用 name 来指定,支持用 . 来指定更详细的路径如: aform.acontrol", - "type": "string" - } - }, - "required": ["actionType", "reload"], - "type": "object" - }, - "urlAction": { - "description": "当前 Action 为 url 类型,用来做站外跳转。", - "properties": { - "actionType": { - "description": "当前 Action 为 url 类型,用来做站外跳转。", - "enum": ["url"], - "type": "string" - }, - "blank": { - "default": true, - "description": "是否在新页面打开", - "type": "boolean" - }, - "confirmText": { - "description": "操作前的确认文字设置。", - "type": "string" - }, - "url": { - "description": "跳转地址", - "patten": "^https?://", - "type": "string" - } - }, - "required": ["actionType", "url"], - "type": "object" - }, - "test": { - "properties": { - "type": { - "enum": ["button", "submit", "reset"] - } - } - } - }, - "description": "amis Action 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#action", - "type": "object" -} diff --git a/schemas/alert.json b/schemas/alert.json deleted file mode 100644 index ecbcaeacf..000000000 --- a/schemas/alert.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$id": "/schemas/alert.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/alert.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|body|level|showCloseButton)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "alert", - "description": "指定为提示框类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Wrapper 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Alert", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置外层 className" - }, - "level": { - "description": "提示类型", - "enum": ["info", "success", "warning", "danger"] - }, - "showCloseButton": { - "description": "是否显示关闭按钮", - "type": "boolean" - } - } - }, - "test": { - "properties": { - "type": { - "const": "alert" - } - } - } - }, - "description": "amis Alert 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Alert", - "type": "object" -} diff --git a/schemas/audio.json b/schemas/audio.json deleted file mode 100644 index 7030a30de..000000000 --- a/schemas/audio.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ - { - "$ref": "/schemas/audio.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|type|className|name|inline|src|loop|autoPlay|rates|controls)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "audio", - "description": "指定为音频类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Audio 渲染器,用来生成音频播放器", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "inline": { - "type": "boolean", - "description": "是否是内联模式" - }, - "src": { - "description": "视频播放地址, 支持 $ 取变量。", - "type": "string" - }, - "loop": { - "type": "boolean", - "description": "是否循环播放" - }, - "autoPlay": { - "type": "boolean", - "description": "是否自动播放" - }, - "rates": { - "type": "array", - "description": "配置可选播放倍速", - "items": { - "type": "number" - } - }, - "controls": { - "type": "array", - "description": "可以配置控制器", - "items": { - "type": "string", - "enum": ["rates", "play", "time", "process", "volume"] - } - } - } - }, - "test": { - "properties": { - "type": { - "const": "audio" - } - } - } - }, - "description": "amis Audio 渲染器,用来生成视频播放器", - "$id": "/schemas/audio.json#", - "type": "object" -} diff --git a/schemas/button-group.json b/schemas/button-group.json deleted file mode 100644 index dfce4f858..000000000 --- a/schemas/button-group.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$id": "/schemas/button-group.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/button-group.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|btnClassName|buttons|className|size|disabled|disabledOn|hiddenOn|hidden|visible|visbileOn)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "button-group", - "description": "指定为提交按钮类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "test": { - "properties": { - "type": { - "const": "button-group" - } - } - }, - "common": { - "description": "amis Button Group 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#buttongroup", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "btnClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "给 Button 配置 className。" - }, - "buttons": { - "description": "按钮集合", - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - } - }, - "type": "object" - } - }, - "description": "amis Button Group 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#buttongroup", - "type": "object" -} diff --git a/schemas/card.json b/schemas/card.json deleted file mode 100644 index e07cd7f4e..000000000 --- a/schemas/card.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$id": "/schemas/card.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/card.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|name|className|header|body|bodyClassName|actions)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "card", - "description": "指定为 card 类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Card 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Card", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "header": { - "description": "头部内容设置", - "type": "object" - }, - "header": { - "properties": { - "className": { - "description": "类名", - "type": "string" - }, - "title": { - "description": "标题", - "type": "string" - }, - "subTitle": { - "description": "副标题", - "type": "string" - }, - "avatar": { - "description": "图片", - "type": "string" - }, - "avatarClassName": { - "description": "图片类名", - "type": "string" - }, - "highlight": { - "description": "是否点亮", - "type": "boolean" - } - }, - "type": "object" - }, - "actions": { - "description": "按钮", - "type": "array" - } - } - }, - "test": { - "properties": { - "type": { - "const": "card" - } - } - } - }, - "description": "amis Card 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Card", - "type": "object" -} diff --git a/schemas/cards.json b/schemas/cards.json deleted file mode 100644 index 4ac511455..000000000 --- a/schemas/cards.json +++ /dev/null @@ -1,382 +0,0 @@ -{ - "$id": "/schemas/cards.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/cards.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|showHeader|showFooter|card|title|source|placeholder|className|headerClassName|footerClassName|itemClassName|)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "cards", - "description": "指定为 cards 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "body": { - "description": "内容容器", - "oneOf": [ - { - "$ref": "/schemas/cards.json#/definitions/field" - }, - { - "items": { - "oneOf": [ - { - "$ref": "/schemas/cards.json#/definitions/field" - }, - { - "description": "**不推荐使用数组,请用 hbox 包裹**", - "items": { - "$ref": "/schemas/cards.json#/definitions/field" - }, - "type": "array" - } - ] - }, - "type": "array" - } - ] - }, - "card": { - "type": "object", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "type": { - "const": "card", - "description": "指定为 card 渲染器" - }, - "actions": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "actionsCount": { - "description": "卡片一行最多能放按钮个数", - "type": "number" - }, - "avatarClassName": { - "description": "图片 CSS 类名", - "type": "string" - }, - "body": { - "$ref": "/schemas/cards.json#/definitions/body" - }, - "bodyClassName": { - "description": "内容区 CSS 类名", - "type": "string" - }, - "className": { - "description": "外层 CSS 类名", - "type": "string" - }, - "descClassName": { - "description": "描述 CSS 类名", - "type": "string" - }, - "header": { - "description": "头部内容", - "properties": { - "avatar": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "头像,支持tpl" - }, - "desc": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "描述,支持tpl" - }, - "descClassName": { - "description": "描述 CSS 类名", - "type": "string" - }, - "header": { - "description": "头部内容", - "properties": { - "avatar": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "头像,支持tpl" - }, - "desc": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "描述,支持tpl" - }, - "highlight": { - "description": "是否高亮表达式", - "type": "string" - }, - "subTitle": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "副标题, 支持tpl" - }, - "title": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "标题, 支持tpl" - } - }, - "type": "object" - }, - "higlight": { - "description": "是否高亮表达式", - "type": "string" - }, - "subTitle": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "副标题, 支持tpl" - }, - "title": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "标题, 支持tpl" - } - }, - "type": "object" - }, - "highlightClassName": { - "description": "高亮 CSS 类名", - "type": "string" - }, - "subTitleClassName": { - "description": "副标题 CSS 类名", - "type": "string" - }, - "titleClassName": { - "description": "标题 CSS 类名", - "type": "string" - } - } - }, - "common": { - "description": "amis cards 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "card": { - "$ref": "/schemas/cards.json#/definitions/card", - "type": "object" - }, - "className": { - "description": "外层 CSS 类名", - "type": "string" - }, - "footerClassName": { - "description": "底部 CSS 类名", - "type": "string" - }, - "headerClassName": { - "description": "头部 CSS 类名", - "type": "string" - }, - "itemClassName": { - "default": "col-sm-4 col-md-3", - "description": "卡片 CSS 类名", - "type": "string" - }, - "placeholder": { - "default": "暂无数据", - "description": "无数据提示", - "type": "string" - }, - "showFooter": { - "default": true, - "description": "是否显示底部", - "type": "boolean" - }, - "showHeader": { - "default": true, - "description": "是否显示头部", - "type": "boolean" - }, - "source": { - "default": "${items}", - "description": "数据源: 绑定当前环境变量", - "type": "string" - }, - "title": { - "description": "标题", - "type": "string" - } - }, - "type": "object" - }, - "field": { - "allOf": [ - { - "if": { - "$ref": "/schemas/tpl.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tpl.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/image.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/image.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/date.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/date.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/operation.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/plain.json#/definitions/common" - } - } - } - } - } - } - } - } - } - } - } - } - }, - { - "properties": { - "label": { - "description": "字段名称", - "type": "string" - }, - "name": { - "description": "绑定字段名", - "type": "string" - }, - "popOver": { - "description": "配置查看详情功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "quickEdit": { - "description": "配置快速编辑功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "copyable": { - "description": "配置点击复制功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "cards" - } - } - } - }, - "description": "amis cards 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/carousel.json b/schemas/carousel.json deleted file mode 100644 index 5bbaa9bab..000000000 --- a/schemas/carousel.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/carousel.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|name|animation|auto|interval|duration|className|width|height|controlsTheme|controls|placeholder|options|visibleOn|visible|hidden|hiddenOn)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "carousel", - "description": "指定为轮播图类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Video 渲染器,用来生成视频播放器", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "auto": { - "description": "是否自动播放", - "type": "boolean" - }, - "interval": { - "type": "number", - "description": "轮播间隔时间" - }, - "duration": { - "type": "number", - "description": "动画时长" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "width": { - "description": "设置宽度", - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "height": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ], - "description": "设置高度" - }, - "controlsTheme": { - "type": "string", - "enum": ["light", "dark"] - }, - "placeholder": { - "type": "string", - "description": "占位" - }, - "controls": { - "description": "配置控件内容", - "oneOf": [ - { - "type": "array", - "items": { - "type": "string", - "const": ["dots", "arrows"] - } - }, - - { - "type": "string" - } - ] - }, - "animation": { - "type": "string", - "description": "动画类型", - "enum": ["fade", "slide"] - }, - "itemSchema": { - "type": "object", - "description": "配置单条呈现模板" - }, - "name": { - "type": "string", - "description": "绑定变量" - }, - "options": { - "type": "array", - "description": "配置固定值", - "items": { - "type": "object" - } - } - } - }, - "test": { - "properties": { - "type": { - "const": "video" - } - } - } - }, - "description": "amis 轮播渲染器", - "$id": "/schemas/carousel.json#", - "type": "object" -} diff --git a/schemas/chart.json b/schemas/chart.json deleted file mode 100644 index 55361ae91..000000000 --- a/schemas/chart.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$id": "/schemas/chart.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/chart.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|name|className|api|initFetch|initFetchOn|fetchOn|interval|style|config|width|height|messages)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "chart", - "description": "指定为 chart 类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Chart 渲染器,采用echarts渲染,格式说明。https://baidu.github.io/amis/docs/renderers#chart", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取配置" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "config": { - "description": "配置echart的config", - "type": "object" - }, - "fetchOn": { - "default": true, - "description": "是否拉取?通过表达式来决定, 条件满足才会拉取", - "type": "string" - }, - "height": { - "description": "宽度设置" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "initFetchOn": { - "default": true, - "description": "是否默认就拉取?通过表达式来决定", - "type": "string" - }, - "interval": { - "default": 0, - "description": "刷新时间", - "type": "number" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 api 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 api 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "style": { - "description": "style样式", - "type": "object" - }, - "width": { - "description": "宽度设置" - } - } - }, - "test": { - "properties": { - "type": { - "const": "chart" - } - } - } - }, - "description": "amis Chart 渲染器,采用echarts渲染,格式说明。https://baidu.github.io/amis/docs/renderers#chart", - "type": "object" -} diff --git a/schemas/collapse.json b/schemas/collapse.json deleted file mode 100644 index 1eea0d459..000000000 --- a/schemas/collapse.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$id": "/schemas/collapse.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/collapse.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|title|collapsable|collapsed|body|bodyClassName|className|headingClassName)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "collapse", - "description": "指定为折叠器类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis collapse 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#wrapper", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "bg-white wrapper", - "description": "配置容器 className" - }, - "collapsable": { - "description": "是否可折叠", - "type": "boolean" - }, - "collapsed": { - "description": "默认是否折叠", - "type": "boolean" - }, - "headingClassName": { - "default": "font-thin b-b b-light text-lg p-b-xs", - "description": "标题 CSS 类名", - "type": "string" - }, - "title": { - "description": "标题", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "collapse" - } - } - } - }, - "description": "amis collapse 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#wrapper", - "type": "object" -} diff --git a/schemas/container.json b/schemas/container.json deleted file mode 100644 index 31bc49059..000000000 --- a/schemas/container.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$id": "/schemas/container.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/container.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|body|className)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "container", - "description": "指定为 container 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "body": { - "description": "集合", - "type": "array" - }, - "common": { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "body": { - "description": "内容", - "type": "object" - }, - "bodyClassName": { - "description": "body 类名", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "container" - } - } - } - }, - "description": "amis container 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Types#container", - "type": "object" -} diff --git a/schemas/convert.js b/schemas/convert.js deleted file mode 100644 index 273486183..000000000 --- a/schemas/convert.js +++ /dev/null @@ -1,195 +0,0 @@ -// page SubRenderer 类型 -(function () { - const renderers = [ - '/schemas/action.json#', - '/schemas/button-group.json#', - '/schemas/cards.json#', - '/schemas/chart.json#', - '/schemas/collapse.json#', - '/schemas/divider.json#', - '/schemas/crud.json#', - '/schemas/date.json#', - // '/schemas/dialog.json#', - // '/schemas/drawer.json#', - '/schemas/dropdown-button.json#', - '/schemas/form.json#', - '/schemas/grid.json#', - '/schemas/hbox.json#', - '/schemas/iframe.json#', - '/schemas/image.json#', - '/schemas/json.json#', - '/schemas/list.json#', - '/schemas/mapping.json#', - '/schemas/nav.json#', - '/schemas/operation.json#', - // 自己不能放在其他地方 '/schemas/page.json#', - '/schemas/panel.json#', - '/schemas/plain.json#', - '/schemas/progress.json#', - '/schemas/service.json#', - '/schemas/status.json#', - '/schemas/switch.json#', - '/schemas/table.json#', - '/schemas/tabs.json#', - '/schemas/tasks.json#', - '/schemas/tpl.json#', - '/schemas/video.json#', - '/schemas/wizard.json#', - '/schemas/wrapper.json#', - '/schemas/page.json#/definitions/customRenderer' - ]; - - const root = {}; - let last = renderers.pop(); - let current = root; - - while (renderers.length) { - const renderer = renderers.shift().replace(/#$/, ''); - - current.if = { - $ref: `${renderer}#/definitions/test` - }; - - current.then = { - $ref: `${renderer}#/definitions/common` - }; - - current = current.else = {}; - } - - current['$ref'] = last; - - console.log(JSON.stringify(root, null, 4)); -})(); - -// Cards 里面 field 类型 -(function () { - const renderers = [ - '/schemas/tpl.json#', - '/schemas/image.json#', - '/schemas/date.json#', - '/schemas/status.json#', - '/schemas/mapping.json#', - '/schemas/progress.json#', - '/schemas/switch.json#', - '/schemas/hbox.json#', - '/schemas/grid.json#', - '/schemas/json.json#', - '/schemas/list.json#', - '/schemas/operation.json#', - '/schemas/plain.json#' - ]; - - const root = {}; - let last = renderers.pop().replace(/#$/, ''); - let current = root; - - while (renderers.length) { - const renderer = renderers.shift().replace(/#$/, ''); - - current.if = { - $ref: `${renderer}#/definitions/test` - }; - - current.then = { - $ref: `${renderer}#/definitions/common` - }; - - current = current.else = {}; - } - - current['$ref'] = `${last}#/definitions/common`; - - console.log(JSON.stringify(root, null, 4)); -})(); - -// Control 里面各种类型 -(function () { - const renderers = [ - '/schemas/form/array.json#', - '/schemas/form/button-group.json#', - '/schemas/form/button-toolbar.json#', - '/schemas/form/button.json#', - '/schemas/form/chained-select.json#', - '/schemas/form/checkbox.json#', - '/schemas/form/checkboxes.json#', - '/schemas/form/color.json#', - '/schemas/form/combo.json#', - '/schemas/form/control.json#', - '/schemas/form/date-range.json#', - '/schemas/form/date.json#', - '/schemas/form/datetime.json#', - '/schemas/form/editor.json#', - '/schemas/form/email.json#', - '/schemas/form/fieldSet.json#', - '/schemas/form/file.json#', - '/schemas/form/formula.json#', - '/schemas/form/grid.json#', - '/schemas/form/group.json#', - '/schemas/form/hbox.json#', - '/schemas/form/hidden.json#', - '/schemas/form/image.json#', - '/schemas/form/list.json#', - '/schemas/form/matrix.json#', - '/schemas/form/number.json#', - '/schemas/form/tag.json#', - '/schemas/form/panel.json#', - '/schemas/form/password.json#', - '/schemas/form/picker.json#', - '/schemas/form/radios.json#', - '/schemas/form/range.json#', - '/schemas/form/repeat.json#', - '/schemas/form/reset.json#', - '/schemas/form/rich-text.json#', - '/schemas/form/select.json#', - '/schemas/form/service.json#', - '/schemas/form/static.json#', - '/schemas/form/sub-form.json#', - '/schemas/form/submit.json#', - '/schemas/form/switch.json#', - '/schemas/form/table.json#', - '/schemas/form/tabs.json#', - '/schemas/form/text.json#', - '/schemas/form/textarea.json#', - '/schemas/form/time.json#', - '/schemas/form/tree-select.json#', - '/schemas/form/tree.json#', - '/schemas/form/url.json#', - - // 其他 renderers - '/schemas/divider.json#', - '/schemas/cards.json#', - '/schemas/chart.json#', - '/schemas/collapse.json#', - '/schemas/crud.json#', - '/schemas/iframe.json#', - '/schemas/nav.json#', - '/schemas/tasks.json#', - '/schemas/video.json#', - '/schemas/wrapper.json#', - - '/schemas/form.json#/definitions/customControlItem' - ]; - - const root = {}; - let last = renderers.pop().replace(/#$/, ''); - let current = root; - - while (renderers.length) { - const renderer = renderers.shift().replace(/#$/, ''); - - current.if = { - $ref: `${renderer}#/definitions/test` - }; - - current.then = { - $ref: `${renderer}#/definitions/common` - }; - - current = current.else = {}; - } - - current['$ref'] = `${last}`; - - console.log(JSON.stringify(root, null, 4)); -})(); diff --git a/schemas/crud.json b/schemas/crud.json deleted file mode 100644 index 7aa0efe91..000000000 --- a/schemas/crud.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "$id": "/schemas/crud.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/crud.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|syncLocation|messages|masonryLayout|footable|title|name|perPageField|mode|api|orderField|initFetcch|filter|bulkActions|defaultParams|quickSaveApi|quickSaveItemApi|columns|card|listItem|draggable|innerClassName|itemChecckableOn|itemClassName|itemUncheckableOn|innerClassName|saveOrderApi|showFooter|showHeader|toolbar|toolbarClassName|toolbarInline|headerToolbar|footerToolbar)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "enum": ["crud"], - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis crud 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#crud", - "allOf": [ - { - "$ref": "/schemas/crud.json#/definitions/commonProps" - }, - { - "if": { - "properties": { - "mode": { - "const": "list" - } - } - }, - "then": { - "$ref": "/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "properties": { - "mode": { - "enum": ["cards", "grid"] - } - } - }, - "then": { - "$ref": "/schemas/cards.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/table.json#/definitions/common" - } - } - } - ] - }, - "commonProps": { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "api": { - "description": "初始化数据 API", - "type": "string" - }, - "bulkActions": { - "description": "批量操作", - "items": { - "allOf": [ - { - "$ref": "/schemas/action.json#/definitions/baseAction" - }, - { - "$ref": "/schemas/action.json#/definitions/baseButton" - } - ] - }, - "type": "array" - }, - "defaultParams": { - "description": "可以默认给定初始参数如: {\"perPage\": 24}", - "type": "object" - }, - "draggable": { - "description": "是否可通过拖拽排序", - "type": "boolean" - }, - "name": { - "description": "取个名字方便别的组件联动", - "type": "string" - }, - "draggableOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "Js 表达式。如 data.type == 1,用表达式来配置是否可拖拽排序" - }, - "filter": { - "$ref": "/schemas/form.json#/definitions/common", - "description": "过滤器表单" - }, - "initFetch": { - "default": true, - "description": "初始是否拉取", - "type": "boolean" - }, - "initFetchOn": { - "description": "初始是否拉取, 用表达式来设置", - "type": "string" - }, - "innerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置内部 DOM 的 className" - }, - "interval": { - "description": "设置自动刷新时间", - "type": "number" - }, - "itemCheckableOn": { - "description": "用来表达式来确定当前行是否可以点击", - "type": "string" - }, - "itemClassName": { - "description": "用来配置行数据的类名,支持表达式如:`text-<%= data.id > 10 ? 'danger' : 'info'%>`", - "type": "string" - }, - "itemUncheckableOn": { - "description": "用来表达式来确定当前行是否不可以点击", - "type": "string" - }, - "orderField": { - "description": "设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。", - "type": "string" - }, - "pageField": { - "description": "设置分页页码字段名。", - "type": "string" - }, - "perPageField": { - "description": "设置分页一页显示的多少条数据的字段名。", - "type": "string" - }, - "quickSaveApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "快速编辑后用来批量保存的 API" - }, - "quickSaveItemApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "快速编辑配置成及时保存时使用的 API" - }, - "saveOrderApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "保存排序的 api" - }, - "showFooter": { - "default": true, - "description": "是否显示 footer", - "type": "boolean" - }, - "showHeader": { - "default": true, - "description": "是否显示 header", - "type": "boolean" - }, - "syncLocation": { - "description": "是否将过滤条件的参数同步到地址栏,默认为true", - "type": "boolean" - }, - "toolbar": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "CRUD 中可以在 toolbar 中额外加入内容,默认将独占一行,如果想和批量操作,分页放在一起,请设置 toolbarInline" - }, - "toolbarClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 toolbar 的 class" - }, - "toolbarInline": { - "default": false, - "description": "是否让 toolbar 区域独占一行。", - "type": "boolean" - }, - "headerToolbar": { - "description": "顶部工具栏", - "type": "array", - "items": { - "oneOf": [ - { - "type": "object" - }, - - { - "type": "string" - } - ] - } - }, - - "footerToolbar": { - "description": "顶部工具栏", - "type": "array", - "items": { - "oneOf": [ - { - "type": "object" - }, - - { - "type": "string" - } - ] - } - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "crud" - } - } - } - }, - "description": "amis crud 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#crud", - "type": "object" -} diff --git a/schemas/date.json b/schemas/date.json deleted file mode 100644 index 585f1536d..000000000 --- a/schemas/date.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$id": "/schemas/date.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/date.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|format|valueFormat|placeholder|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为日期展示类型", - "enum": ["date", "datetime", "time"], - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis date 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "format": { - "description": "展示的时间格式,参考 moment 中的格式说明。", - "type": "string" - }, - "placeholder": { - "description": "占位符", - "type": "string" - }, - "valueFormat": { - "description": "值的时间格式,参考 moment 中的格式说明。", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "enum": ["date", "datetime", "time"] - } - } - } - }, - "description": "amis date 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/dialog.json b/schemas/dialog.json deleted file mode 100644 index 85a739b8c..000000000 --- a/schemas/dialog.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$id": "/schemas/dialog.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/dialog.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(className|initApi|initFetch|name|bodyClassName|title|body|size|actions|colseOnEsc|messages)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "dialog", - "description": "指定为 dialog 弹框渲染器", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Dialog 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dialog", - "properties": { - "actions": { - "description": "默认不用填写,自动会创建确认和取消按钮。", - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "closeOnEsc": { - "default": false, - "description": "是否支持按 ESC 关闭 Dialog", - "type": "boolean" - }, - "initApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 initApi 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 initApi 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前 dialog 取个名字,可用来跟其他 Renderer 交互。" - }, - "size": { - "description": "Dialog 大小", - "enum": ["xs", "sm", "md", "lg"] - }, - "title": { - "$ref": "/schemas/page.json#/definitions/container", - "default": "请通过配置 title 设置标题", - "description": "Dialog 标题" - } - } - }, - "test": { - "properties": { - "type": { - "const": "dialog" - } - } - } - }, - "description": "amis Dialog 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dialog", - "type": "object" -} diff --git a/schemas/divider.json b/schemas/divider.json deleted file mode 100644 index d55ec161c..000000000 --- a/schemas/divider.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$id": "/schemas/divider.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/divider.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|type)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为分隔符", - "const": "divider", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis plain 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - } - } - }, - "test": { - "properties": { - "type": { - "enum": ["divider"] - } - } - } - }, - "description": "amis plain 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/drawer.json b/schemas/drawer.json deleted file mode 100644 index ff226a20a..000000000 --- a/schemas/drawer.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$id": "/schemas/drawer.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/drawer.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(className|initApi|initFetch|name|bodyClassName|title|body|size|actions|colseOnEsc|messages)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "drawer", - "description": "指定为 drawer 弹框渲染器", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis drawer 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#drawer", - "properties": { - "actions": { - "description": "默认不用填写,自动会创建确认和取消按钮。", - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "closeOnEsc": { - "default": false, - "description": "是否支持按 ESC 关闭 drawer", - "type": "boolean" - }, - "initApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 initApi 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 initApi 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前 drawer 取个名字,可用来跟其他 Renderer 交互。" - }, - "size": { - "description": "drawer 大小", - "enum": ["xs", "sm", "md", "lg", "xl"] - }, - "title": { - "$ref": "/schemas/page.json#/definitions/container", - "default": "请通过配置 title 设置标题", - "description": "drawer 标题" - } - } - }, - "test": { - "properties": { - "type": { - "const": "drawer" - } - } - } - }, - "description": "amis drawer 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#drawer", - "type": "object" -} diff --git a/schemas/dropdown-button.json b/schemas/dropdown-button.json deleted file mode 100644 index a8d6e2adb..000000000 --- a/schemas/dropdown-button.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "$id": "/schemas/dropdown-button.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/dropdown-button.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|label|closeOnOutside|closeOnClick|block|btnClassName|level|size|primary|tooltip|buttons|className|disabled|disabledOn|hiddenOn|hidden|visible|visbileOn)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "dropdown-button", - "description": "指定为 DropDown Button 类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "block": { - "default": false, - "description": "是否独占一行 `display: block`", - "type": "boolean" - }, - "btnClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "给 Button 配置 className。" - }, - "buttons": { - "description": "按钮集合", - "items": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "/schemas/action.json#/definitions/baseAction" - }, - - { - "type": "object", - "properties": { - "type": { - "const": "divider" - } - }, - "additionalProperties": false, - "description": "分割符号" - } - ] - }, - { - "properties": { - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "label": { - "description": "按钮名字", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "type": "array" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "label": { - "description": "按钮文字", - "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": ["info", "success", "warning", "danger", "link", "primary"], - "type": "string" - }, - "primary": { - "default": false, - "description": "按钮是否为主按钮,影响样式。", - "type": "boolean" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg", "", "base"], - "type": "string" - }, - "tooltip": { - "description": "按钮提示文字,hover 时显示", - "type": "string" - }, - "type": { - "enum": ["dropdown-button"], - "type": "string" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "closeOnOutside": { - "type": "boolean", - "description": "点击外部是否关闭" - }, - "closeOnClick": { - "type": "boolean", - "description": "点击内容是否关闭" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "dropdown-button" - } - } - } - }, - "dependencies": {}, - "description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button" -} diff --git a/schemas/each.json b/schemas/each.json deleted file mode 100644 index c73704d8a..000000000 --- a/schemas/each.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$id": "/schemas/each.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/each.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|name|items)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "each", - "description": "指定为each展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis each 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "name": { - "description": "字段名", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "each" - } - } - } - }, - "description": "amis each 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/form.json b/schemas/form.json deleted file mode 100644 index 30c905e52..000000000 --- a/schemas/form.json +++ /dev/null @@ -1,1268 +0,0 @@ -{ - "$id": "/schemas/form.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(?:type|\\$ref|debug|api|redirect|reload|debug|name|initApi|initAsyncApi|initFetch|initSchemaFetch|initFinishedField|initCheckInterval|schemaApi|asyncApi|checkInterval|finishedField|primaryField|className|panelClassName|title|mode|horizontal|columnClassName|horizontalDeeper|controls|submitText|submitOnChange|collapsable|data|persistData|clearPersistDataAfterSubmit|resetAfterSubmit|submitOnInit|wrapWithPanel|actions|fieldSet|target|tabs|footer|footerClassName|autoFocus|attachChanged|changedKey|changedTrueValue|changedFalseValue|messages|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "form", - "description": "指定为 Form 表单类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "test": { - "properties": { - "type": { - "const": "form" - } - } - }, - "common": { - "description": "amis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", - "dependencies": { - "checkInterval": ["asyncApi"], - "finishedField": ["asyncApi"] - }, - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actions": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "size": { - "type": "string", - "description": "表单项大小设置", - "enum": ["xs", "sm", "md", "lg", "full", ""] - }, - "remark": { - "oneOf": [ - { - "type": "string", - "description": "显示一个小图标, 鼠标放上去的时候显示提示内容" - }, - - { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "标题" - }, - "content": { - "type": "string", - "description": "内容" - }, - "position": { - "type": "string", - "description": "弹出位置", - "enum": ["left", "right", "top", "bottom"] - }, - "icon": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "图标的 CSS 类名", - "default": "fa fa-question-circle" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "trigger": { - "type": "array", - "description": "触发方式", - "items": { - "type": "string", - "enum": ["hover", "focus", "click"] - } - }, - "rootClose": { - "type": "boolean", - "description": "是否点击其他位置关闭提示,触发方式使用 click 时有用。" - } - } - } - ] - }, - "labelRemark": { - "oneOf": [ - { - "type": "string", - "description": "label 旁显示一个小图标, 鼠标放上去的时候显示提示内容" - }, - - { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "标题" - }, - "content": { - "type": "string", - "description": "内容" - }, - "position": { - "type": "string", - "description": "弹出位置", - "enum": ["left", "right", "top", "bottom"] - }, - "icon": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "图标的 CSS 类名", - "default": "fa fa-question-circle" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "trigger": { - "type": "array", - "description": "触发方式", - "items": { - "type": "string", - "enum": ["hover", "focus", "click"] - } - }, - "rootClose": { - "type": "boolean", - "description": "是否点击其他位置关闭提示,触发方式使用 click 时有用。" - } - } - } - ] - }, - "hint": { - "type": "string", - "description": "输入提示,聚焦的时候显示" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "Form 用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "asyncApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "autoFocus": { - "default": true, - "description": "是否自动将第一个表单元素聚焦。", - "type": "boolean" - }, - "checkInterval": { - "default": 3000, - "description": "轮训请求的时间间隔,默认为 3秒。设置 asyncApi 才有效", - "minimum": 1000, - "type": "number" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "collapsable": { - "default": false, - "description": "当通过 fieldSet 方式设置 [FormItem](https://baidu.github.io/amis/docs/renderers#formitem) 时有效。开启可收起与展开功能。", - "type": "boolean" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "data": { - "description": "初始数据,设置得值可用于组件内部模板使用。", - "type": "object" - }, - "debug": { - "default": false, - "description": "开启后可查看 form 数据", - "type": "boolean" - }, - "fieldSet": { - "description": "deprecated, 请在 controls 中使用 type: 'fieldSet' 代替" - }, - "finishedField": { - "default": "finished", - "description": "如果决定结束的字段名不是 `finished` 请设置此属性,比如 `is_success`", - "type": "string" - }, - "footer": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "Footer 区域" - }, - "footerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "Footer 区域 className" - }, - "horizontal": { - "additionalProperties": false, - "default": { - "left": 2 - }, - "description": "当 mode 为 horizontal 时有用,用来控制 label 和 input 的宽度占比。", - "properties": { - "left": { - "type": ["string", "number"] - }, - "leftFixed": { - "oneOf": [ - { - "type": "string", - "enum": ["", "xs", "sm", "md", "lg"] - }, - { - "type": "boolean" - } - ] - }, - "right": { - "type": ["string", "number"] - }, - "offset": { - "type": ["string", "number"] - } - }, - "type": "object" - }, - "initApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "Form 用来获取初始数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "initAsyncApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "Form 用来获取初始数据的 api,与initApi不同的是,会一直轮训请求该接口,直到返回 finished 属性为 true 才 结束。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "initCheckInterval": { - "default": 3000, - "description": "设置了initAsyncApi以后,默认拉取的时间间隔", - "type": "number" - }, - "initFetch": { - "default": true, - "description": "设置了initApi或者initAsyncApi后,默认会开始就发请求,设置为false后就不会起始就请求接口", - "type": "boolean" - }, - "initFinishedField": { - "default": "finished", - "description": "设置了initAsyncApi后,默认会从返回数据的data.finished来判断是否完成,也可以设置成其他的xxx,就会从data.xxx中获取", - "type": "string" - }, - "persistData": { - "default": false, - "description": "是否开启本地缓存", - "type": "boolean" - }, - "clearPersistDataAfterSubmit": { - "default": false, - "description": "提交成功后清空本地缓存", - "type": "boolean" - }, - "resetAfterSubmit": { - "default": false, - "description": "提交完后重置表单", - "type": "boolean" - }, - "messages": { - "description": "接口返回消息提示", - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "获取失败时提示", - "type": "string" - }, - "fetchSuccess": { - "description": "获取成功时提示", - "type": "string" - }, - "saveFailed": { - "description": "保存成功时提示", - "type": "string" - }, - "saveSuccess": { - "description": "保存失败时提示", - "type": "string" - } - }, - "type": "object" - }, - "mode": { - "default": "normal", - "description": "表单展示方式,可以是:normal、horizontal 或者 inline。示例:https://baidu.github.io/amis/docs/demo/forms/mode", - "enum": ["normal", "horizontal", "inline"], - "type": "string" - }, - "name": { - "description": "可以取个名字,方便其他组件引用", - "type": "string" - }, - "panelClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 panel className" - }, - "primaryField": { - "default": "id", - "description": "设置主键 id, 当设置后,检测表单是否完成时(asyncApi),只会携带此数据。", - "type": "string" - }, - "redirect": { - "description": "保存完后,可以指定跳转地址,支持相对路径和组内绝对路径,同时可以通过 $xxx 使用变量", - "type": "string" - }, - "reload": { - "description": "保存完后,可以指定目标组件刷新", - "type": "string" - }, - "submitOnChange": { - "default": false, - "description": "表单修改即提交", - "type": "boolean" - }, - "submitOnInit": { - "default": false, - "description": "表单初始先提交一次,联动的时候有用", - "type": "boolean" - }, - "submitText": { - "$ref": "/schemas/page.json#/definitions/stringOrNull", - "default": "提交", - "description": "默认的提交按钮名称,如果设置成空,则可以把默认按钮去掉。" - }, - "tabs": { - "description": "deprecated, 请再 controls 里面添加 type:tabs 节点代替" - }, - "target": { - "description": "默认表单提交自己会通过发送 api 保存数据,但是也可以设定另外一个 form 的 name 值,或者另外一个 `CRUD` 模型的 name 值。 如果 target 目标是一个 `Form` ,则目标 `Form` 会重新触发 `initApi` 和 `schemaApi`,api 可以拿到当前 form 数据。如果目标是一个 `CRUD` 模型,则目标模型会重新触发搜索,参数为当前 Form 数据。", - "type": "string" - }, - "title": { - "$ref": "/schemas/page.json#/definitions/stringOrNull", - "default": "表单", - "description": "表单标题" - }, - "type": { - "const": "form", - "description": "指定为表单类型", - "type": "string" - }, - "wrapWithPanel": { - "default": false, - "description": "是否用 panel 包裹起来", - "type": "boolean" - } - }, - "type": "object" - }, - "customControlItem": { - "description": "自定组件,非系统组件,请确保你已在自定义组件中添加了对应的组件。", - "properties": { - "type": { - "pattern": "^(?!^(?:text|control|form|color|formula|plain|number|url|email|hidden|password|textarea|select|multi-select|chained-select|nested-select|checkbox|checkboxes|radios|switch|date|datetime|time|date-range|image|file|picker|rich-text|editor|diff-editor|.*-editor|repeat|tree|city|rating|form|range|list|matrix|combo|divider|static|table|button|button-group|dropdown-button|button-toolbar|panel|hbox|grid|tpl|plain|html|submit|reset|fieldSet|tabs|group|static|static-.*)$)", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - }, - "controlItem": { - "if": { - "$ref": "/schemas/form/array.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/array.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/button-group.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/button-group.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/button-toolbar.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/button-toolbar.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/button.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/button.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/chained-select.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/chained-select.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/checkbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/checkbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/checkboxes.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/checkboxes.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/color.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/color.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/combo.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/combo.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/control.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/control.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/date-range.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/date-range.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/date.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/date.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/datetime.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/datetime.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/editor.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/editor.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/email.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/email.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/fieldSet.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/fieldSet.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/file.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/file.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/formula.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/formula.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/grid.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/group.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/group.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/hbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/hidden.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/hidden.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/image.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/image.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/list.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/matrix.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/matrix.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/number.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/number.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/panel.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/panel.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/password.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/password.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/picker.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/picker.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/radios.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/radios.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/range.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/range.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/repeat.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/repeat.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/reset.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/reset.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/rich-text.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/rich-text.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/select.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/select.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/service.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/service.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/static.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/static.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/sub-form.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/sub-form.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/submit.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/submit.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/switch.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/table.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/table.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/tabs.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/tabs.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/text.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/text.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/textarea.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/textarea.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/time.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/time.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/tree-select.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/tree-select.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/tree.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/tree.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form/url.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form/url.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/divider.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/divider.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/cards.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/cards.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/chart.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/chart.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/collapse.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/collapse.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/crud.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/crud.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/iframe.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/iframe.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/nav.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/nav.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/tasks.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tasks.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/video.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/video.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/wrapper.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/wrapper.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/form.json#/definitions/customControlItem" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "controls": { - "items": { - "$ref": "/schemas/form.json#/definitions/controlItem" - }, - "type": "array" - }, - "item": { - "properties": { - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "desc": { - "description": "请改用 description", - "type": "string" - }, - "validateOnChange": { - "type": "boolean", - "description": "不设置时,当表单提交过后表单项每次修改都会触发重新验证,如果设置了,则由此配置项来决定要不要每次修改都触发验证。" - }, - "description": { - "description": "描述内容,支持 Html 片段。", - "type": "string" - }, - "descriptionClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置描述上的 className" - }, - "disabled": { - "description": "是否禁用", - "type": "boolean" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否禁用。" - }, - "hidden": { - "description": "是否隐藏", - "type": "boolean" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "horizontal": { - "additionalProperties": false, - "default": { - "left": 2 - }, - "description": "当表单的展示方式为水平方式时,用来控制 label 和 input 的宽度占比。", - "properties": { - "right": { - "type": "number" - }, - "left": { - "type": "number" - }, - "leftFixed": { - "oneOf": [ - { - "type": ["string", "number"] - }, - { - "type": "boolean" - } - ] - } - }, - "type": "object" - }, - "mode": { - "description": "配置当前表单项展示模式", - "type": "string", - "enum": ["normal", "inline", "horizontal"] - }, - "inline": { - "description": "是否为 inline 模式。", - "type": "boolean" - }, - "inputClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 input className" - }, - "label": { - "description": "描述标题", - "onOf": [ - { - "type": "string" - }, - { - "enum": [false] - } - ] - }, - "labelClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 label className" - }, - "name": { - "$ref": "/schemas/form.json#/definitions/name", - "description": "字段名,表单提交时的 key" - }, - "placeholder": { - "description": "占位符", - "type": "string" - }, - "required": { - "description": "是否为必填", - "type": "boolean" - }, - "submitOnChange": { - "description": "是否一修改就提交。", - "type": "boolean" - }, - "validationErrors": { - "description": "验证失败的提示信息", - "properties": { - "isAlpha": { - "default": "请输入字母", - "type": "string" - }, - "isAlphanumeric": { - "default": "请输入字母或者数字", - "type": "string" - }, - "isEmail": { - "default": "Email 格式不正确", - "type": "string" - }, - "isFloat": { - "default": "请输入浮点型数值", - "type": "string" - }, - "isInt": { - "default": "请输入整形数字", - "type": "string" - }, - "isJson": { - "default": "请检查 Json 格式。", - "type": "string" - }, - "isLength": { - "default": "请输入长度为 $1 的内容", - "type": "string" - }, - "isNumeric": { - "default": "请输入数字", - "type": "string" - }, - "isRequired": { - "default": "这是必填项", - "type": "string" - }, - "isUrl": { - "default": "Url 格式不正确", - "type": "string" - }, - "matchRegexp": { - "type": "string" - }, - "matchRegexp2": { - "type": "string" - }, - "matchRegexp3": { - "type": "string" - }, - "matchRegexp4": { - "type": "string" - }, - "matchRegexp5": { - "type": "string" - }, - "maxLength": { - "default": "请控制内容长度, 请不要输入 $1 个字符以上", - "type": "string" - }, - "maximum": { - "default": "当前输入值超出最大值 $1,请检查", - "type": "string" - }, - "minLength": { - "default": "请输入更多的内容,至少输入 $1 个字符。", - "type": "string" - }, - "minimum": { - "default": "当前输入值低于最小值 $1,请检查", - "type": "string" - } - }, - "type": "object" - }, - "validations": { - "description": "验证器", - "oneOf": [ - { - "type": "string" - }, - { - "properties": { - "isAlpha": { - "description": "是否是字母", - "type": "boolean" - }, - "isAlphanumeric": { - "description": "是否为字母数字", - "type": "boolean" - }, - "isEmail": { - "description": "是否为邮箱地址", - "type": "boolean" - }, - "isFloat": { - "description": "是否为浮点型", - "type": "boolean" - }, - "isInt": { - "description": "是否为整型", - "type": "boolean" - }, - "isJson": { - "description": "是否为 json", - "type": "number" - }, - "isLength": { - "description": "长度等于指定值", - "type": "number" - }, - "isNumeric": { - "description": "是否为数字", - "type": "boolean" - }, - "isRequired": { - "description": "是否为必填", - "type": "boolean" - }, - "isUrl": { - "description": "是否为 URL 地址", - "type": "boolean" - }, - "matchRegexp": { - "description": "内容命中指定正则", - "type": "string" - }, - "matchRegexp2": { - "description": "内容命中指定正则", - "type": "string" - }, - "matchRegexp3": { - "description": "内容命中指定正则", - "type": "string" - }, - "matchRegexp4": { - "description": "内容命中指定正则", - "type": "string" - }, - "matchRegexp5": { - "description": "内容命中指定正则", - "type": "string" - }, - "maxLength": { - "description": "最大长度为指定值", - "type": "number" - }, - "maximum": { - "description": "最大值为指定值", - "type": "number" - }, - "minLength": { - "description": "最小长度为指定值", - "type": "number" - }, - "minimum": { - "description": "最小值为指定值", - "type": "number" - } - }, - "type": "object" - } - ] - }, - "value": { - "description": "默认值,不支持变量。" - }, - "visible": { - "description": "是否显示", - "type": "boolean" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "name": { - "description": "变量名称", - "pattern": "^\\S+$", - "type": "string" - }, - "nestedOptionsType": { - "items": { - "description": "选项", - "properties": { - "children": { - "$ref": "/schemas/form.json#/definitions/nestedOptionsType" - }, - "disabled": { - "default": false, - "description": "配置当前值是否可选", - "type": "boolean" - }, - "label": { - "description": "用来显示的值", - "type": "string" - }, - "value": { - "description": "用来存储的值", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object" - } - ] - } - }, - "required": ["label", "value"], - "type": "object" - }, - "type": "array" - }, - "optionsType": { - "oneOf": [ - { - "description": "多个选项,请用 `,` 英文逗号隔开。", - "type": "string" - }, - { - "description": "key 是值,value 是展示信息。", - "type": "object" - }, - { - "items": { - "oneOf": [ - { - "description": "选项值", - "type": "string" - }, - { - "description": "选项", - "properties": { - "disabled": { - "default": false, - "description": "配置当前值是否可选", - "type": "boolean" - }, - "disabledOn": { - "description": "可通过表达是配置是否禁用", - "type": "string" - }, - "hiddenOn": { - "description": "可通过表达是配置是否隐藏", - "type": "string" - }, - "icon": { - "description": "图标", - "type": "string" - }, - "label": { - "description": "用来显示的值", - "type": "string" - }, - "value": { - "description": "用来存储的值", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "object" - } - ] - }, - "visibleOn": { - "description": "可通过表达是配置是否可见", - "type": "string" - } - }, - "required": ["value"], - "type": "object" - } - ] - }, - "type": "array" - }, - { - "description": "key 为保存的值,value 为展示的值。", - "type": "object" - } - ] - } - }, - "description": "amis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", - "type": "object" -} diff --git a/schemas/form/array.json b/schemas/form/array.json deleted file mode 100644 index b5c33b666..000000000 --- a/schemas/form/array.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "$id": "/schemas/form/array.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/array.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|addButtonClassName|addButtonText|addable|items|draggable|maxLength|minLength|removeAble|subFormMode|conditions|formClassName|typeSwitchable|deleteApi|deleteConfirmText|noBorder|dragIcon|deleteIcon|scaffold|multiple|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": "array", - "description": "指定为数组输入框类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "数组输入框框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "scaffold": { - "description": "单组表单项初始值。默认为 `{}`", - "type": "object" - }, - "deleteIcon": { - "description": "删除按钮的图标", - "type": "string" - }, - "dragIcon": { - "description": "拖动按钮的图标", - "type": "string" - }, - "noBorder": { - "default": "true", - "description": "是否含有边框", - "type": "boolean" - }, - "deleteConfirmText": { - "description": "确认删除时的提示", - "type": "string" - }, - "deleteApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "删除时调用的api" - }, - "typeSwitchable": { - "default": "false", - "description": "是否可切换条件,配合`conditions`使用", - "type": "boolean" - }, - "conditions": { - "description": "符合某类条件后才渲染的schema", - "type": "array" - }, - "formClassName": { - "description": "内部单组表单项的类名", - "type": "string" - }, - "addButtonClassName": { - "description": "新增按钮CSS类名", - "type": "string" - }, - "addButtonText": { - "default": "新增", - "description": "新增按钮文字", - "type": "string" - }, - "addable": { - "description": "是否可新增", - "type": "boolean" - }, - "items": { - "description": "数组输入框的子项", - "items": { - "$ref": "/schemas/form.json#/definitions/controlItem" - }, - "type": "array" - }, - "draggable": { - "description": "是否可拖拽排序", - "type": "boolean" - }, - "maxLength": { - "description": "限制最大个数", - "type": "number" - }, - "minLength": { - "description": "限制最小个数", - "type": "number" - }, - "multiple": { - "description": "是否可多选", - "type": "boolean" - }, - "removeAble": { - "description": "是否可删除", - "type": "boolean" - }, - "subFormMode": { - "default": "normal", - "description": "设置 form 的模式", - "enum": ["normal", "horizontal", "inline"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "array" - } - } - } - }, - "description": "数组输入框框格式说明", - "type": "object" -} diff --git a/schemas/form/button-group.json b/schemas/form/button-group.json deleted file mode 100644 index 1428f2191..000000000 --- a/schemas/form/button-group.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "$id": "/schemas/form/button-group.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/button-group.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|buttons|source|options|clearable|size|btnClassName|btnActiveClassName|vertical|multiple|joinValues|delimiter|extractValue|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|validations|validationErrors|validateOnChange|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "button-group", - "description": "指定为按钮组" - } - }, - "type": "object" - } - ], - "definitions": { - "common": { - "description": "按钮组格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "获取选项的接口" - }, - "btnActiveClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "btn-default active", - "description": "配置选中按钮 className" - }, - "btnClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "btn-default", - "description": "配置按钮 className" - }, - "buttons": { - "description": "按钮集合", - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 dom className" - }, - "clearable": { - "default": false, - "description": "是否可清空", - "type": "boolean" - }, - "options": { - "$ref": "/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" - }, - "vertical": { - "default": "false", - "description": "垂直排列", - "type": "boolean" - }, - "size": { - "default": "md", - "description": "设置大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "button-group" - } - } - } - }, - "description": "按钮组格式说明", - "type": "object" -} diff --git a/schemas/form/button-toolbar.json b/schemas/form/button-toolbar.json deleted file mode 100644 index d850c3908..000000000 --- a/schemas/form/button-toolbar.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$id": "/schemas/form/button-toolbar.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/button-toolbar.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|buttons|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|inputClassName|labelClassName|descriptionClassName|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "button-toolbar", - "description": "指定为按钮工具栏" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "按钮工具栏格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "buttons": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "button-toolbar" - } - } - } - }, - "description": "按钮工具栏格式说明", - "type": "object" -} diff --git a/schemas/form/button.json b/schemas/form/button.json deleted file mode 100644 index ad3123c55..000000000 --- a/schemas/form/button.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "$id": "/schemas/form/button.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/button.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|icon|size|level|iconOnly|href|action|tooltip|tooltipPlacement|disabledTip|actionType|api|target|reload|url|link|dialog|drawer|content|feedback|confirmText|blank|nextCondition|name|value|placeholder|label|remark|labelRemark|desc|description|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "button", - "description": "指定为提交按钮类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "按钮格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "$ref": "/schemas/action.json#/definitions/baseAction" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "label": { - "description": "按钮名字", - "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": [ - "info", - "success", - "warning", - "danger", - "link", - "primary" - ], - "type": "string" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - }, - "href": { - "description": "链接", - "type": "string" - }, - "feedback": { - "description": "请求返回的响应,内部schema格式同dialog", - "type": "object" - }, - "tooltip": { - "description": "按钮提示文字,hover 时显示", - "type": "string" - }, - "disabledTip": { - "description": "禁用时按钮提示文字,hover 时显示", - "type": "string" - }, - "tooltipPlacement": { - "default": "top", - "description": "按钮提示文字显示的位置", - "enum": ["left", "top", "right", "bottom"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "button" - } - } - } - }, - "description": "按钮格式说明", - "type": "object" -} diff --git a/schemas/form/chained-select.json b/schemas/form/chained-select.json deleted file mode 100644 index 8015cdc0a..000000000 --- a/schemas/form/chained-select.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$id": "/schemas/form/chained-select.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|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": "chained-select", - "description": "指定为级联选择框" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "级联选择框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "options": { - "$ref": "/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" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "chained-select" - } - } - } - }, - "description": "级联选择框格式说明", - "type": "object" -} diff --git a/schemas/form/checkbox.json b/schemas/form/checkbox.json deleted file mode 100644 index 6581f57f6..000000000 --- a/schemas/form/checkbox.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$id": "/schemas/form/checkbox.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/checkbox.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|trueValue|falseValue|option|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": "checkbox", - "description": "指定为勾选框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "Checkbox 勾选框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "falseValue": { - "default": false, - "description": "未勾选值" - }, - "option": { - "description": "选项说明", - "type": "string" - }, - "trueValue": { - "default": true, - "description": "勾选值" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "checkbox" - } - } - } - }, - "description": "Checkbox 勾选框格式说明", - "type": "object" -} diff --git a/schemas/form/checkboxes.json b/schemas/form/checkboxes.json deleted file mode 100644 index 8fe22bb63..000000000 --- a/schemas/form/checkboxes.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$id": "/schemas/form/checkboxes.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/checkboxes.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|defaultCheckAll|checkAll|joinValues|delimiter|columnsCount|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": "checkboxes", - "description": "指定为复选框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "复选框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "checkAll": { - "description": "是否开启全选功能", - "type": "boolean" - }, - "defaultCheckAll": { - "description": "是否默认全选", - "type": "boolean" - }, - "columnsCount": { - "default": 1, - "description": "每行显示多少个", - "type": "number" - }, - "delimiter": { - "default": ",", - "description": "分割符", - "type": "string" - }, - "joinValues": { - "default": false, - "description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。", - "type": "boolean" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem ,也可以从当前作用域拉取数据 $typeOptions" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "checkboxes" - } - } - } - }, - "description": "复选框格式说明", - "type": "object" -} diff --git a/schemas/form/city.json b/schemas/form/city.json deleted file mode 100644 index 0e6c78055..000000000 --- a/schemas/form/city.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$id": "/schemas/form/city.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/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": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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" -} diff --git a/schemas/form/color.json b/schemas/form/color.json deleted file mode 100644 index 2ba4e81b2..000000000 --- a/schemas/form/color.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$id": "/schemas/form/color.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/color.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|format|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": "color", - "description": "指定为 color 类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "颜色输入框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "clearable": { - "default": true, - "description": "是否显示清除按钮", - "type": "boolean" - }, - "format": { - "description": "颜色格式", - "enum": ["hex", "rgb", "rgba", "hls"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "color" - } - } - } - }, - "description": "颜色输入框格式说明", - "type": "object" -} diff --git a/schemas/form/combo.json b/schemas/form/combo.json deleted file mode 100644 index 6da40f74e..000000000 --- a/schemas/form/combo.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "$id": "/schemas/form/combo.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/combo.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|addButtonClassName|addButtonText|addable|controls|draggable|maxLength|minLength|multiLine|removeAble|subFormMode|flat|conditions|formClassName|typeSwitchable|deleteApi|deleteConfirmText|noBorder|dragIcon|deleteIcon|scaffold|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": "combo", - "description": "指定为组合输入框类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "数组输入框框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "scaffold": { - "description": "单组表单项初始值。默认为 `{}`", - "type": "object" - }, - "deleteIcon": { - "description": "删除按钮的图标", - "type": "string" - }, - "dragIcon": { - "description": "拖动按钮的图标", - "type": "string" - }, - "noBorder": { - "default": "true", - "description": "是否含有边框", - "type": "boolean" - }, - "deleteConfirmText": { - "description": "确认删除时的提示", - "type": "string" - }, - "deleteApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "删除时调用的api" - }, - "typeSwitchable": { - "default": "false", - "description": "是否可切换条件,配合`conditions`使用", - "type": "boolean" - }, - "conditions": { - "description": "符合某类条件后才渲染的schema", - "type": "array" - }, - "formClassName": { - "description": "内部单组表单项的类名", - "type": "string" - }, - "addButtonClassName": { - "description": "新增按钮CSS类名", - "type": "string" - }, - "addButtonText": { - "default": "新增", - "description": "新增按钮文字", - "type": "string" - }, - "addable": { - "description": "是否可新增", - "type": "boolean" - }, - "controls": { - "description": "数组输入框的子项", - "items": { - "$ref": "/schemas/form.json#/definitions/controlItem" - }, - "type": "array" - }, - "delimiter": { - "default": ",", - "description": "当扁平化开启并且joinValues为true时,用什么分隔符", - "type": "string" - }, - "draggable": { - "description": "是否可拖拽排序", - "type": "boolean" - }, - "flat": { - "default": false, - "description": "是否将结果扁平化(去掉name),只有当controls的length为1且multiple为true的时候才有效", - "type": "boolean" - }, - "joinValues": { - "default": true, - "description": "当扁平化开启的时候,是否用分隔符的形式发送给后端,否则采用array的方式", - "type": "boolean" - }, - "maxLength": { - "description": "限制最大个数", - "type": "number" - }, - "minLength": { - "description": "限制最小个数", - "type": "number" - }, - "multiLine": { - "default": false, - "description": "是否多行模式,默认一行展示完", - "type": "boolean" - }, - "multiple": { - "description": "是否可多选", - "type": "boolean" - }, - "removeAble": { - "description": "是否可删除", - "type": "boolean" - }, - "subFormMode": { - "default": "normal", - "description": "设置 form 的模式", - "enum": ["normal", "horizontal", "inline"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "combo" - } - } - } - }, - "description": "数组输入框框格式说明", - "type": "object" -} diff --git a/schemas/form/control.json b/schemas/form/control.json deleted file mode 100644 index a74073e10..000000000 --- a/schemas/form/control.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$id": "/schemas/form/control.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/control.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|control)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "control", - "description": "指定为 Control 表单输入项" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "隐藏域格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "control": { - "$ref": "/schemas/form.json#/definitions/controlItem" - }, - "type": { - "const": "control", - "description": "指定为输入框" - } - }, - "required": ["type"], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "control" - } - } - } - }, - "description": "隐藏域格式说明" -} diff --git a/schemas/form/date-range.json b/schemas/form/date-range.json deleted file mode 100644 index 1f38d213c..000000000 --- a/schemas/form/date-range.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$id": "/schemas/form/date-range.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/date-range.json#/definitions/common" - }, - { - "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": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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" -} diff --git a/schemas/form/date.json b/schemas/form/date.json deleted file mode 100644 index a80cc32ee..000000000 --- a/schemas/form/date.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$id": "/schemas/form/date.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/date.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|format|inputFormat|minDate|maxDate|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": "date", - "description": "指定为日期输入类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "日期输入框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "clearable": { - "default": true, - "description": "是否显示清除按钮", - "type": "boolean" - }, - "format": { - "default": "X", - "description": "默认 `X` 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.", - "type": "string" - }, - "inputFormat": { - "default": "YYYY-MM-DD", - "description": "默认 `YYYY-MM-DD` 用来配置显示的时间格式。", - "type": "string" - }, - "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" - } - } - } - }, - "description": "日期输入框格式说明", - "type": "object" -} diff --git a/schemas/form/datetime.json b/schemas/form/datetime.json deleted file mode 100644 index f9f64182a..000000000 --- a/schemas/form/datetime.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$id": "/schemas/form/datetime.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/datetime.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|format|inputFormat|timeFormat|minDate|maxDate|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": "datetime", - "description": "指定为日期时间输入类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "日期时间输入框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "clearable": { - "default": true, - "description": "是否显示清除按钮", - "type": "boolean" - }, - "format": { - "default": "X", - "description": "默认 `X` 即时间戳格式,用来提交的时间格式。更多格式类型请参考 moment.", - "type": "string" - }, - "inputFormat": { - "default": "YYYY-MM-DD HH:mm:ss", - "description": "默认 `YYYY-MM-DD` 用来配置显示的datetime格式。", - "type": "string" - }, - "timeFormat": { - "default": "HH:mm:ss", - "description": "默认 `HH:mm:ss` 用来配置显示的time格式。", - "type": "string" - }, - "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-time" - } - } - } - }, - "description": "日期时间输入框格式说明", - "type": "object" -} diff --git a/schemas/form/diff-editor.json b/schemas/form/diff-editor.json deleted file mode 100644 index dfc123ab3..000000000 --- a/schemas/form/diff-editor.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "$id": "/schemas/form/diff-editor.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/diff-editor.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|language|diffValue|theme|disabled|size|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": { - "description": "指定为编辑器类型", - "const": "diff-editor" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "编辑器格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "language": { - "const": [ - "bat", - "c", - "coffeescript", - "cpp", - "csharp", - "css", - "dockerfile", - "fsharp", - "go", - "handlebars", - "html", - "ini", - "java", - "javascript", - "json", - "less", - "lua", - "markdown", - "msdax", - "objective-c", - "php", - "plaintext", - "postiats", - "powershell", - "pug", - "python", - "r", - "razor", - "ruby", - "sb", - "scss", - "sol", - "sql", - "swift", - "typescript", - "vb", - "xml", - "yaml" - ], - "default": "javascript", - "description": "语言类型", - "type": "string" - }, - "size": { - "default": "sm", - "description": "设置编辑器的大小", - "enum": ["sm", "md", "lg", "xl", "xxl"], - "type": "string" - }, - "theme": { - "description": "主题", - "type": "string" - }, - "diffValue": { - "description": "左侧值", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "diff-editor" - } - } - } - }, - "description": "编辑器格式说明", - "type": "object" -} diff --git a/schemas/form/editor.json b/schemas/form/editor.json deleted file mode 100644 index 156633041..000000000 --- a/schemas/form/editor.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "$id": "/schemas/form/editor.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/editor.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|language|size|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": { - "description": "指定为编辑器类型", - "enum": [ - "editor", - "bat-editor", - "c-editor", - "coffeescript-editor", - "cpp-editor", - "csharp-editor", - "css-editor", - "dockerfile-editor", - "fsharp-editor", - "go-editor", - "handlebars-editor", - "html-editor", - "ini-editor", - "java-editor", - "javascript-editor", - "json-editor", - "less-editor", - "lua-editor", - "markdown-editor", - "msdax-editor", - "objective-c-editor", - "php-editor", - "plaintext-editor", - "postiats-editor", - "powershell-editor", - "pug-editor", - "python-editor", - "r-editor", - "razor-editor", - "ruby-editor", - "sb-editor", - "scss-editor", - "sol-editor", - "sql-editor", - "swift-editor", - "typescript-editor", - "vb-editor", - "xml-editor", - "yaml-editor", - "js-editor" - ] - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "编辑器格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "language": { - "const": [ - "bat", - "c", - "coffeescript", - "cpp", - "csharp", - "css", - "dockerfile", - "fsharp", - "go", - "handlebars", - "html", - "ini", - "java", - "javascript", - "json", - "less", - "lua", - "markdown", - "msdax", - "objective-c", - "php", - "plaintext", - "postiats", - "powershell", - "pug", - "python", - "r", - "razor", - "ruby", - "sb", - "scss", - "sol", - "sql", - "swift", - "typescript", - "vb", - "xml", - "yaml" - ], - "default": "javascript", - "description": "语言类型", - "type": "string" - }, - "size": { - "default": "sm", - "description": "设置编辑器的大小", - "enum": ["sm", "md", "lg", "xl", "xxl"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "enum": [ - "editor", - "bat-editor", - "c-editor", - "coffeescript-editor", - "cpp-editor", - "csharp-editor", - "css-editor", - "dockerfile-editor", - "fsharp-editor", - "go-editor", - "handlebars-editor", - "html-editor", - "ini-editor", - "java-editor", - "javascript-editor", - "json-editor", - "less-editor", - "lua-editor", - "markdown-editor", - "msdax-editor", - "objective-c-editor", - "php-editor", - "plaintext-editor", - "postiats-editor", - "powershell-editor", - "pug-editor", - "python-editor", - "r-editor", - "razor-editor", - "ruby-editor", - "sb-editor", - "scss-editor", - "sol-editor", - "sql-editor", - "swift-editor", - "typescript-editor", - "vb-editor", - "xml-editor", - "yaml-editor", - "js-editor" - ] - } - } - } - }, - "description": "编辑器格式说明", - "type": "object" -} diff --git a/schemas/form/email.json b/schemas/form/email.json deleted file mode 100644 index d883adbd8..000000000 --- a/schemas/form/email.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$id": "/schemas/form/email.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/email.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|autoComplete|clearable|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": "email", - "description": "指定为邮箱输入框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "邮箱输入框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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": "/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": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "autoComplete": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "跟 source 不同的是,每次用户输入都会去接口获取提示,请不要跟 source 同时使用。" - }, - "options": { - "$ref": "/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": "email" - } - } - } - }, - "description": "邮箱输入框格式说明", - "type": "object" -} diff --git a/schemas/form/fieldSet.json b/schemas/form/fieldSet.json deleted file mode 100644 index a5361d6a6..000000000 --- a/schemas/form/fieldSet.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "$id": "/schemas/form/fieldSet.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/fieldSet.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|title|className|body|size|controls|collapsed|collapsable|mode|horizontal|hiddenOn|visibleOn|visible|hidden)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "fieldSet", - "description": "指定为 fieldSet 类型渲染器" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis FieldSet 渲染器格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 fieldSet className" - }, - "collapsable": { - "type": "boolean", - "description": "是否可折叠" - }, - "collapsed": { - "default": false, - "description": "是否默认收起来", - "type": "boolean" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "hidden": { - "type": "boolean", - "description": "是否隐藏" - }, - "title": { - "description": "标题", - "type": "string" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "visible": { - "type": "boolean", - "description": "是否显示" - }, - "size": { - "description": "大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - }, - "horizontal": { - "additionalProperties": false, - "default": { - "left": 2 - }, - "description": "当表单的展示方式为水平方式时,用来控制 label 和 input 的宽度占比。", - "properties": { - "left": { - "type": "number" - }, - "leftFixed": { - "oneOf": [ - { - "type": "string", - "const": ["", "xs", "sm", "md", "lg"] - }, - { - "type": "boolean" - } - ] - } - }, - "type": "object" - }, - "mode": { - "description": "配置当前表单项展示模式", - "type": "string", - "enum": ["normal", "inline", "horizontal"] - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "fieldSet" - } - } - } - }, - "description": "amis FieldSet 渲染器格式说明", - "type": "object" -} diff --git a/schemas/form/file.json b/schemas/form/file.json deleted file mode 100644 index 4f4a91bca..000000000 --- a/schemas/form/file.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "$id": "/schemas/form/file.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/file.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|btnClassName|btnUploadClassName|maxSize|maxLength|btnLabel|reciever|fileField|useChunk|chunkSize|startChunkApi|chunkApi|finishChunkApi|accept|autoUpload|hideUploadButton|asBase64|multiple|joinValues|delimiter|extractValue|resetValue|downloadUrl|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": "file", - "description": "指定为文件上传类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "文件上传格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "btnLabel": { - "default": "请选择文件", - "description": "上传文件按钮说明", - "type": "string" - }, - "accept": { - "default": "text/plain", - "description": "默认只支持纯文本,要支持其他类型,请配置此属性。", - "type": "string" - }, - "asBase64": { - "default": false, - "description": "如果上传的文件比较小可以设置此选项来简单的把文件 base64 的值给 form 一起提交,目前不支持多选。", - "type": "boolean" - }, - "autoUpload": { - "default": true, - "description": "是否自动开始上传", - "type": "boolean" - }, - "chunkApi": { - "$ref": "/schemas/page.json#/definitions/api", - "default": "/api/upload/chunk", - "description": "默认 `/api/upload/chunk` 想自己存储时才需要关注。" - }, - "chunkSize": { - "default": 5242880, - "description": "分块大小,默认为 5M.", - "type": "number" - }, - "delimiter": { - "default": ",", - "description": "分割符", - "type": "string" - }, - "downloadUrl": { - "description": "默认显示文件路径的时候会支持直接下载,可以支持加前缀如:`http://xx.dom/filename=` ,如果不希望这样,可以把当前配置项设置为 `false`。", - "type": "string" - }, - "fileField": { - "default": "file", - "description": "默认 `file`, 如果你不想自己存储,则可以忽略此属性。", - "type": "string" - }, - "finishChunkApi": { - "$ref": "/schemas/page.json#/definitions/api", - "default": "/api/upload/finishChunkApi", - "description": "默认 `/api/upload/finishChunkApi` 想自己存储时才需要关注。" - }, - "hideUploadButton": { - "default": true, - "description": "是否隐藏上传按钮", - "type": "boolean" - }, - "maxLength": { - "description": "最多的个数", - "type": "number" - }, - "maxSize": { - "default": 0, - "description": "默认没有限制,当设置后,文件大小大于此值将不允许上传。", - "type": "number" - }, - "reciever": { - "$ref": "/schemas/page.json#/definitions/api", - "default": "/api/upload/file", - "description": "默认 `/api/upload/file` 如果想自己存储,请设置此选项。" - }, - "startChunkApi": { - "$ref": "/schemas/page.json#/definitions/api", - "default": "/api/upload/startChunk", - "description": "默认 `/api/upload/startChunk` 想自己存储时才需要关注。" - }, - "useChunk": { - "default": "auto", - "description": "默认为 'auto' amis 所在服务器,限制了文件上传大小不得超出10M,所以 amis 在用户选择大文件的时候,自动会改成分块上传模式。", - "oneOf": [ - { - "enum": ["auto"] - }, - { - "type": "boolean" - } - ] - }, - "btnClassName": { - "type": "string", - "description": "按钮 CSS 类名" - }, - "btnUploadClassName": { - "type": "string", - "description": "上传按钮 CSS 类名" - }, - "multiple": { - "default": false, - "description": "是否为多选", - "type": "boolean" - }, - "joinValues": { - "default": true, - "description": "* 单选模式:当用户选中某个选项时,选项中的 value 将被作为该表单项的值提交,否则,整个选项对象都会作为该表单项的值提交。\n* 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。", - "type": "boolean" - }, - "extractValue": { - "default": true, - "description": "开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。", - "type": "boolean" - }, - "resetValue": { - "default": "", - "description": "清除时设置的值" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "file" - } - } - } - }, - "description": "文件上传格式说明", - "type": "object" -} diff --git a/schemas/form/formula.json b/schemas/form/formula.json deleted file mode 100644 index 638789f15..000000000 --- a/schemas/form/formula.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "$id": "/schemas/form/formula.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/formula.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|name|formula|value|initSet|autoSet|id|condition)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "formula", - "description": "指定为公式功能框" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "隐藏域格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "id": { - "description": "当某个按钮的目标指定为此值后,会触发一次公式应用。这个机制可以在 autoSet 为 false 时用来手动触发", - "type": "string" - }, - "condition": { - "description": "触发公式的作用条件,如 data.xxx == \"a\" 或者 ${xx} ", - "type": "string" - }, - "autoSet": { - "description": "是否自动应用", - "type": "boolean" - }, - "formula": { - "description": "公式", - "type": "string" - }, - "initSet": { - "description": "是否初始应用", - "type": "boolean" - }, - "name": { - "description": "字段名,公式结果将作用到此处指定的变量中去", - "type": "string" - }, - "value": { - "description": "默认值" - } - } - }, - "test": { - "properties": { - "type": { - "const": "formula" - } - } - } - }, - "description": "隐藏域格式说明", - "type": "object" -} diff --git a/schemas/form/grid.json b/schemas/form/grid.json deleted file mode 100644 index e35f87a57..000000000 --- a/schemas/form/grid.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "$id": "/schemas/form/grid.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/text.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|columns|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "grid", - "description": "指定为grid类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "column": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "/schemas/page.json#/definitions/subRenderer" - }, - - { - "type": "object", - "properties": { - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - } - } - } - ] - }, - { - "$ref": "/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" - }, - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "columns": { - "description": "列集合", - "items": { - "$ref": "/schemas/form/grid.json#/definitions/column" - }, - "type": "array" - }, - "common": { - "description": "Grid 格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "columns": { - "$ref": "/schemas/form/grid.json#/definitions/columns", - "description": "列集合" - } - }, - "type": "object" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "grid" - } - } - } - }, - "description": "Grid 格式说明", - "type": "object" -} diff --git a/schemas/form/group.json b/schemas/form/group.json deleted file mode 100644 index 00da4f24a..000000000 --- a/schemas/form/group.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "$id": "/schemas/form/group.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/group.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|label|remark|labelRemark|gap|desc|description|className|horizontal|mode|controls|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "group", - "description": "指定渲染器类型为表单 Input Group 类型,能让多个表单在一行。" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis 表单集合渲染器格式说明,能让多个表单在一行显示", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 Group className" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "label": { - "description": "描述标题", - "oneOf": [ - { - "type": "string" - }, - { - "enum": [false] - } - ] - }, - "labelClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 label className" - }, - "description": { - "description": "描述内容,支持 Html 片段。", - "type": "string" - }, - "descriptionClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置描述上的 className" - }, - "horizontal": { - "additionalProperties": false, - "default": { - "left": 2 - }, - "description": "当表单的展示方式为水平方式时,用来控制 label 和 input 的宽度占比。", - "properties": { - "right": { - "type": "number" - }, - "left": { - "type": "number" - }, - "leftFixed": { - "oneOf": [ - { - "type": ["string", "number"] - }, - { - "type": "boolean" - } - ] - } - }, - "type": "object" - }, - "mode": { - "description": "配置当前表单项展示模式", - "type": "string", - "enum": ["normal", "inline", "horizontal"] - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "group" - } - } - } - }, - "description": "amis 表单集合渲染器格式说明,能让多个表单在一行显示", - "type": "object" -} diff --git a/schemas/form/hbox.json b/schemas/form/hbox.json deleted file mode 100644 index 8f5829d93..000000000 --- a/schemas/form/hbox.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$id": "/schemas/form/hbox.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/text.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|columns|gap|name|value|placeholder|label|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "hbox", - "description": "指定为hbox类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "column": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "/schemas/page.json#/definitions/subRenderer" - }, - - { - "type": "object", - "properties": { - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - } - } - } - ] - }, - { - "$ref": "/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" - }, - "columns": { - "description": "列集合", - "items": { - "$ref": "/schemas/form/hbox.json#/definitions/column" - }, - "type": "array" - }, - "common": { - "description": "HBox 格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "columns": { - "$ref": "/schemas/form/hbox.json#/definitions/columns", - "description": "列集合" - }, - "gap": { - "type": "string", - "enum": ["xs", "sm", ""], - "description": "间隔大小" - } - }, - "type": "object" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "hbox" - } - } - } - }, - "description": "HBox 格式说明", - "type": "object" -} diff --git a/schemas/form/hidden.json b/schemas/form/hidden.json deleted file mode 100644 index d1425d4df..000000000 --- a/schemas/form/hidden.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$id": "/schemas/form/hidden.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/hidden.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|name|formula|value)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "hidden", - "description": "指定为隐藏域" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "隐藏域格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "name": { - "$ref": "/schemas/form.json#/definitions/name", - "description": "字段名,表单提交时的 key" - }, - "value": { - "description": "默认值,不支持变量。" - } - } - }, - "test": { - "properties": { - "type": { - "const": "hidden" - } - } - } - }, - "description": "隐藏域格式说明", - "type": "object" -} diff --git a/schemas/form/image.json b/schemas/form/image.json deleted file mode 100644 index 04c7736cc..000000000 --- a/schemas/form/image.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "$id": "/schemas/form/image.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/image.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|reciever|accept|btnUploadClassName|btnClassName|imageClassName|src|hideUploadButton|autoUpload|maxLength|maxSize|compress|compressOptions|showCompressOptions|crop|allowInput|limit|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": "image", - "description": "指定为图片上传类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "图片上传框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "src": { - "description": "默认展示图片的链接", - "type": "string" - }, - "imageClassName": { - "description": "默认展示图片的类名", - "type": "string" - }, - "accept": { - "description": "配置接收的图片类型 MimeTypes", - "type": "string" - }, - "allowInput": { - "default": false, - "description": "默认都是通过用户选择图片后上传返回图片地址,如果开启此选项,则可以允许用户图片地址。", - "type": "boolean" - }, - "autoUpload": { - "default": true, - "description": "是否自动开始上传", - "type": "boolean" - }, - "btnClassName": { - "default": "btn-info btn-sm", - "description": "选择图片按钮的 CSS 类名", - "type": "string" - }, - "btnUploadClassName": { - "default": "btn-success", - "description": "上传按钮的 CSS 类名", - "type": "string" - }, - "compress": { - "default": true, - "description": "如果想默认压缩请开启", - "type": "boolean" - }, - "compressOptions": { - "description": "压缩属性", - "properties": { - "maxHeight": { - "description": "设置最大高度", - "type": "number" - }, - "maxWidth": { - "description": "设置最大宽度", - "type": "number" - } - }, - "type": "object" - }, - "crop": { - "description": "用来设置是否支持裁剪。", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": { - "aspectRatio": { - "default": 1, - "description": "默认 `1` 即 `1:1`", - "type": "number" - } - }, - "type": "object" - } - ] - }, - "hideUploadButton": { - "default": true, - "description": "是否隐藏上传按钮", - "type": "boolean" - }, - "limit": { - "description": "限制图片大小,超出不让上传。", - "properties": { - "height": { - "description": "限制图片高度", - "type": "number" - }, - "maxHeight": { - "description": "限制图片最大高度", - "type": "number" - }, - "maxWidth": { - "description": "限制图片最大宽度", - "type": "number" - }, - "minHeight": { - "description": "限制图片最小高度", - "type": "number" - }, - "minWidth": { - "description": "限制图片最小宽度", - "type": "number" - }, - "width": { - "description": "限制图片宽度", - "type": "number" - } - }, - "type": "object" - }, - "maxLength": { - "description": "最多的个数", - "type": "number" - }, - "maxSize": { - "default": 0, - "description": "默认没有限制,当设置后,文件大小大于此值将不允许上传。", - "type": "number" - }, - "reciever": { - "$ref": "/schemas/page.json#/definitions/api", - "default": "/api/upload", - "description": "默认 `/api/upload` 如果想自己存储,请设置此选项。" - }, - "showCompressOptions": { - "default": false, - "description": "默认为 false, 开启后,允许用户输入压缩选项。", - "type": "boolean" - }, - "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": "image" - } - } - } - }, - "description": "图片上传框格式说明", - "type": "object" -} diff --git a/schemas/form/input-group.json b/schemas/form/input-group.json deleted file mode 100644 index 9c6c19a54..000000000 --- a/schemas/form/input-group.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$id": "/schemas/form/input-group.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/input-group.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|size|controls|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": "input-group", - "description": "指定为数字输入框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "输入组合框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "size": { - "default": "full", - "description": "表单项大小,可以是:xs, sm, base, md, lg。", - "enum": ["xs", "sm", "base", "md", "lg", "full"], - "type": "string" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "input-group" - } - } - } - }, - "description": "输入组合框格式说明", - "type": "object" -} diff --git a/schemas/form/list.json b/schemas/form/list.json deleted file mode 100644 index 79b605017..000000000 --- a/schemas/form/list.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "$id": "/schemas/form/list.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/list.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|multiple|joinValues|delimiter|extractValue|clearable|submitOnDBClick|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": "list", - "description": "指定为列表选择框" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "列表选择框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "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" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "submitOnDBClick": { - "default": "false", - "description": "双击触发表单数据提交", - "type": "boolean" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "list" - } - } - } - }, - "description": "列表选择框格式说明", - "type": "object" -} diff --git a/schemas/form/matrix.json b/schemas/form/matrix.json deleted file mode 100644 index 75d2219ec..000000000 --- a/schemas/form/matrix.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "$id": "/schemas/form/matrix.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/matrix.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|source|rows|columns|rowLabel|singleSelectMode|multiple|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": "matrix", - "description": "指定为 matrix 类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Matrix 矩阵勾选框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "multiple": { - "default": true, - "description": "配置singleSelectMode时设置为false", - "type": "boolean" - }, - "singleSelectMode": { - "description": "设置单选模式,multiple为false时有效", - "enum": ["cell", "row", "column"], - "type": "string" - }, - "columns": { - "description": "列信息列表", - "items": { - "properties": { - "label": { - "type": "string" - } - }, - "required": ["label"], - "type": "object" - }, - "type": "array" - }, - "rowLabel": { - "description": "行标题说明", - "type": "string" - }, - "rows": { - "description": "行信息列表", - "items": { - "properties": { - "label": { - "type": "string" - } - }, - "required": ["label"], - "type": "object" - }, - "type": "array" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#matrix,也可以从当前作用域拉取数据 $typeOptions" - } - }, - "type": "object" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "matrix" - } - } - } - }, - "description": "Matrix 矩阵勾选框格式说明", - "type": "object" -} diff --git a/schemas/form/nested-select.json b/schemas/form/nested-select.json deleted file mode 100644 index 35c3b8211..000000000 --- a/schemas/form/nested-select.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$id": "/schemas/form/nested-select.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/nested-select.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|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": "nested-select", - "description": "指定为 nested-select 选择框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "nested-select 选择框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "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" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "nested-select" - } - } - } - }, - "description": "nested-select 选择框格式说明", - "type": "object" -} diff --git a/schemas/form/number.json b/schemas/form/number.json deleted file mode 100644 index 753ba2bb9..000000000 --- a/schemas/form/number.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$id": "/schemas/form/number.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/number.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|min|step|max|precision|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": "number", - "description": "指定为数字输入框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "数字输入框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "max": { - "description": "最大值", - "type": "number" - }, - "min": { - "description": "最小值", - "type": "number" - }, - "step": { - "default": 1, - "description": "步长", - "type": "number" - }, - "precision": { - "description": "精度", - "type": "number" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "number" - } - } - } - }, - "description": "数字输入框格式说明", - "type": "object" -} diff --git a/schemas/form/panel.json b/schemas/form/panel.json deleted file mode 100644 index 88df91f83..000000000 --- a/schemas/form/panel.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$id": "/schemas/form/panel.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/panel.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|bodyClassName|className|affixFooter|body|header|title|tabs|actions|footer|visible|visibleOn|hidden|hiddenOn)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "panel", - "description": "指定为面板类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Panel 格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actions": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "页面内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置body容器 className" - }, - "footer": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "Footer 区域" - }, - "header": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "顶部内容区域,跟 title 二选一" - }, - "tabs": { - "description": "tabs集合", - "items": { - "$ref": "/schemas/form/tabs.json#/definitions/tab" - }, - "type": "array" - }, - "title": { - "$ref": "/schemas/page.json#/definitions/string", - "description": "Panel 标题" - }, - "affixFooter": { - "description": "固定底部", - "type": "boolean" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "panel" - } - } - } - }, - "description": "Panel 格式说明", - "type": "object" -} diff --git a/schemas/form/password.json b/schemas/form/password.json deleted file mode 100644 index b445adc9f..000000000 --- a/schemas/form/password.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$id": "/schemas/form/password.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/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": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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": "/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": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "autoComplete": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "跟 source 不同的是,每次用户输入都会去接口获取提示,请不要跟 source 同时使用。" - }, - "options": { - "$ref": "/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" -} diff --git a/schemas/form/picker.json b/schemas/form/picker.json deleted file mode 100644 index ad28436b4..000000000 --- a/schemas/form/picker.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "$id": "/schemas/form/picker.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/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": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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": "/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": "/schemas/crud.json#/definitions/common", - "description": "配置选框详情", - "type": "object" - }, - "source": { - "$ref": "/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" -} diff --git a/schemas/form/radios.json b/schemas/form/radios.json deleted file mode 100644 index 718b9eb6f..000000000 --- a/schemas/form/radios.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$id": "/schemas/form/radios.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/radios.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|columnsCount|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": "radios", - "description": "指定为单选框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "单选框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "columnsCount": { - "default": 1, - "description": "每行显示多少个", - "type": "number" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "radios" - } - } - } - }, - "description": "单选框格式说明", - "type": "object" -} diff --git a/schemas/form/range.json b/schemas/form/range.json deleted file mode 100644 index eddc5ebaa..000000000 --- a/schemas/form/range.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "$id": "/schemas/form/range.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/range.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|min|max|step|unit|showInput|multiple|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": "range", - "description": "指定为数字范围类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "数字范围框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "max": { - "default": 100, - "description": "最大值", - "type": "number" - }, - "min": { - "default": 1, - "description": "最小值", - "type": "number" - }, - "step": { - "default": 1, - "description": "每次操作的值", - "type": "number" - }, - "unit": { - "description": "单位", - "type": "string" - }, - "showInput": { - "description": "是否显示输入框", - "type": "boolean" - }, - "multiple": { - "default": false, - "description": "是否为选择范围", - "type": "boolean" - }, - "joinValues": { - "default": true, - "description": "选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。", - "type": "boolean" - }, - "delimiter": { - "default": ",", - "description": "分割符", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "range" - } - } - } - }, - "description": "数字范围框格式说明", - "type": "object" -} diff --git a/schemas/form/rating.json b/schemas/form/rating.json deleted file mode 100644 index cb72de8c8..000000000 --- a/schemas/form/rating.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$id": "/schemas/form/rating.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/color.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|count|readOnly|half|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": "rating", - "description": "指定为 rating 类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "评分格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "readOnly": { - "default": true, - "description": "是否只读", - "type": "boolean" - }, - "half": { - "default": true, - "description": "允许选择半星", - "type": "boolean" - }, - "count": { - "default": 5, - "description": "最大值", - "type": "number" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "rating" - } - } - } - }, - "description": "评分格式说明", - "type": "object" -} diff --git a/schemas/form/repeat.json b/schemas/form/repeat.json deleted file mode 100644 index 3fe55d2c3..000000000 --- a/schemas/form/repeat.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$id": "/schemas/form/repeat.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/repeat.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|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": "repeat", - "description": "指定为周期框类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Text文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "options": { - "default": "hourly,daily,weekly,monthly", - "description": "配置周期参数,支持:secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "repeat" - } - } - } - }, - "description": "Text文本框格式说明", - "type": "object" -} diff --git a/schemas/form/reset.json b/schemas/form/reset.json deleted file mode 100644 index 5d1b0d3af..000000000 --- a/schemas/form/reset.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "$id": "/schemas/form/reset.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/reset.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|icon|size|level|iconOnly|action|tooltip|tooltipPlacement|disabledTip|actionType|api|target|reload|url|link|dialog|drawer|content|feedback|confirmText|blank|nextCondition|name|value|placeholder|label|remark|labelRemark|desc|description|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "reset", - "description": "指定为重置按钮类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Reset 按钮格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "label": { - "description": "按钮名字", - "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": [ - "info", - "success", - "warning", - "danger", - "link", - "primary" - ], - "type": "string" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - }, - "tooltip": { - "description": "按钮提示文字,hover 时显示", - "type": "string" - }, - "tooltipPlacement": { - "default": "top", - "description": "按钮提示文字显示的位置", - "enum": ["left", "top", "right", "bottom"], - "type": "string" - }, - "disabledTip": { - "description": "禁用时按钮提示文字,hover 时显示", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "reset" - } - } - } - }, - "description": "Reset 按钮格式说明", - "type": "object" -} diff --git a/schemas/form/rich-text.json b/schemas/form/rich-text.json deleted file mode 100644 index 878bb95e8..000000000 --- a/schemas/form/rich-text.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$id": "/schemas/form/rich-text.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/rich-text.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|receiver|options|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": "rich-text", - "description": "指定为富文本类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "富文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "options": { - "description": "请参考 https://www.froala.com/wysiwyg-editor/docs/options 的配置说明。", - "type": "object" - }, - "reciever": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "用来负责图片存储" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "rich-text" - } - } - } - }, - "description": "富文本框格式说明", - "type": "object" -} diff --git a/schemas/form/select.json b/schemas/form/select.json deleted file mode 100644 index f99161a8e..000000000 --- a/schemas/form/select.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "$id": "/schemas/form/select.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/select.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|autoComplete|multiple|joinValues|delimiter|extractValue|clearable|resetValue|searchable|checkAll|checkAllLabel|defaultCheckAll|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": "select", - "description": "指定为Select选择框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "Select选择框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "autoComplete": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "自动完成接口,请不要跟 source 同时使用。" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "searchable": { - "default": false, - "description": "是否可以搜索值", - "type": "boolean" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "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" - }, - "checkAll": { - "default": "false", - "description": "开启后支持全选", - "type": "boolean" - }, - "checkAllLabel": { - "description": "默认为 全选, 全选的文字", - "type": "string" - }, - "defaultCheckAll": { - "default": "false", - "description": "是否默认全选", - "type": "boolean" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "select" - } - } - } - }, - "description": "Select选择框格式说明", - "type": "object" -} diff --git a/schemas/form/service.json b/schemas/form/service.json deleted file mode 100644 index 4af8491ad..000000000 --- a/schemas/form/service.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "$id": "/schemas/form/service.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/service.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|className|api|body|schemaApi|initFetch|fetchOn|messages|visible|visibleOn|hidden|hiddenOn)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "service", - "description": "指定为文本类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Service格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "fetchOn": { - "default": true, - "description": "是否要拉取?通过表达式来决定", - "type": "string" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "initFetchOn": { - "default": true, - "description": "是否默认就拉取?通过表达式来决定", - "type": "string" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 api 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 api 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "schemaApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "用来获取远程 Schema 的 api" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "service" - } - } - } - }, - "description": "Service格式说明", - "type": "object" -} diff --git a/schemas/form/static.json b/schemas/form/static.json deleted file mode 100644 index 9cc02b244..000000000 --- a/schemas/form/static.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$id": "/schemas/form/static.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/static.json#/definitions/common" - }, - { - "dependencies": { - "value": ["name"] - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为静态类型", - "enum": [ - "static", - "static-plain", - "static-tpl", - "static-image", - "static-progress", - "static-date", - "static-mapping", - "static-status", - "static-list", - "static-hbox" - ] - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "Static FormItem 渲染器格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "text": { - "description": "不支持模板,要使用变量,请使用 tpl 渲染器。", - "title": "Text 字符串", - "type": "string" - }, - "tpl": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.tempalte 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "title": "模板", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "enum": [ - "static", - "static-plain", - "static-tpl", - "static-image", - "static-progress", - "static-date", - "static-mapping", - "static-status", - "static-list", - "static-hbox" - ] - } - } - } - }, - "description": "Static FormItem 渲染器格式说明", - "type": "object" -} diff --git a/schemas/form/sub-form.json b/schemas/form/sub-form.json deleted file mode 100644 index 1fc2536db..000000000 --- a/schemas/form/sub-form.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$id": "/schemas/form/sub-form.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/sub-form.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|controls|addButtonClassName|btnClassName|btnLabel|editButtonClassName|form|labelField|maxLength|minLength|multiple|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": "form", - "description": "指定为子表单类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Text文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "addButtonClassName": { - "description": "新增按钮CSS类名", - "type": "string" - }, - "btnClassName": { - "description": "按钮CSS类名", - "type": "string" - }, - "btnLabel": { - "default": "点击设置", - "description": "按钮默认文字", - "type": "string" - }, - "editButtonClassName": { - "description": "编辑按钮CSS类名", - "type": "string" - }, - "form": { - "description": "字表单项设置" - }, - "labelField": { - "default": "label", - "description": "按钮默认显示的字段", - "type": "string" - }, - "maxLength": { - "description": "限制最大个数", - "type": "number" - }, - "minLength": { - "description": "限制最小个数", - "type": "number" - }, - "multiple": { - "description": "是否可多选", - "type": "boolean" - } - }, - "type": "object" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "form" - } - } - } - }, - "description": "Text文本框格式说明", - "type": "object" -} diff --git a/schemas/form/submit.json b/schemas/form/submit.json deleted file mode 100644 index 4c534ad76..000000000 --- a/schemas/form/submit.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "$id": "/schemas/form/submit.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/submit.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|icon|size|level|iconOnly|action|tooltip|tooltipPlacement|disabledTip|actionType|api|target|reload|url|link|dialog|drawer|content|feedback|confirmText|blank|nextCondition|name|value|placeholder|label|remark|labelRemark|desc|description|className|inputClassName|labelClassName|descriptionClassName|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "submit", - "description": "指定为提交按钮类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "提交按钮格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "label": { - "description": "按钮名字", - "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": [ - "info", - "success", - "warning", - "danger", - "link", - "primary" - ], - "type": "string" - }, - "size": { - "description": "按钮大小", - "enum": ["xs", "sm", "md", "lg"], - "type": "string" - }, - "tooltip": { - "description": "按钮提示文字,hover 时显示", - "type": "string" - }, - "tooltipPlacement": { - "default": "top", - "description": "按钮提示文字显示的位置", - "enum": ["left", "top", "right", "bottom"], - "type": "string" - }, - "disabledTip": { - "description": "禁用时按钮提示文字,hover 时显示", - "type": "string" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "submit" - } - } - } - }, - "description": "提交按钮格式说明", - "type": "object" -} diff --git a/schemas/form/switch.json b/schemas/form/switch.json deleted file mode 100644 index 6b83d7ceb..000000000 --- a/schemas/form/switch.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$id": "/schemas/form/switch.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/switch.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|trueValue|falseValue|option|optionAtLeft|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": "switch", - "description": "指定为开关" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "开关格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "falseValue": { - "default": false, - "description": "未勾选值" - }, - "trueValue": { - "default": true, - "description": "勾选值" - }, - "option": { - "description": "选项说明", - "type": "string" - }, - "optionAtLeft": { - "default": "false", - "description": "选项说明放在左边,默认在右边", - "type": "boolean" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "switch" - } - } - } - }, - "description": "开关格式说明", - "type": "object" -} diff --git a/schemas/form/table.json b/schemas/form/table.json deleted file mode 100644 index 1dd9ac90d..000000000 --- a/schemas/form/table.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "$id": "/schemas/form/table.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/table.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|columns|addable|addApi|addBtnLabel|addBtnIcon|showAddBtn|removable|deleteApi|editable|updateBtnLabel|updateBtnIcon|confirmBtnLabel|confirmBtnIcon|cancelBtnLabel|cancelBtnIcon|deleteBtnLabel|deleteBtnIcon|updateApi|scaffold|deleteConfirmText|valueField|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": "table", - "description": "指定为表格编辑类型" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "Text文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "addable": { - "type": "boolean", - "description": "是否可新增" - }, - "removable": { - "type": "boolean", - "description": "是否可删除" - }, - "editable": { - "type": "boolean", - "description": "是否可修改" - }, - "draggable": { - "type": "boolean", - "description": "是否可拖拽排序" - }, - "columns": { - "description": "列信息配置" - }, - "addApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "添加API" - }, - "addBtnLabel": { - "description": "添加按钮文字", - "type": "string" - }, - "addBtnIcon": { - "description": "添加按钮图标", - "type": "string" - }, - "showAddBtn": { - "description": "是否显示添加按钮", - "type": "boolean" - }, - "deleteApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "删除API" - }, - "updateBtnLabel": { - "description": "编辑按钮文字", - "type": "string" - }, - "updateBtnIcon": { - "description": "编辑按钮图标", - "type": "string" - }, - "confirmBtnLabel": { - "description": "确认按钮文字", - "type": "string" - }, - "confirmBtnIcon": { - "description": "确认按钮图标", - "type": "string" - }, - "cancelBtnLabel": { - "description": "取消按钮文字", - "type": "string" - }, - "cancelBtnIcon": { - "description": "取消按钮图标", - "type": "string" - }, - "deleteBtnLabel": { - "description": "删除按钮文字", - "type": "string" - }, - "deleteBtnIcon": { - "description": "删除按钮图标", - "type": "string" - }, - "updateApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "更新API" - }, - "deleteConfirmText": { - "description": "确认删除文字", - "type": "string" - }, - "valueField": { - "description": "value的替代键值,默认为value", - "type": "string" - }, - "scaffold": { - "description": "初始值", - "type": "object" - } - }, - "type": "object" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "table" - } - } - } - }, - "description": "Text文本框格式说明", - "type": "object" -} diff --git a/schemas/form/tabs.json b/schemas/form/tabs.json deleted file mode 100644 index c13ab41e3..000000000 --- a/schemas/form/tabs.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "$id": "/schemas/form/tabs.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/tabs.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|className|hiddenOn|tabClassName|tabs|visibleOn|visible|hidden)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "tabs", - "description": "指定当前 JSON 为 tabs 渲染器。" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Tabs 渲染器格式说明", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 Tabs className" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "tabClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 Tab className" - }, - "tabs": { - "description": "选项卡信息", - "items": { - "$ref": "/schemas/form/tabs.json#/definitions/tab", - "type": ["object"] - }, - "type": "array" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "tab": { - "additionalProperties": false, - "properties": { - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 fieldSet className" - }, - "controls": { - "$ref": "/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前 Tab 是否禁用。" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前 Tab 是否隐藏。" - }, - "horizontal": { - "additionalProperties": false, - "default": { - "left": "col-sm-2", - "offset": "col-sm-offset-2", - "right": "col-sm-10" - }, - "description": "当 mode 为 horizontal 时有用,用来控制 label 和 input 的宽度占比。", - "properties": { - "left": { - "type": "string" - }, - "offset": { - "type": "string" - }, - "right": { - "type": "string" - } - }, - "type": "object" - }, - "icon": { - "description": "图标", - "type": "string" - }, - "mode": { - "default": "normal", - "description": "表单展示方式,可以是:normal、horizontal 或者 inline。示例:https://baidu.github.io/amis/docs/demo/forms/mode", - "enum": ["normal", "horizontal", "inline"], - "type": "string" - }, - "title": { - "description": "标题", - "type": "string" - }, - "hash": { - "description": "链接中的hash", - "type": "string" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前 Tab 是否显示" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "tabs" - } - } - } - }, - "description": "amis Tabs 渲染器格式说明", - "type": "object" -} diff --git a/schemas/form/tag.json b/schemas/form/tag.json deleted file mode 100644 index fd6fdb7bf..000000000 --- a/schemas/form/tag.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$id": "/schemas/form/tag.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/text.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|optionsTip|clearable|resetValue|hint|joinValues|delimiter|extractValue|name|value|placeholder|label|remark|labelRemark|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|validations|validationErrors|validateOnChange|submitOnChange|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "tag", - "description": "指定为标签类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Tag标签输入格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "hint": { - "description": "当输入框获得焦点的时候显示,用来提示用户输入内容", - "type": "string" - }, - "optionsTip": { - "description": "选项提示", - "type": "string" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/optionsType", - "description": "选项集合" - }, - "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" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "text" - } - } - } - }, - "description": "Text文本框格式说明", - "type": "object" -} diff --git a/schemas/form/text.json b/schemas/form/text.json deleted file mode 100644 index 26c788af7..000000000 --- a/schemas/form/text.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "$id": "/schemas/form/text.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/text.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|autoComplete|clearable|resetValue|inputOnly|readOnly|hint|trimContents|addOn|size|multiple|joinValues|delimiter|extractValue|name|value|placeholder|label|remark|labelRemark|remark|labelRemark|desc|description|inline|mode|horizontal|className|labelClassName|inputClassName|descriptionClassName|validations|validationErrors|validateOnChange|submitOnChange|disabled|disabledOn|visible|visibleOn|hidden|hiddenOn|required)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "text", - "description": "指定为文本类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Text文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "hint": { - "description": "当输入框获得焦点的时候显示,用来提示用户输入内容", - "type": "string" - }, - "inputOnly": { - "default": "false", - "description": "是否只有输入框,没有label和addOn", - "type": "boolean" - }, - "readOnly": { - "default": "false", - "description": "是否只读", - "type": "boolean" - }, - "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": "/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": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "autoComplete": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "跟 source 不同的是,每次用户输入都会去接口获取提示,请不要跟 source 同时使用。" - }, - "options": { - "$ref": "/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" - } - ], - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "text" - } - } - } - }, - "description": "Text文本框格式说明", - "type": "object" -} diff --git a/schemas/form/textarea.json b/schemas/form/textarea.json deleted file mode 100644 index 1e82a38ac..000000000 --- a/schemas/form/textarea.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "$id": "/schemas/form/textarea.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/textarea.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|minRows|maxRows|hint|trimContents|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": "textarea", - "description": "指定为多行文本框" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Textarea多行文本框格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "hint": { - "description": "当输入框获得焦点的时候显示,用来提示用户输入内容", - "type": "string" - }, - "trimContents": { - "default": "false", - "description": "是否去除首尾空白", - "type": "boolean" - }, - "maxRows": { - "default": 20, - "description": "最大行数", - "type": "number" - }, - "minRows": { - "default": 3, - "description": "最小行数", - "type": "number" - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "textarea" - } - } - } - }, - "description": "Textarea多行文本框格式说明", - "type": "object" -} diff --git a/schemas/form/time.json b/schemas/form/time.json deleted file mode 100644 index f72cc9273..000000000 --- a/schemas/form/time.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "$id": "/schemas/form/time.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/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": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/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" -} diff --git a/schemas/form/tree-select.json b/schemas/form/tree-select.json deleted file mode 100644 index f8af9cc98..000000000 --- a/schemas/form/tree-select.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "$id": "/schemas/form/tree-select.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/tree.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|hideRoot|rootLabel|showIcon|showRadio|cascade|withChildren|rootValue|options|source|multiple|joinValues|delimiter|extractValue|clearable|resetValue|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": "tree-select", - "description": "指定为树形选择输入框类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "TreeSelect 格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "hideRoot": { - "default": false, - "description": "是否显示顶级节点", - "type": "boolean" - }, - "rootLabel": { - "description": "顶级节点显示名称", - "type": "string" - }, - "rootValue": { - "description": "顶级节点值", - "type": "string" - }, - "showIcon": { - "default": "false", - "description": "是否只有选项前的图标", - "type": "boolean" - }, - "showRadio": { - "default": "false", - "description": "是否单选框", - "type": "boolean" - }, - "label": { - "description": "文本", - "type": "string" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/nestedOptionsType", - "description": "选项集合" - }, - "cascade": { - "type": "boolean", - "description": "不自动选中子节点?" - }, - "withChildren": { - "type": "boolean", - "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": "tree-select" - } - } - } - }, - "description": "TreeSelect 格式说明", - "type": "object" -} diff --git a/schemas/form/tree.json b/schemas/form/tree.json deleted file mode 100644 index 31bb59987..000000000 --- a/schemas/form/tree.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "$id": "/schemas/form/tree.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/tree.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|hideRoot|rootLabel|showIcon|showRadio|cascade|withChildren|rootValue|options|source|multiple|joinValues|delimiter|extractValue|clearable|resetValue|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": "tree", - "description": "指定为树形输入框类型" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "Tree 格式说明", - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "hideRoot": { - "default": false, - "description": "是否显示顶级节点", - "type": "boolean" - }, - "rootLabel": { - "description": "顶级节点显示名称", - "type": "string" - }, - "rootValue": { - "description": "顶级节点值", - "type": "string" - }, - "showIcon": { - "default": "false", - "description": "是否只有选项前的图标", - "type": "boolean" - }, - "showRadio": { - "default": "false", - "description": "是否单选框", - "type": "boolean" - }, - "label": { - "description": "文本", - "type": "string" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem" - }, - "options": { - "$ref": "/schemas/form.json#/definitions/nestedOptionsType", - "description": "选项集合" - }, - "cascade": { - "type": "boolean", - "description": "不自动选中子节点?" - }, - "withChildren": { - "type": "boolean", - "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": "tree" - } - } - } - }, - "description": "Tree 格式说明", - "type": "object" -} diff --git a/schemas/form/url.json b/schemas/form/url.json deleted file mode 100644 index a5ede3636..000000000 --- a/schemas/form/url.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "$id": "/schemas/form/url.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/form/url.json#/definitions/common" - }, - { - "additionalProperties": false, - "patternProperties": { - "^(\\$ref|options|source|autoComplete|clearable|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": "url", - "description": "指定为 Url 输入框" - } - }, - "type": "object", - "required": ["type"] - } - ], - "definitions": { - "common": { - "allOf": [ - { - "$ref": "/schemas/form.json#/definitions/item" - }, - { - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "addOn": { - "allOf": [ - { - "$ref": "/schemas/action.json#/definitions/baseAction" - }, - { - "properties": { - "trimContents": { - "default": "false", - "description": "是否去除首尾空白", - "type": "boolean" - }, - "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" - }, - "hint": { - "description": "当输入框获得焦点的时候显示,用来提示用户输入内容", - "type": "string" - }, - "source": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "可用来通过 API 拉取 options。详情:https://baidu.github.io/amis/docs/api#formitem,也可以从当前作用域拉取数据 $typeOptions" - }, - "autoComplete": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "跟 source 不同的是,每次用户输入都会去接口获取提示,请不要跟 source 同时使用。" - }, - "options": { - "$ref": "/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": "url" - } - } - } - }, - "description": "Url 输入框格式说明", - "type": "object" -} diff --git a/schemas/grid.json b/schemas/grid.json deleted file mode 100644 index 582b1f735..000000000 --- a/schemas/grid.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "$id": "/schemas/grid.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/grid.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|columns|className)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "grid", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "column": { - "allOf": [ - { - "$ref": "/schemas/page.json#/definitions/subRenderer" - }, - { - "$ref": "/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" - }, - "columns": { - "description": "列集合", - "items": { - "oneOf": [ - { - "$ref": "/schemas/grid.json#/definitions/column" - }, - { - "$ref": "/schemas/grid.json#/definitions/columns", - "description": "列集合, 不推荐,建议再包一个 grid 如果真有必要。" - } - ] - }, - "type": "array" - }, - "common": { - "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "description": "外层 CSS 类名", - "type": "string" - }, - "columns": { - "$ref": "/schemas/grid.json#/definitions/columns" - } - }, - "type": "object" - }, - "commonColumn": { - "properties": { - "columnClassName": { - "description": "列类名" - }, - "lg": { - "description": "大屏时(>=1200px)宽度占比", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "lgHidden": { - "default": false, - "description": "大屏时(>=1200px)是否隐藏该列", - "type": "boolean" - }, - "lgOffset": { - "description": "大屏时(>=1200px)宽度偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "lgPull": { - "description": "大屏时(>=1200px)宽度右偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "lgPush": { - "description": "大屏时(>=1200px)宽度左偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "md": { - "description": "中屏时(>=992px)宽度占比", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "mdHidden": { - "default": false, - "description": "中屏时(>=992px)是否隐藏该列", - "type": "boolean" - }, - "mdOffset": { - "description": "中屏时(>=992px)宽度偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "mdPull": { - "description": "中屏时(>=992px)宽度右偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "mdPush": { - "description": "中屏时(>=992px)宽度左偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "sm": { - "description": "小屏时(>=768px)宽度占比", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "smHidden": { - "default": false, - "description": "小屏时(>=768px)是否隐藏该列", - "type": "boolean" - }, - "smOffset": { - "description": "小屏时(>=768px)宽度偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "smPull": { - "description": "小屏时(>=768px)宽度右偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "smPush": { - "description": "小屏时(>=768px)宽度左偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "xs": { - "description": "极小屏(<768px)时宽度占比", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "xsHidden": { - "default": false, - "description": "极小屏(<768px)时是否隐藏该列", - "type": "boolean" - }, - "xsOffset": { - "description": "极小屏(<768px)时宽度偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "xsPull": { - "description": "极小屏(<768px)时宽度右偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - }, - "xsPush": { - "description": "极小屏(<768px)时宽度左偏移量", - "maximum": 12, - "minimum": 1, - "type": "integer" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "grid" - } - } - } - }, - "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", - "type": "object" -} diff --git a/schemas/hbox.json b/schemas/hbox.json deleted file mode 100644 index 3e5f9bc6c..000000000 --- a/schemas/hbox.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "$id": "/schemas/hbox.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/hbox.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|columns|className)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "hbox", - "description": "指定为 hbox 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "column": { - "allOf": [ - { - "$ref": "/schemas/page.json#/definitions/subRenderer" - }, - { - "$ref": "/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" - }, - "columns": { - "description": "列集合", - "items": { - "$ref": "/schemas/hbox.json#/definitions/column" - }, - "type": "array" - }, - "common": { - "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#hbox", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "columns": { - "$ref": "/schemas/hbox.json#/definitions/columns", - "description": "列集合" - } - } - }, - "commonColumn": { - "properties": { - "columnClassName": { - "description": "列类名" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "hbox" - } - } - } - }, - "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#hbox", - "type": "object" -} diff --git a/schemas/iframe.json b/schemas/iframe.json deleted file mode 100644 index d8ffd3b50..000000000 --- a/schemas/iframe.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$id": "/schemas/iframe.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/iframe.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|src|style|className|bodyClassName|body|size)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "iframe", - "description": "指定为iframe类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis iframe 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#iframe", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "src": { - "type": "string", - "description": "iframe 地址" - }, - "width": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "description": "iframe 的宽度" - }, - "height": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ], - "description": "iframe 的高度" - }, - "style": { - "description": "样式表" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - } - } - }, - "test": { - "properties": { - "type": { - "const": "iframe" - } - } - } - }, - "description": "amis iframe 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#iframe", - "type": "object" -} diff --git a/schemas/image.json b/schemas/image.json deleted file mode 100644 index b90b71ee1..000000000 --- a/schemas/image.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$id": "/schemas/image.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/image.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|title|description|defaultImage|src|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "image", - "description": "指定为图片展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis image 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "defaultImage": { - "description": "默认图片地址", - "type": "string" - }, - "description": { - "description": "图片标题", - "type": "string" - }, - "src": { - "description": "固定图片地址", - "type": "string" - }, - "title": { - "description": "图片标题", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "image" - } - } - } - }, - "description": "amis image 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/json.json b/schemas/json.json deleted file mode 100644 index 9e9a81c92..000000000 --- a/schemas/json.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$id": "/schemas/json.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/json.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|title|description|defaultImage|src|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "json", - "description": "指定为Json展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Json 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "levelExpand": { - "type": "number", - "description": "默认展开的级别" - } - } - }, - "test": { - "properties": { - "type": { - "const": "json" - } - } - } - }, - "description": "amis Json 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/list.json b/schemas/list.json deleted file mode 100644 index 2f4751b5f..000000000 --- a/schemas/list.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "$id": "/schemas/list.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/table.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|showHeader|showFooter|listItem|data|className|footerClassName|headerClassName|placeholder|source|title|toolbarClassName|header|footer)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "list", - "description": "指定为 list 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "body": { - "description": "内容容器", - "oneOf": [ - { - "$ref": "/schemas/list.json#/definitions/field" - }, - { - "items": { - "oneOf": [ - { - "$ref": "/schemas/list.json#/definitions/field" - }, - { - "description": "**不推荐使用数组,请用 hbox 包裹**", - "items": { - "$ref": "/schemas/list.json#/definitions/field" - }, - "type": "array" - } - ] - }, - "type": "array" - } - ] - }, - "common": { - "description": "amis list 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "default": "panel-default", - "description": "外层 CSS 类名", - "type": "string" - }, - "data": { - "description": "默认的数据" - }, - "footer": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "底部容器" - }, - "footerClassName": { - "default": "crud-list-footer", - "description": "底部外层 CSS 类名", - "type": "string" - }, - "header": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "顶部容器" - }, - "headerClassName": { - "default": "amis-list-header", - "description": "顶部外层 CSS 类名", - "type": "string" - }, - "listItem": { - "description": "成员内容配置", - "properties": { - "actions": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "avatar": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "头像,支持tpl" - }, - "body": { - "$ref": "/schemas/list.json#/definitions/body" - }, - "desc": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "描述,支持tpl" - }, - "remark": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "tooltip 说明" - }, - "subTitle": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "副标题, 支持tpl" - }, - "title": { - "$ref": "/schemas/tpl.json#/definitions/tpl", - "description": "标题, 支持tpl" - } - }, - "type": "object" - }, - "placeholder": { - "description": "占位符" - }, - "showFooter": { - "default": true, - "description": "是否显示底部", - "type": "boolean" - }, - "showHeader": { - "default": true, - "description": "是否显示头部", - "type": "boolean" - }, - "source": { - "description": "数据源:绑定当前环境变量" - } - }, - "type": "object" - }, - "field": { - "allOf": [ - { - "if": { - "$ref": "/schemas/tpl.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tpl.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/image.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/image.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/date.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/date.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/operation.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/plain.json#/definitions/common" - } - } - } - } - } - } - } - } - } - } - } - } - }, - { - "properties": { - "label": { - "description": "字段名称", - "type": "string" - }, - "name": { - "description": "绑定字段名", - "type": "string" - }, - "popOver": { - "description": "配置查看详情功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "quickEdit": { - "description": "配置快速编辑功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "copyable": { - "description": "配置点击复制功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - } - }, - "type": "object" - } - ] - }, - "test": { - "properties": { - "type": { - "const": "list" - } - } - } - }, - "description": "amis list 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/mapping.json b/schemas/mapping.json deleted file mode 100644 index e1d35c29f..000000000 --- a/schemas/mapping.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$id": "/schemas/mapping.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/mapping.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|map|placeholder|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为映射展示类型", - "enum": ["mapping", "map"], - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis mapping 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "map": { - "description": "当值命中左侧 Key 时,展示右侧内容,当没有命中时,默认实现 Key 为 *的内容", - "patternProperties": { - ".*": { - "type": "string" - } - }, - "type": "object" - }, - "placeholder": { - "description": "占位符", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "enum": ["map", "mapping"] - } - } - } - }, - "description": "amis mapping 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/nav.json b/schemas/nav.json deleted file mode 100644 index 4ea7f5013..000000000 --- a/schemas/nav.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$id": "/schemas/nav.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/nav.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|stacked|links)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "nav", - "description": "指定为导航类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Nav 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#nav", - "properties": { - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "links": { - "items": { - "properties": { - "icon": { - "description": "图标类名,参考 fontawesome。", - "type": "string" - }, - "label": { - "description": "文字说明", - "type": "string" - }, - "to": { - "description": "Link 地址。", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "stacked": { - "description": "true 为垂直排列,false 为水平排列类似如 tabs。", - "type": "boolean" - } - } - }, - "test": { - "properties": { - "type": { - "enum": ["nav", "navigation"] - } - } - } - }, - "description": "amis Nav 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#nav", - "type": "object" -} diff --git a/schemas/operation.json b/schemas/operation.json deleted file mode 100644 index 5001bc8f5..000000000 --- a/schemas/operation.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$id": "/schemas/operation.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/operation.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(className|buttons|placeholder|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "operation", - "description": "指定为状态展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis operation 渲染器格式说明。", - "properties": { - "buttons": { - "description": "操作按钮集合", - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "placeholder": { - "description": "占位符", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "operation" - } - } - } - }, - "description": "amis operation 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/page.json b/schemas/page.json deleted file mode 100644 index af35398f0..000000000 --- a/schemas/page.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "$id": "/schemas/page.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "definitions": { - "$ref": { - "description": "引用page下已经定义好的类型", - "type": "string" - }, - "api": { - "description": "服务端 API 地址, 可以配置 `$varName` 做变量替换", - "oneOf": [ - { - "descriptions": "例如: `get:http://www.baidu.com/` 可以使用 $var 或者 ${var} 从容器 data 中获取变量。\n 注意:为了不暴露 API 地址,默认会被替换成 amis 中转,如果不想被转义请这样配置 `raw:http://www.baidu.com` \n 另外,如果代理的话,默认只能请求内网服务,如需访问外网服务,请这样配置 `external:http://www.com/api/doXX`", - "type": "string" - }, - { - "additionalProperties": false, - "properties": { - "data": { - "default": { - "&": "$$" - }, - "description": "用来控制携带数据. 当key 为 `&` 值为 `$$` 时, 将所有原始数据打平设置到 data 中. 当值为 $$ 将所有原始数据赋值到对应的 key 中. 当值为 $ 打头时, 将变量值设置到 key 中.", - "type": "object" - }, - "dataType": { - "default": "json", - "description": "发送体的格式", - "enum": ["form-data", "json"], - "type": "string" - }, - "responseType": { - "default": "", - "description": "接口返回数据类型,当做文件下载时请配置为 blob。", - "enum": ["blob"], - "type": "string" - }, - "headers": { - "description": "携带 headers,用法和 data 一样,可以用变量。", - "type": "object" - }, - "method": { - "default": "get", - "enum": ["get", "post", "put", "delete"] - }, - "url": { - "$ref": "#/definitions/url", - "description": "当 url 中存在 $$ 会被替换成所有的值 json 序列化. 当 $key 时替换成对应的值." - }, - "sendOn": { - "type": "string", - "description": "设置发送条件" - } - }, - "required": ["url"], - "type": "object" - } - ] - }, - "className": { - "description": "用来配置 dom class 名字", - "pattern": "^([a-zA-Z][a-zA-Z0-9\\-_]*(?:\\s+|$))*$", - "type": "string" - }, - "container": { - "oneOf": [ - { - "$ref": "/schemas/page.json#/definitions/string", - "description": "当值为字符串时会被当做模板来处理,要指定其他渲染类型请使用对象定义如:\n{\n\n\t \"type\": \"form\" \n } \n 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。\n\n详情: https://baidu.github.io/amis/docs/renderers#tpl" - }, - { - "$ref": "/schemas/page.json#/definitions/subRenderer" - }, - { - "items": { - "$ref": "/schemas/page.json#/definitions/container" - }, - "type": "array" - } - ] - }, - "expression": { - "description": "Js 表达式。如 data.type == 1", - "type": "string" - }, - "name": { - "description": "变量名称", - "pattern": "^[a-zA-Z_][a-zA-Z0-9_\\-]*$", - "type": "string" - }, - "string": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "type": "string" - }, - "stringOrNull": { - "description": "字符或者 null", - "oneOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "customRenderer": { - "description": "自定组件,非系统组件,请确保你已在自定义组件中添加了对应的组件。", - "properties": { - "type": { - "type": "string" - } - }, - "required": ["type"], - "title": "自定义渲染器", - "type": "object" - }, - "subRenderer": { - "if": { - "$ref": "/schemas/action.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/action.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/button-group.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/button-group.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/cards.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/cards.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/chart.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/chart.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/collapse.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/collapse.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/divider.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/divider.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/crud.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/crud.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/date.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/date.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/dropdown-button.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/dropdown-button.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/form.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/form.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/iframe.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/iframe.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/image.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/image.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/nav.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/nav.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/operation.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/panel.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/panel.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/plain.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/plain.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/service.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/service.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/table.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/table.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/tabs.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tabs.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/tasks.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tasks.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/tpl.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tpl.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/video.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/video.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/wizard.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/wizard.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/wrapper.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/wrapper.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/page.json#/definitions/customRenderer" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "tpl": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "title": "模板", - "type": "string" - }, - "url": { - "_pattern": "^(?:raw)?(?:https?:\\/\\/[^\\/]+|[A-Z][A-Z_0-9]*)?(?:\\/(?:\\w)*)+(?:\\?.*)?$", - "type": "string" - }, - "varName": { - "description": "变量名称", - "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", - "type": "string" - } - }, - "description": "amis Page 渲染器。详情请见:https://baidu.github.io/amis/docs/renderers#page", - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "aside": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "左边栏容器" - }, - "asideClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 aside 容器 className" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "title": "页面内容区域" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 body 容器 className" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "data": { - "description": "初始数据,设置得值可用于组件内部模板使用。", - "type": "object" - }, - "headerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 header 容器 className" - }, - "initApi": { - "$ref": "#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "initFetchOn": { - "description": "是否默认就拉取?通过表达式来决定", - "type": "string" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 initApi 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 initApi 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "remark": { - "$ref": "/schemas/page.json#/definitions/stringOrNull", - "description": "页面描述" - }, - "subTitle": { - "$ref": "/schemas/page.json#/definitions/stringOrNull", - "description": "页面副标题" - }, - "title": { - "$ref": "/schemas/page.json#/definitions/stringOrNull", - "description": "页面标题" - }, - "toolbar": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "页面顶部区域,当存在 title 时在右上角显示。" - }, - "toolbarClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 toolbar 容器 className" - }, - "type": { - "const": "page", - "description": "指定为 page 渲染器。", - "type": "string" - }, - "definitions": { - "type": "object", - "description": "定义可复用类型,方便子节点引用" - } - }, - "required": ["$schema", "type"], - "type": "object" -} diff --git a/schemas/panel.json b/schemas/panel.json deleted file mode 100644 index 29c224d4c..000000000 --- a/schemas/panel.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$id": "/schemas/panel.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/panel.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|affixFooter|bodyClassName|body|title|headerClassName|header|footer|footerClassName|actionsClassName|actions)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "panel", - "description": "指定为 Panel 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Panel 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#panel", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actions": { - "items": { - "$ref": "/schemas/action.json#" - }, - "type": "array" - }, - "actionsClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 actions 容器 className" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "footer": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "footer 内容区域" - }, - "footerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 footer 容器 className" - }, - "header": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "头部内容, 和 title 二选一。" - }, - "headerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 header 容器 className" - }, - "title": { - "description": "Panel 标题", - "type": "string" - }, - "affixFooter": { - "description": "固定底部", - "type": "boolean" - } - } - }, - "test": { - "properties": { - "type": { - "const": "panel" - } - } - } - }, - "description": "amis Panel 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#panel", - "title": "Panel", - "type": "object" -} diff --git a/schemas/plain.json b/schemas/plain.json deleted file mode 100644 index 38c2cf33f..000000000 --- a/schemas/plain.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$id": "/schemas/plain.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/plain.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|text|tpl|inline|wrapperComponent|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为纯文本类型的渲染器,不支持 html 标签。", - "enum": ["plain", "text"], - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis plain 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "inline": { - "description": "是否为 inline 模式", - "type": "boolean" - }, - "text": { - "description": "不支持 html 标签。", - "title": "文本", - "type": "string" - }, - "tpl": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "title": "模板", - "type": "string" - }, - "wrapperComponent": { - "description": "外层用什么标签?默认根据 inline来定,内嵌用 span,非内联用 div", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "enum": ["plain", "text"] - } - } - } - }, - "description": "amis plain 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/progress.json b/schemas/progress.json deleted file mode 100644 index 46d3a2ac8..000000000 --- a/schemas/progress.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$id": "/schemas/progress.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/progress.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|showLabel|map|progressClassName|progressBarClassName|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "progress", - "description": "指定为图片展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis progress 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "map": { - "description": "配置不通的值段,用不通的样式提示用户", - "items": { - "type": "string" - }, - "type": "array" - }, - "progressBarClassName": { - "description": "进度条 CSS 类名", - "type": "string" - }, - "progressClassName": { - "description": "进度外层 CSS 类名", - "type": "string" - }, - "showLabel": { - "description": "是否显示文字", - "type": "boolean" - } - } - }, - "test": { - "properties": { - "type": { - "const": "progress" - } - } - } - }, - "description": "amis progress 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/service.json b/schemas/service.json deleted file mode 100644 index a421db20f..000000000 --- a/schemas/service.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "$id": "/schemas/service.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/service.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|api|body|className|fetchOn|initFetch|initFetchOn|messages|name|schemaApi)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "service", - "description": "指定为 service 类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Service 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#service", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "fetchOn": { - "default": true, - "description": "是否要拉取?通过表达式来决定", - "type": "string" - }, - "initFetch": { - "default": true, - "description": "是否默认就拉取?", - "type": "boolean" - }, - "initFetchOn": { - "default": true, - "description": "是否默认就拉取?通过表达式来决定", - "type": "string" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "用来配置当 api 拉取失败时提示的信息", - "type": "string" - }, - "fetchSuccess": { - "description": "用来配置当 api 拉取成功时提示的信息,当然不设置的话就不会提示。", - "type": "string" - } - }, - "type": "object" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "schemaApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "用来获取远程 Schema 的 api" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "service" - } - } - } - }, - "description": "amis Service 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#service", - "type": "object" -} diff --git a/schemas/status.json b/schemas/status.json deleted file mode 100644 index f40eeb23d..000000000 --- a/schemas/status.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$id": "/schemas/status.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/status.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|map|placeholder|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "status", - "description": "指定为状态展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis status 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "map": { - "description": "配置不通的值段,用不通的样式提示用户", - "items": { - "type": "string" - }, - "type": "array" - }, - "placeholder": { - "description": "占位符", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "status" - } - } - } - }, - "description": "amis status 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/switch.json b/schemas/switch.json deleted file mode 100644 index 4d08efac2..000000000 --- a/schemas/switch.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$id": "/schemas/switch.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/switch.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|trueValue|falseValue|option|placeholder|label|name|popOver|quickEdit|sortable|searchable|toggled|fixed)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "switch", - "description": "指定为开关展示类型", - "type": "string" - } - }, - "required": ["type"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis switch 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "falseValue": { - "default": false, - "description": "未勾选值" - }, - "option": { - "description": "选项说明", - "type": "string" - }, - "placeholder": { - "description": "占位符", - "type": "string" - }, - "trueValue": { - "default": true, - "description": "勾选值" - } - } - }, - "test": { - "properties": { - "type": { - "const": "status" - } - } - } - }, - "description": "amis switch 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/table.json b/schemas/table.json deleted file mode 100644 index e38b8c8a9..000000000 --- a/schemas/table.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "$id": "/schemas/table.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/table.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|showHeader|footable|footable|showFooter|columns|tableClassName|data|affixHeader|columnsTogglable|className|footerClassName|headerClassName|placeholder|source|tableClassName|title|toolbarClassName|)$": {} - }, - "properties": { - "$schema": { - "description": "绑定 JSON 格式说明,可忽略!", - "format": "uri", - "type": "string" - }, - "type": { - "const": "table", - "description": "指定为 tabel 类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "columns": { - "description": "列配置", - "items": { - "allOf": [ - { - "if": { - "$ref": "/schemas/tpl.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/tpl.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/image.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/image.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/date.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/date.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "/schemas/operation.json#/definitions/common" - }, - "else": { - "$ref": "/schemas/plain.json#/definitions/common" - } - } - } - } - } - } - } - } - } - } - } - } - }, - { - "properties": { - "fixed": { - "description": "配置是否固定当前列", - "enum": ["left", "right", "none"], - "type": "string" - }, - "label": { - "description": "列标题", - "type": "string" - }, - "name": { - "description": "绑定字段名", - "type": "string" - }, - "popOver": { - "description": "配置查看详情功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "quickEdit": { - "description": "配置快速编辑功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "copyable": { - "description": "配置点击复制功能", - "oneOf": [ - { - "type": "boolean" - }, - { - "properties": {}, - "type": "object" - } - ] - }, - "sortable": { - "description": "配置是否可以排序", - "type": "boolean" - }, - "toggled": { - "description": "配置是否默认展示", - "type": "boolean" - }, - "width": { - "description": "列宽度", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "breakpoint": { - "type": "string", - "description": "填写 *、xs、sm、md、lg指定 footable 的触发条件,可以填写多个用空格隔开" - } - }, - "type": "object" - } - ] - }, - "type": "array" - }, - "common": { - "description": "amis table 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "affixHeader": { - "description": "是否固定表头", - "type": "boolean" - }, - "className": { - "default": "panel-default", - "description": "外层 CSS 类名", - "type": "string" - }, - "columns": { - "$ref": "/schemas/table.json#/definitions/columns" - }, - "columnsTogglable": { - "description": "展示列显示开关,自动即:列数量大于或等于5个时自动开启", - "oneOf": [ - { - "type": "boolean" - }, - { - "const": "auto" - } - ] - }, - "data": { - "description": "默认的数据" - }, - "footable": { - "oneOf": [ - { - "description": "是否开启底部展示功能,适合移动端展示", - "type": "boolean" - }, - { - "properties": { - "expand": { - "description": "设置默认展开情况", - "enum": ["first", "all", "none"], - "type": "string" - } - }, - "type": "object" - } - ] - }, - "footerClassName": { - "default": "crud-table-footer", - "description": "底部外层 CSS 类名", - "type": "string" - }, - "headerClassName": { - "default": "crud-table-header", - "description": "顶部外层 CSS 类名", - "type": "string" - }, - "placeholder": { - "description": "占位符" - }, - "showFooter": { - "default": true, - "description": "是否显示底部", - "type": "boolean" - }, - "showHeader": { - "default": true, - "description": "是否显示头部", - "type": "boolean" - }, - "source": { - "description": "数据源:绑定当前环境变量" - }, - "tableClassName": { - "default": "table-db table-striped", - "description": "表格 CSS 类名", - "type": "string" - }, - "title": { - "description": "标题", - "type": "string" - }, - "toolbarClassName": { - "default": "crud-table-toolbar", - "description": "工具栏 CSS 类名", - "type": "string" - } - }, - "required": ["type"] - }, - "test": { - "properties": { - "type": { - "const": "table" - } - } - } - }, - "description": "amis table 渲染器格式说明。", - "type": "object" -} diff --git a/schemas/tabs.json b/schemas/tabs.json deleted file mode 100644 index d01b26b2b..000000000 --- a/schemas/tabs.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "$id": "/schemas/tabs.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/tabs.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|tabsClassName|defaultActiveKey|tabs|completeIcon|unCompleteIcon)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "tabs", - "description": "指定为 tabs 选项卡渲染器", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Tabs 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tabs", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "completeIcon": { - "description": "可以用来设置完成图标,请给 tab 属性添加 complete 属性,或者 completeOn 属性", - "type": "string" - }, - "defaultActiveKey": { - "default": 0, - "description": "配置默认第几个 tab 展示", - "type": "integer" - }, - "tabs": { - "description": "tabs集合", - "items": { - "$ref": "/schemas/tabs.json#/definitions/tab" - }, - "type": "array" - }, - "tabsClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置 tabs 容器 className" - }, - "unCompleteIcon": { - "description": "可以用来设置完成图标,请给 tab 属性添加 complete 属性,或者 completeOn 属性", - "type": "string" - } - } - }, - "tab": { - "description": "Tab", - "properties": { - "badge": { - "description": "徽标", - "type": "string" - }, - "complete": { - "description": "标记为完成状态", - "type": "boolean" - }, - "completeOn": { - "description": "通过表达式来标记当前 tab 是否完成", - "type": "string" - }, - "hash": { - "description": "设置以后将跟url的hash对应", - "type": "string" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "reload": { - "description": "设置以后内容每次都会重新渲染", - "type": "boolean" - }, - "tab": { - "anyOf": [ - { - "$ref": "/schemas/page.json#/definitions/container" - } - ] - }, - "title": { - "description": "Tab 标题", - "type": "string" - }, - "toolbar": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "Tab 的顶部位置内容配置" - }, - "toolbarClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "tabs" - } - } - } - }, - "description": "amis Tabs 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tabs", - "type": "object" -} diff --git a/schemas/tasks.json b/schemas/tasks.json deleted file mode 100644 index 951b459c3..000000000 --- a/schemas/tasks.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "$id": "/schemas/tasks.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/tasks.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|remarkLabel|btnText|retryBtnText|btnClassName|statusLabelMap|statusTextMap|retryBtnClassName|name|className|tableClassName|checkApi|submitApi|reSubmitApi|items|interval|taskNameLabel|operationLabel|statusLabel)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "tasks", - "description": "指定为任务类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Tasks 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tasks", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "btnClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "btn-sm btn-default", - "description": "配置容器按钮 className" - }, - "btnText": { - "default": "上线", - "description": "操作按钮文字", - "type": "string" - }, - "checkApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "用来获取任务状态的 API,当没有进行时任务时不会发送。" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "b-a bg-white table-responsive", - "description": "配置容器 className" - }, - "interval": { - "default": 3000, - "description": "当有任务进行中,会每隔一段时间再次检测,而时间间隔就是通过此项配置,默认 3s。", - "type": "number" - }, - "items": { - "items": { - "key": { - "description": "任务键值,请唯一区分", - "type": "string" - }, - "label": { - "description": "任务名称", - "type": "string" - }, - "remark": { - "description": "当前任务状态,支持 html", - "type": "string" - }, - "status": { - "description": "任务状态: \n0: 初始状态,不可操作。\n1: 就绪,可操作状态。\n2: 进行中,还没有结束。\n3:有错误,不可重试。\n4: 已正常结束。\n5:有错误,且可以重试。", - "enum": [0, 1, 2, 3, 4, 5], - "type": "number" - } - }, - "type": "array" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "operationLabel": { - "default": "操作", - "description": "操作列说明", - "type": "string" - }, - "reSubmitApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "如果任务失败,且可以重试,提交的时候会使用此 API" - }, - "remarkLabel": { - "default": "备注", - "description": "备注列说明", - "type": "string" - }, - "retryBtnClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "btn-sm btn-danger", - "description": "配置容器重试按钮 className" - }, - "retryBtnText": { - "default": "重试", - "description": "重试操作按钮文字", - "type": "string" - }, - "statusLabel": { - "default": "状态", - "description": "状态列说明", - "type": "string" - }, - "statusLabelMap": { - "default": [ - "label-warning", - "label-info", - "label-success", - "label-danger", - "label-default", - "label-danger" - ], - "description": "状态显示对应的类名配置。", - "type": "array" - }, - "statusTextMap": { - "default": ["未开始", "就绪", "进行中", "出错", "已完成", "出错"], - "description": "状态显示对应的文字显示配置。", - "type": "array" - }, - "submitApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "提交任务使用的 API" - }, - "tableClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "default": "table table-striped m-b-none", - "description": "配置 table className" - }, - "taskNameLabel": { - "default": "任务名称", - "description": "任务名称列说明", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "tasks" - } - } - } - }, - "description": "amis Tasks 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tasks", - "type": "object" -} diff --git a/schemas/tpl.json b/schemas/tpl.json deleted file mode 100644 index 57b3e2de5..000000000 --- a/schemas/tpl.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$id": "/schemas/tpl.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "dependencies": {}, - "allOf": [ - { - "$ref": "/schemas/tpl.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|name|label|html|text|raw|tpl|inline|wrapperComponent)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "description": "指定为 TPL 类型的渲染器", - "enum": ["tpl", "html"], - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "html": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "title": "HTML 片段", - "$ref": "/schemas/tpl.json#/definitions/tpl" - }, - "inline": { - "description": "是否为 inline 模式", - "type": "boolean" - }, - "text": { - "description": "不支持 html 标签。", - "title": "文本", - "type": "string" - }, - "tpl": { - "title": "模板", - "$ref": "/schemas/tpl.json#/definitions/tpl" - }, - "wrapperComponent": { - "description": "外层用什么标签?默认根据 inline来定,内嵌用 span,非内联用 div", - "type": "string" - }, - "$schema": { - "description": "绑定 JSON 格式说明" - } - } - }, - "test": { - "properties": { - "type": { - "description": "指定为 TPL 类型的渲染器", - "enum": ["tpl", "html"], - "type": "string" - } - } - }, - "tpl": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "type": "string" - } - }, - "description": "amis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl" -} diff --git a/schemas/video.json b/schemas/video.json deleted file mode 100644 index 89f12f1cc..000000000 --- a/schemas/video.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ - { - "$ref": "/schemas/video.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|aspectRatio|rates|playerClassName|framesClassName|src|poster|muted|isLive|jumpFrame|videoType|autoPlay|splitPoster|minPosterDimension|minVideoDuration|frames|columnsCount|visible|visibleOn|disabled|disabledOn)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "video", - "description": "指定为视频类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Video 渲染器,用来生成视频播放器", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "autoPlay": { - "description": "是否自动播放", - "type": "boolean" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "columnsCount": { - "default": 8, - "description": "如果显示切帧,通过此配置项可以控制每行显示多少帧" - }, - "frames": { - "description": "设置后,可以显示切帧" - }, - "framesClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置帧列表容器className" - }, - "isLive": { - "description": "如果是实时的,请标记一下", - "type": "boolean" - }, - "jumpFrame": { - "default": true, - "description": "点击帧画面时是否跳转视频对应的点", - "type": "boolean" - }, - "minPosterDimension": { - "description": "设置最小尺寸提示,低于设置的值,会高亮显示", - "properties": { - "height": { - "description": "高度", - "type": "number" - }, - "width": { - "description": "宽度", - "type": "number" - } - }, - "type": "object" - }, - "minVideoDuration": { - "description": "视频最低时长提示", - "type": "number" - }, - "muted": { - "description": "是否初始静音", - "type": "boolean" - }, - "playerClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置播放器 className" - }, - "poster": { - "description": "视频封面地址", - "type": "string" - }, - "splitPoster": { - "description": "是否将视频和封面分开显示", - "type": "boolean" - }, - "src": { - "description": "视频播放地址", - "type": "string" - }, - "videoType": { - "description": "视频类型如: video/x-flv", - "type": "string" - }, - "aspectRatio": { - "description": "视频比率", - "enum": ["auto", "", "4:3", "16:9"] - }, - "rates": { - "description": "视频速率", - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "test": { - "properties": { - "type": { - "const": "video" - } - } - } - }, - "description": "amis Video 渲染器,用来生成视频播放器", - "$id": "/schemas/video.json#", - "type": "object" -} diff --git a/schemas/wizard.json b/schemas/wizard.json deleted file mode 100644 index 7265c2ffa..000000000 --- a/schemas/wizard.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "$id": "/schemas/wizard.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/wizard.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|mode|disabled|disabledOn|visible|visibleOn|readOnly|redirect|steps|name|className|actionClassName|actionPrevLabel|target|reload|actionNextlabel|actionNextSaveLabel|actionFinishLabel|bulkSubmit|initApi|api|messages)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "wizard", - "description": "指定为 service 类型", - "type": "string" - } - }, - "required": ["type", "steps"], - "type": "object" - } - ], - "definitions": { - "common": { - "description": "amis Wizard 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#wizard", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actionClassName": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置按钮 className" - }, - "actionFinishLabel": { - "description": "完成按钮的文字描述", - "type": "string" - }, - "actionNextLabel": { - "description": "下一步按钮的文字描述", - "type": "string" - }, - "actionNextSaveLabel": { - "description": "下一步并且保存按钮的文字描述", - "type": "string" - }, - "actionPrevLabel": { - "description": "上一步按钮的文字描述", - "type": "string" - }, - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "Wizard 用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#wizard)" - }, - "bulkSubmit": { - "default": false, - "description": "是否合并后再提交", - "type": "boolean" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hiddenOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "initApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "Wizard 用来获取初始数据的 api。[详情](https://baidu.github.io/amis/docs/api#wizard)" - }, - "messages": { - "additionalProperties": false, - "properties": { - "fetchFailed": { - "description": "获取失败时提示", - "type": "string" - }, - "fetchSuccess": { - "description": "获取成功时提示", - "type": "string" - }, - "saveFailed": { - "description": "保存成功时提示", - "type": "string" - }, - "saveSuccess": { - "description": "保存失败时提示", - "type": "string" - } - }, - "type": "object" - }, - "mode": { - "enum": ["vertical", "horizontal"], - "default": "horizontal", - "description": "展示模式", - "type": "string" - }, - "name": { - "$ref": "/schemas/page.json#/definitions/name", - "description": "给当前 wizard 取个名字,可用来跟其他 Renderer 交互。" - }, - "readOnly": { - "description": "是否为只读模式。", - "type": "boolean" - }, - "redirect": { - "description": "保存完后,可以指定跳转地址,支持相对路径和组内绝对路径,同时可以通过 $xxx 使用变量", - "type": "string" - }, - "reload": { - "description": "保存完后,可以通过配置此属性来让其他组件刷新", - "type": "string" - }, - "steps": { - "description": "步骤集合, 每一个配置同 form 渲染器。", - "items": { - "allOf": [ - { - "properties": { - "api": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "当前步骤用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "initApi": { - "$ref": "/schemas/page.json#/definitions/api", - "description": "当前步骤用来获取初始数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "jumpable": { - "description": "是否可直接跳转到该步骤,一般编辑模式需要可直接跳转查看。", - "type": "boolean" - }, - "jumpableOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前步骤可否被直接跳转到。" - }, - "label": { - "description": "Step 标题 title 别名,推荐直接用 title", - "type": "string" - }, - "title": { - "description": "Step 标题", - "type": "string" - } - }, - "type": "object" - }, - { - "$ref": "/schemas/form.json#/definitions/common" - } - ], - "description": "步骤详情" - }, - "type": "array" - }, - "target": { - "description": "默认表单提交自己会通过发送 api 保存数据,但是也可以设定另外一个 form 的 name 值,或者另外一个 `CRUD` 模型的 name 值。 如果 target 目标是一个 `Form` ,则目标 `Form` 会重新触发 `initApi` 和 `schemaApi`,api 可以拿到当前 form 数据。如果目标是一个 `CRUD` 模型,则目标模型会重新触发搜索,参数为当前 Form 数据。", - "type": "string" - }, - "visibleOn": { - "$ref": "/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - } - }, - "test": { - "properties": { - "type": { - "const": "wizard" - } - } - } - }, - "description": "amis Wizard 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#wizard", - "type": "object" -} diff --git a/schemas/wrapper.json b/schemas/wrapper.json deleted file mode 100644 index 1508c16be..000000000 --- a/schemas/wrapper.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$id": "/schemas/wrapper.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "/schemas/wrapper.json#/definitions/common" - }, - { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|className|bodyClassName|body|size|visibleOn|hiddenOn|visible|hidden)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "wrapper", - "description": "指定为容器类型", - "type": "string" - } - }, - "required": ["type"] - } - ], - "definitions": { - "common": { - "description": "amis Wrapper 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Wrapper", - "properties": { - "$ref": { - "$ref": "/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "/schemas/page.json#/definitions/className", - "description": "配置容器 className", - "default": "bg-white" - }, - "size": { - "description": "容器内边距大小", - "enum": ["xs", "sm", "md", "lg", "none", ""] - } - } - }, - "test": { - "properties": { - "type": { - "const": "wrapper" - } - } - } - }, - "description": "amis Wrapper 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Wrapper", - "type": "object" -}