diff --git a/docs/components/crud.md b/docs/components/crud.md index 237dff50..b3014ea9 100755 --- a/docs/components/crud.md +++ b/docs/components/crud.md @@ -71,7 +71,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 } ``` -如果无法知道数据总数,只能知道是否有下一页,请返回如下格式,AMIS 会简单生成一个简单版本的分页控件。 +如果无法知道数据总数,只能知道是否有下一页,请返回如下格式,amis 会简单生成一个简单版本的分页控件。 ```json { diff --git a/docs/index.md b/docs/index.md index 6b537d4e..d7633120 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,6 +28,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "body": { "type": "crud", "draggable": true, + "syncLocation": false, "api": "https://houtai.baidu.com/api/sample", "keepItemSelectionOnPageChange": true, "filter": { diff --git a/docs/start/getting-started.md b/docs/start/getting-started.md index cd1481df..dce16a9e 100644 --- a/docs/start/getting-started.md +++ b/docs/start/getting-started.md @@ -351,7 +351,7 @@ JSSDK 的代码从以下地址获取: - AMIS Demo + amis demo 10 ? 'danger' : 'info'%>`", - "type": "string" - }, - "itemUncheckableOn": { - "description": "用来表达式来确定当前行是否不可以点击", - "type": "string" - }, - "orderField": { - "description": "设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。", - "type": "string" - }, - "pageField": { - "description": "设置分页页码字段名。", - "type": "string" - }, - "perPageField": { - "description": "设置分页一页显示的多少条数据的字段名。", - "type": "string" - }, - "quickSaveApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "快速编辑后用来批量保存的 API" - }, - "quickSaveItemApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "快速编辑配置成及时保存时使用的 API" - }, - "saveOrderApi": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "CRUD 中可以在 toolbar 中额外加入内容,默认将独占一行,如果想和批量操作,分页放在一起,请设置 toolbarInline" - }, - "toolbarClassName": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/crud.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/common" }, - "description": "AMis crud 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#crud", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/commonProps" + }, + { + "if": { + "properties": { + "mode": { + "const": "list" + } + } + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" + }, + "else": { + "if": { + "properties": { + "mode": { + "enum": ["cards", "grid"] + } + } + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/cards.json#/definitions/common" + }, + "else": { + "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common" + } + } + } + ] + }, + "commonProps": { + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "api": { + "description": "初始化数据 API", + "type": "string" + }, + "bulkActions": { + "description": "批量操作", + "items": { + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction" + }, + { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseButton" + } + ] + }, + "type": "array" + }, + "defaultParams": { + "description": "可以默认给定初始参数如: {\"perPage\": 24}", + "type": "object" + }, + "draggable": { + "description": "是否可通过拖拽排序", + "type": "boolean" + }, + "name": { + "description": "取个名字方便别的组件联动", + "type": "string" + }, + "draggableOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "Js 表达式。如 data.type == 1,用表达式来配置是否可拖拽排序" + }, + "filter": { + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/common", + "description": "过滤器表单" + }, + "initFetch": { + "default": true, + "description": "初始是否拉取", + "type": "boolean" + }, + "initFetchOn": { + "description": "初始是否拉取, 用表达式来设置", + "type": "string" + }, + "innerClassName": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "快速编辑后用来批量保存的 API" + }, + "quickSaveItemApi": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "快速编辑配置成及时保存时使用的 API" + }, + "saveOrderApi": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "CRUD 中可以在 toolbar 中额外加入内容,默认将独占一行,如果想和批量操作,分页放在一起,请设置 toolbarInline" + }, + "toolbarClassName": { + "$ref": "https://houtai.baidu.com/v2/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 index e61c5901..195f4458 100644 --- a/schemas/date.json +++ b/schemas/date.json @@ -1,76 +1,66 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/date.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - ] - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/date.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" }, - "description": "AMis date 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 47e376ae..f13ab39f 100644 --- a/schemas/dialog.json +++ b/schemas/dialog.json @@ -1,112 +1,105 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/dialog.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/action.json#" - }, - "type": "array" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "closeOnEsc": { - "default": false, - "description": "是否支持按 ESC 关闭 Dialog", - "type": "boolean" - }, - "initApi": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", - "description": "给当前 dialog 取个名字,可用来跟其他 Renderer 交互。" - }, - "size": { - "description": "Dialog 大小", - "enum": [ - "xs", - "sm", - "md", - "lg" - ] - }, - "title": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "default": "请通过配置 title 设置标题", - "description": "Dialog 标题" - } - } - }, - "test": { - "properties": { - "type": { - "const": "dialog" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/dialog.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/dialog.json#/definitions/common" }, - "description": "AMis Dialog 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dialog", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/action.json#" + }, + "type": "array" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "内容区域" + }, + "bodyClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 Body 容器 className" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "closeOnEsc": { + "default": false, + "description": "是否支持按 ESC 关闭 Dialog", + "type": "boolean" + }, + "initApi": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", + "description": "给当前 dialog 取个名字,可用来跟其他 Renderer 交互。" + }, + "size": { + "description": "Dialog 大小", + "enum": ["xs", "sm", "md", "lg"] + }, + "title": { + "$ref": "https://houtai.baidu.com/v2/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 index 3125a6d6..5d937d05 100644 --- a/schemas/divider.json +++ b/schemas/divider.json @@ -1,57 +1,53 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/divider.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - } - } - }, - "test": { - "properties": { - "type": { - "enum": [ - "divider" - ] - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/divider.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/divider.json#/definitions/common" }, - "description": "AMis plain 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index a0ac9639..72b79d02 100644 --- a/schemas/drawer.json +++ b/schemas/drawer.json @@ -1,113 +1,105 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/drawer.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/action.json#" - }, - "type": "array" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "closeOnEsc": { - "default": false, - "description": "是否支持按 ESC 关闭 drawer", - "type": "boolean" - }, - "initApi": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", - "description": "给当前 drawer 取个名字,可用来跟其他 Renderer 交互。" - }, - "size": { - "description": "drawer 大小", - "enum": [ - "xs", - "sm", - "md", - "lg", - "xl" - ] - }, - "title": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "default": "请通过配置 title 设置标题", - "description": "drawer 标题" - } - } - }, - "test": { - "properties": { - "type": { - "const": "drawer" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/drawer.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/drawer.json#/definitions/common" }, - "description": "AMis drawer 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#drawer", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/action.json#" + }, + "type": "array" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "内容区域" + }, + "bodyClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 Body 容器 className" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "closeOnEsc": { + "default": false, + "description": "是否支持按 ESC 关闭 drawer", + "type": "boolean" + }, + "initApi": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", + "description": "给当前 drawer 取个名字,可用来跟其他 Renderer 交互。" + }, + "size": { + "description": "drawer 大小", + "enum": ["xs", "sm", "md", "lg", "xl"] + }, + "title": { + "$ref": "https://houtai.baidu.com/v2/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 index da39610f..1952caae 100644 --- a/schemas/dropdown-button.json +++ b/schemas/dropdown-button.json @@ -1,174 +1,156 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/common" + "$id": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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" }, - { - "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" + "type": { + "const": "dropdown-button", + "description": "指定为 DropDown Button 类型" } - ], - "definitions": { - "common": { - "description": "AMis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "block": { - "default": false, - "description": "是否独占一行 `display: block`", - "type": "boolean" - }, - "btnClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "给 Button 配置 className。" - }, - "buttons": { - "description": "按钮集合", - "items": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction" - }, + }, + "required": ["type"], + "type": "object" + } + ], + "definitions": { + "common": { + "description": "amis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "block": { + "default": false, + "description": "是否独占一行 `display: block`", + "type": "boolean" + }, + "btnClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "给 Button 配置 className。" + }, + "buttons": { + "description": "按钮集合", + "items": { + "allOf": [ + { + "oneOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/baseAction" + }, - { - "type": "object", - "properties": { - "type": { - "const": "divider" - } - }, - "additionalProperties": false, - "description": "分割符号" - } - ] - }, - { - "properties": { - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "label": { - "description": "按钮名字", - "type": "string" - } - }, - "type": "object" - } - ] + { + "type": "object", + "properties": { + "type": { + "const": "divider" + } }, - "type": "array" - }, - "className": { + "additionalProperties": false, + "description": "分割符号" + } + ] + }, + { + "properties": { + "className": { "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "label": { - "description": "按钮文字", + }, + "icon": { + "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", "type": "string" - }, - "level": { - "description": "按钮级别", - "enum": [ - "info", - "success", - "warning", - "danger", - "link", - "primary" - ], + }, + "label": { + "description": "按钮名字", "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "closeOnOutside": { - "type": "boolean", - "description": "点击外部是否关闭" - }, - "closeOnClick": { - "type": "boolean", - "description": "点击内容是否关闭" - } - }, - "type": "object" + "type": "object" + } + ] + }, + "type": "array" }, - "test": { - "properties": { - "type": { - "const": "dropdown-button" - } - } + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "disabled": { + "description": "是否为禁用状态。", + "type": "boolean" + }, + "disabledOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项的禁用状态。" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否显示" + }, + "closeOnOutside": { + "type": "boolean", + "description": "点击外部是否关闭" + }, + "closeOnClick": { + "type": "boolean", + "description": "点击内容是否关闭" } + }, + "type": "object" }, - "dependencies": {}, - "description": "AMis Dropdown Button 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#dropdown-button" -} \ No newline at end of file + "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 index 2469755c..c0d500e2 100644 --- a/schemas/each.json +++ b/schemas/each.json @@ -1,60 +1,58 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/each.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "name": { - "description": "字段名", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "each" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/each.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/each.json#/definitions/common" }, - "description": "AMis each 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 1e5eead8..a4fce557 100644 --- a/schemas/form.json +++ b/schemas/form.json @@ -34,7 +34,7 @@ } }, "common": { - "description": "AMis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", + "description": "amis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", "dependencies": { "checkInterval": ["asyncApi"], "finishedField": ["asyncApi"] @@ -1263,6 +1263,6 @@ ] } }, - "description": "AMis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", + "description": "amis Form 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#form", "type": "object" } diff --git a/schemas/form/fieldSet.json b/schemas/form/fieldSet.json index 7c056915..282329d2 100644 --- a/schemas/form/fieldSet.json +++ b/schemas/form/fieldSet.json @@ -1,141 +1,124 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/form/fieldSet.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "title": "内容区域" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 fieldSet className" - }, - "collapsable": { - "type": "boolean", - "description": "是否可折叠" - }, - "collapsed": { - "default": false, - "description": "是否默认收起来", - "type": "boolean" - }, - "controls": { - "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "hidden": { - "type": "boolean", - "description": "是否隐藏" - }, - "title": { - "description": "标题", - "type": "string" - }, - "visibleOn": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/form/fieldSet.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/form/fieldSet.json#/definitions/common" }, - "description": "AMis FieldSet 渲染器格式说明", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "title": "内容区域" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 fieldSet className" + }, + "collapsable": { + "type": "boolean", + "description": "是否可折叠" + }, + "collapsed": { + "default": false, + "description": "是否默认收起来", + "type": "boolean" + }, + "controls": { + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", + "description": "FormItem 集合" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否隐藏。" + }, + "hidden": { + "type": "boolean", + "description": "是否隐藏" + }, + "title": { + "description": "标题", + "type": "string" + }, + "visibleOn": { + "$ref": "https://houtai.baidu.com/v2/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/group.json b/schemas/form/group.json index 315c49f5..5459d756 100644 --- a/schemas/form/group.json +++ b/schemas/form/group.json @@ -1,126 +1,118 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/form/group.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 Group className" - }, - "controls": { - "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "visibleOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - }, - "label": { - "description": "描述标题", - "oneOf": [ - { - "type": "string" - }, - { - "enum": [ - false - ] - } - ] - }, - "labelClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 label className" - }, - "description": { - "description": "描述内容,支持 Html 片段。", - "type": "string" - }, - "descriptionClassName": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/form/group.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/form/group.json#/definitions/common" }, - "description": "AMis 表单集合渲染器格式说明,能让多个表单在一行显示", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 Group className" + }, + "controls": { + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", + "description": "FormItem 集合" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否隐藏。" + }, + "visibleOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否显示" + }, + "label": { + "description": "描述标题", + "oneOf": [ + { + "type": "string" + }, + { + "enum": [false] + } + ] + }, + "labelClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 label className" + }, + "description": { + "description": "描述内容,支持 Html 片段。", + "type": "string" + }, + "descriptionClassName": { + "$ref": "https://houtai.baidu.com/v2/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/tabs.json b/schemas/form/tabs.json index 2b3d99a5..7c06a246 100644 --- a/schemas/form/tabs.json +++ b/schemas/form/tabs.json @@ -1,147 +1,141 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/form/tabs.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 Tabs className" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "tabClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 Tab className" - }, - "tabs": { - "description": "选项卡信息", - "items": { - "$ref": "https://houtai.baidu.com/v2/schemas/form/tabs.json#/definitions/tab", - "type": ["object"] - }, - "type": "array" - }, - "visibleOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "tab": { - "additionalProperties": false, - "properties": { - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "title": "内容区域" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 fieldSet className" - }, - "controls": { - "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", - "description": "FormItem 集合" - }, - "disabledOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前 Tab 是否禁用。" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前 Tab 是否显示" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "tabs" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/form/tabs.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/form/tabs.json#/definitions/common" }, - "description": "AMis Tabs 渲染器格式说明", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 Tabs className" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否隐藏。" + }, + "tabClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 Tab className" + }, + "tabs": { + "description": "选项卡信息", + "items": { + "$ref": "https://houtai.baidu.com/v2/schemas/form/tabs.json#/definitions/tab", + "type": ["object"] + }, + "type": "array" + }, + "visibleOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否显示" + } + }, + "type": "object" + }, + "tab": { + "additionalProperties": false, + "properties": { + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "title": "内容区域" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 fieldSet className" + }, + "controls": { + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/controls", + "description": "FormItem 集合" + }, + "disabledOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前 Tab 是否禁用。" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前 Tab 是否显示" + } + }, + "type": "object" + }, + "test": { + "properties": { + "type": { + "const": "tabs" + } + } + } + }, + "description": "amis Tabs 渲染器格式说明", + "type": "object" +} diff --git a/schemas/grid.json b/schemas/grid.json index 34f78f26..fb6a2da9 100644 --- a/schemas/grid.json +++ b/schemas/grid.json @@ -1,208 +1,206 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/grid.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ + "$id": "https://houtai.baidu.com/v2/schemas/grid.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" }, { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|columns|className)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "grid", - "type": "string" - } - }, - "required": [ - "type" - ] + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn" } - ], - "definitions": { - "column": { - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" - }, - { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" + ], + "description": "列" + }, + "columns": { + "description": "列集合", + "items": { + "oneOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/column" + }, + { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/columns", + "description": "列集合, 不推荐,建议再包一个 grid 如果真有必要。" + } + ] + }, + "type": "array" + }, + "common": { + "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "description": "外层 CSS 类名", + "type": "string" }, "columns": { - "description": "列集合", - "items": { - "oneOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/column" - }, - { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/columns", - "description": "列集合, 不推荐,建议再包一个 grid 如果真有必要。" - } - ] - }, - "type": "array" - }, - "common": { - "description": "AMis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "description": "外层 CSS 类名", - "type": "string" - }, - "columns": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/columns" } + }, + "type": "object" }, - "description": "AMis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#grid", - "type": "object" -} \ No newline at end of file + "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 index e99db1a0..0d326a89 100644 --- a/schemas/hbox.json +++ b/schemas/hbox.json @@ -1,85 +1,83 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/hbox.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ + "$id": "https://houtai.baidu.com/v2/schemas/hbox.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" }, { - "additionalProperties": false, - "dependencies": {}, - "patternProperties": { - "^(\\$ref|columns|className)$": {} - }, - "properties": { - "$schema": { - "format": "uri", - "type": "string", - "description": "绑定 JSON 格式说明,可忽略!" - }, - "type": { - "const": "hbox", - "description": "指定为 hbox 类型", - "type": "string" - } - }, - "required": [ - "type" - ] + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn" } - ], - "definitions": { - "column": { - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" - }, - { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/commonColumn" - } - ], - "description": "列" + ], + "description": "列" + }, + "columns": { + "description": "列集合", + "items": { + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/column" + }, + "type": "array" + }, + "common": { + "description": "amis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#hbox", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" }, "columns": { - "description": "列集合", - "items": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/column" - }, - "type": "array" - }, - "common": { - "description": "AMis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#hbox", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "columns": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/columns", - "description": "列集合" - } - } - }, - "commonColumn": { - "properties": { - "columnClassName": { - "description": "列类名" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "hbox" - } - } + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/columns", + "description": "列集合" } + } }, - "description": "AMis Grid 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#hbox", - "type": "object" -} \ No newline at end of file + "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 index 19437271..117db2da 100644 --- a/schemas/iframe.json +++ b/schemas/iframe.json @@ -1,84 +1,82 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/iframe.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - } - } - }, - "test": { - "properties": { - "type": { - "const": "iframe" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/iframe.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/iframe.json#/definitions/common" }, - "description": "AMis iframe 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#iframe", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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 index 942bbfef..f41b16a0 100644 --- a/schemas/image.json +++ b/schemas/image.json @@ -1,72 +1,70 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/image.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/image.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" }, - "description": "AMis image 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 4cd3c5fe..0ff7c09e 100644 --- a/schemas/json.json +++ b/schemas/json.json @@ -1,60 +1,58 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/json.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "levelExpand": { - "type": "number", - "description": "默认展开的级别" - } - } - }, - "test": { - "properties": { - "type": { - "const": "json" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/json.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" }, - "description": "AMis Json 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "levelExpand": { + "type": "number", + "description": "默认展开的级别" + } + } + }, + "test": { + "properties": { + "type": { + "const": "json" + } + } + } + }, + "description": "amis Json 渲染器格式说明。", + "type": "object" +}amis diff --git a/schemas/list.json b/schemas/list.json index 5cf82fef..9dee8db9 100644 --- a/schemas/list.json +++ b/schemas/list.json @@ -1,306 +1,304 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/list.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common" + "$id": "https://houtai.baidu.com/v2/schemas/list.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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" }, - { - "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" - ] + "type": { + "const": "list", + "description": "指定为 list 类型", + "type": "string" } - ], - "definitions": { - "body": { - "description": "内容容器", + }, + "required": ["type"] + } + ], + "definitions": { + "body": { + "description": "内容容器", + "oneOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" + }, + { + "items": { "oneOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" + { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" + }, + { + "description": "**不推荐使用数组,请用 hbox 包裹**", + "items": { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" }, - { - "items": { - "oneOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" - }, - { - "description": "**不推荐使用数组,请用 hbox 包裹**", - "items": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/field" - }, - "type": "array" - } - ] - }, - "type": "array" - } + "type": "array" + } ] + }, + "type": "array" + } + ] + }, + "common": { + "description": "amis list 渲染器格式说明。", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" }, - "common": { - "description": "AMis list 渲染器格式说明。", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "default": "panel-default", - "description": "外层 CSS 类名", - "type": "string" - }, - "data": { - "description": "默认的数据" - }, - "footer": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "底部容器" - }, - "footerClassName": { - "default": "crud-list-footer", - "description": "底部外层 CSS 类名", - "type": "string" - }, - "header": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "顶部容器" - }, - "headerClassName": { - "default": "amis-list-header", - "description": "顶部外层 CSS 类名", - "type": "string" - }, - "listItem": { - "description": "成员内容配置", - "properties": { - "actions": { - "items": { - "$ref": "https://houtai.baidu.com/v2/schemas/action.json#" - }, - "type": "array" - }, - "avatar": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", - "description": "头像,支持tpl" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/body" - }, - "desc": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", - "description": "描述,支持tpl" - }, - "remark": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", - "description": "tooltip 说明" - }, - "subTitle": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", - "description": "副标题, 支持tpl" - }, - "title": { - "$ref": "https://houtai.baidu.com/v2/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": "数据源:绑定当前环境变量" - } + "className": { + "default": "panel-default", + "description": "外层 CSS 类名", + "type": "string" + }, + "data": { + "description": "默认的数据" + }, + "footer": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "底部容器" + }, + "footerClassName": { + "default": "crud-list-footer", + "description": "底部外层 CSS 类名", + "type": "string" + }, + "header": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "顶部容器" + }, + "headerClassName": { + "default": "amis-list-header", + "description": "顶部外层 CSS 类名", + "type": "string" + }, + "listItem": { + "description": "成员内容配置", + "properties": { + "actions": { + "items": { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#" + }, + "type": "array" }, - "type": "object" + "avatar": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", + "description": "头像,支持tpl" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/body" + }, + "desc": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", + "description": "描述,支持tpl" + }, + "remark": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", + "description": "tooltip 说明" + }, + "subTitle": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", + "description": "副标题, 支持tpl" + }, + "title": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl", + "description": "标题, 支持tpl" + } + }, + "type": "object" }, - "field": { - "allOf": [ - { + "placeholder": { + "description": "占位符" + }, + "showFooter": { + "default": true, + "description": "是否显示底部", + "type": "boolean" + }, + "showHeader": { + "default": true, + "description": "是否显示头部", + "type": "boolean" + }, + "source": { + "description": "数据源:绑定当前环境变量" + } + }, + "type": "object" + }, + "field": { + "allOf": [ + { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" }, "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" - }, - "else": { - "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" - } - } - } - } - } - } - } - } + "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" } + } } + } } + } } + } + } + } + } + } + }, + { + "properties": { + "label": { + "description": "字段名称", + "type": "string" + }, + "name": { + "description": "绑定字段名", + "type": "string" + }, + "popOver": { + "description": "配置查看详情功能", + "oneOf": [ + { + "type": "boolean" }, { - "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" + "properties": {}, + "type": "object" } - ] - }, - "test": { - "properties": { - "type": { - "const": "list" + ] + }, + "quickEdit": { + "description": "配置快速编辑功能", + "oneOf": [ + { + "type": "boolean" + }, + { + "properties": {}, + "type": "object" } + ] + }, + "copyable": { + "description": "配置点击复制功能", + "oneOf": [ + { + "type": "boolean" + }, + { + "properties": {}, + "type": "object" + } + ] } + }, + "type": "object" } + ] }, - "description": "AMis list 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + "test": { + "properties": { + "type": { + "const": "list" + } + } + } + }, + "description": "amis list 渲染器格式说明。", + "type": "object" +} diff --git a/schemas/mapping.json b/schemas/mapping.json index 1f5e57b7..f55cf88e 100644 --- a/schemas/mapping.json +++ b/schemas/mapping.json @@ -1,75 +1,67 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/mapping.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - ] - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/mapping.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" }, - "description": "AMis mapping 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 7ac1d96b..3745f0e0 100644 --- a/schemas/nav.json +++ b/schemas/nav.json @@ -1,79 +1,77 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/nav.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "$ref": { - "$ref": "https://houtai.baidu.com/v2/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"] - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/nav.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/common" }, - "description": "AMis Nav 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#nav", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "$ref": { + "$ref": "https://houtai.baidu.com/v2/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 index bd776774..80d67578 100644 --- a/schemas/operation.json +++ b/schemas/operation.json @@ -1,63 +1,61 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/operation.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/action.json#" - }, - "type": "array" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "placeholder": { - "description": "占位符", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "operation" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/operation.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" }, - "description": "AMis operation 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/action.json#" + }, + "type": "array" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 3c05fe7c..45823339 100644 --- a/schemas/page.json +++ b/schemas/page.json @@ -1,507 +1,490 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/page.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "definitions": { - "$ref": { - "description": "引用page下已经定义好的类型", - "type": "string" + "$id": "https://houtai.baidu.com/v2/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" }, - "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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" - }, - { - "items": { - "$ref": "https://houtai.baidu.com/v2/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" - } + { + "additionalProperties": false, + "properties": { + "data": { + "default": { + "&": "$$" + }, + "description": "用来控制携带数据. 当key 为 `&` 值为 `$$` 时, 将所有原始数据打平设置到 data 中. 当值为 $$ 将所有原始数据赋值到对应的 key 中. 当值为 $ 打头时, 将变量值设置到 key 中.", + "type": "object" }, - "required": [ - "type" - ], - "title": "自定义渲染器", - "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": "https://houtai.baidu.com/v2/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" }, - "subRenderer": { + { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/subRenderer" + }, + { + "items": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/button-group.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/button-group.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/cards.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/cards.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/chart.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/action.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/chart.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/collapse.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/collapse.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/button-group.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/divider.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/button-group.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/divider.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/cards.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/cards.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/chart.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/chart.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/collapse.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/collapse.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/iframe.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/iframe.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/divider.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/divider.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/crud.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/panel.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/dropdown-button.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/panel.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/form.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/service.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/service.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/iframe.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/tasks.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/iframe.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/tasks.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/video.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/video.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/wizard.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/wizard.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/wrapper.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/wrapper.json#/definitions/common" }, "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/nav.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/panel.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/panel.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/service.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/service.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/tasks.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/tasks.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/video.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/video.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/wizard.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/wizard.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/wrapper.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/wrapper.json#/definitions/common" - }, - "else": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/customRenderer" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } + "$ref": "https://houtai.baidu.com/v2/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" + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "title": "左边栏容器" + }, + "asideClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 aside 容器 className" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "title": "页面内容区域" + }, + "bodyClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 body 容器 className" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "data": { + "description": "初始数据,设置得值可用于组件内部模板使用。", + "type": "object" + }, + "headerClassName": { + "$ref": "https://houtai.baidu.com/v2/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" }, - "aside": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "title": "左边栏容器" - }, - "asideClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 aside 容器 className" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "title": "页面内容区域" - }, - "bodyClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 body 容器 className" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "data": { - "description": "初始数据,设置得值可用于组件内部模板使用。", - "type": "object" - }, - "headerClassName": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "remark": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", - "description": "页面描述" - }, - "subTitle": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", - "description": "页面副标题" - }, - "title": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", - "description": "页面标题" - }, - "toolbar": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "页面顶部区域,当存在 title 时在右上角显示。" - }, - "toolbarClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 toolbar 容器 className" - }, - "type": { - "const": "page", - "description": "指定为 page 渲染器。", - "type": "string" - }, - "definitions": { - "type": "object", - "description": "定义可复用类型,方便子节点引用" + "fetchSuccess": { + "description": "用来配置当 initApi 拉取成功时提示的信息,当然不设置的话就不会提示。", + "type": "string" } + }, + "type": "object" }, - "required": [ - "$schema", - "type" - ], - "type": "object" -} \ No newline at end of file + "name": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", + "description": "给当前组件设定一个名,方便其他组件引用。" + }, + "remark": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", + "description": "页面描述" + }, + "subTitle": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", + "description": "页面副标题" + }, + "title": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/stringOrNull", + "description": "页面标题" + }, + "toolbar": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "页面顶部区域,当存在 title 时在右上角显示。" + }, + "toolbarClassName": { + "$ref": "https://houtai.baidu.com/v2/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 index 7092103f..20bcf24e 100644 --- a/schemas/panel.json +++ b/schemas/panel.json @@ -1,98 +1,96 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/panel.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actions": { - "items": { - "$ref": "https://houtai.baidu.com/v2/schemas/action.json#" - }, - "type": "array" - }, - "actionsClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 actions 容器 className" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "bodyClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 Body 容器 className" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "footer": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "footer 内容区域" - }, - "footerClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 footer 容器 className" - }, - "header": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "头部内容, 和 title 二选一。" - }, - "headerClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 header 容器 className" - }, - "title": { - "description": "Panel 标题", - "type": "string" - }, - "affixFooter": { - "description": "固定底部", - "type": "boolean" - } - } - }, - "test": { - "properties": { - "type": { - "const": "panel" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/panel.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/panel.json#/definitions/common" }, - "description": "AMis Panel 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#panel", - "title": "Panel", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "actions": { + "items": { + "$ref": "https://houtai.baidu.com/v2/schemas/action.json#" + }, + "type": "array" + }, + "actionsClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 actions 容器 className" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "内容区域" + }, + "bodyClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 Body 容器 className" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "footer": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "footer 内容区域" + }, + "footerClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置 footer 容器 className" + }, + "header": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "头部内容, 和 title 二选一。" + }, + "headerClassName": { + "$ref": "https://houtai.baidu.com/v2/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 index b972e1be..6358724c 100644 --- a/schemas/plain.json +++ b/schemas/plain.json @@ -1,79 +1,71 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/plain.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - ] - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/plain.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" }, - "description": "AMis plain 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 065fefe5..5adb6a5a 100644 --- a/schemas/progress.json +++ b/schemas/progress.json @@ -1,75 +1,73 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/progress.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/progress.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" }, - "description": "AMis progress 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index e4e77c0f..ffd2b58c 100644 --- a/schemas/service.json +++ b/schemas/service.json @@ -1,102 +1,100 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/service.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "api": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "schemaApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "用来获取远程 Schema 的 api" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "service" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/service.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/service.json#/definitions/common" }, - "description": "AMis Service 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#service", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "api": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "内容区域" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", + "description": "给当前组件设定一个名,方便其他组件引用。" + }, + "schemaApi": { + "$ref": "https://houtai.baidu.com/v2/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 index f8c96f9e..027188f3 100644 --- a/schemas/status.json +++ b/schemas/status.json @@ -1,67 +1,65 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/status.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "map": { - "description": "配置不通的值段,用不通的样式提示用户", - "items": { - "type": "string" - }, - "type": "array" - }, - "placeholder": { - "description": "占位符", - "type": "string" - } - } - }, - "test": { - "properties": { - "type": { - "const": "status" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/status.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" }, - "description": "AMis status 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index c87f31be..c1e2e22f 100644 --- a/schemas/switch.json +++ b/schemas/switch.json @@ -1,72 +1,70 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/switch.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/switch.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" }, - "description": "AMis switch 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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 index 8fe5c93d..70c84a98 100644 --- a/schemas/table.json +++ b/schemas/table.json @@ -1,330 +1,318 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/table.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/table.json#/definitions/common" + "$id": "https://houtai.baidu.com/v2/schemas/table.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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" }, - { - "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" - ] + "type": { + "const": "table", + "description": "指定为 tabel 类型", + "type": "string" } - ], - "definitions": { - "columns": { - "description": "列配置", - "items": { - "allOf": [ - { + }, + "required": ["type"] + } + ], + "definitions": { + "columns": { + "description": "列配置", + "items": { + "allOf": [ + { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" + }, + "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/image.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" }, "else": { + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" + }, + "else": { "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/test" + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" }, "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/date.json#/definitions/common" + "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" }, "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/status.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/mapping.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/progress.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/switch.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/hbox.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/grid.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/json.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/list.json#/definitions/common" - }, - "else": { - "if": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" - }, - "then": { - "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" - }, - "else": { - "$ref": "https://houtai.baidu.com/v2/schemas/plain.json#/definitions/common" - } - } - } - } - } - } - } - } - } + "if": { + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/test" + }, + "then": { + "$ref": "https://houtai.baidu.com/v2/schemas/operation.json#/definitions/common" + }, + "else": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "affixHeader": { - "description": "是否固定表头", - "type": "boolean" - }, - "className": { - "default": "panel-default", - "description": "外层 CSS 类名", - "type": "string" - }, - "columns": { - "$ref": "https://houtai.baidu.com/v2/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" + } } + } } - } + }, + { + "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" }, - "description": "AMis table 渲染器格式说明。", - "type": "object" -} \ No newline at end of file + "common": { + "description": "amis table 渲染器格式说明。", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "affixHeader": { + "description": "是否固定表头", + "type": "boolean" + }, + "className": { + "default": "panel-default", + "description": "外层 CSS 类名", + "type": "string" + }, + "columns": { + "$ref": "https://houtai.baidu.com/v2/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 index 249e17d6..34378060 100644 --- a/schemas/tabs.json +++ b/schemas/tabs.json @@ -1,136 +1,134 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/tabs.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/common" + "$id": "https://houtai.baidu.com/v2/schemas/tabs.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/common" + }, + { + "additionalProperties": false, + "dependencies": {}, + "patternProperties": { + "^(\\$ref|className|tabsClassName|defaultActiveKey|tabs|completeIcon|unCompleteIcon)$": {} + }, + "properties": { + "$schema": { + "format": "uri", + "type": "string", + "description": "绑定 JSON 格式说明,可忽略!" }, - { - "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" - ] + "type": { + "const": "tabs", + "description": "指定为 tabs 选项卡渲染器", + "type": "string" } - ], - "definitions": { - "common": { - "description": "AMis Tabs 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tabs", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/tab" - }, - "type": "array" - }, - "tabsClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置 tabs 容器 className" - }, - "unCompleteIcon": { - "description": "可以用来设置完成图标,请给 tab 属性添加 complete 属性,或者 completeOn 属性", - "type": "string" - } - } + }, + "required": ["type"] + } + ], + "definitions": { + "common": { + "description": "amis Tabs 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tabs", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/tabs.json#/definitions/tab" + }, + "type": "array" + }, + "tabsClassName": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否隐藏。" + }, + "icon": { + "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", + "type": "string" + }, + "reload": { + "description": "设置以后内容每次都会重新渲染", + "type": "boolean" }, "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "icon": { - "description": "按钮图标,请查看 fontAwesome http://fontawesome.io/icons/", - "type": "string" - }, - "reload": { - "description": "设置以后内容每次都会重新渲染", - "type": "boolean" - }, - "tab": { - "anyOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container" - } - ] - }, - "title": { - "description": "Tab 标题", - "type": "string" - }, - "toolbar": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "Tab 的顶部位置内容配置" - }, - "toolbarClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "visibleOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - }, - "type": "object" - }, - "test": { - "properties": { - "type": { - "const": "tabs" - } + "anyOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container" } + ] + }, + "title": { + "description": "Tab 标题", + "type": "string" + }, + "toolbar": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "Tab 的顶部位置内容配置" + }, + "toolbarClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "visibleOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否显示" } + }, + "type": "object" }, - "description": "AMis Tabs 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tabs", - "type": "object" -} \ No newline at end of file + "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 index b6c0c161..749720b8 100644 --- a/schemas/tasks.json +++ b/schemas/tasks.json @@ -1,175 +1,159 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/tasks.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "btnClassName": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "default": "btn-sm btn-default", - "description": "配置容器按钮 className" - }, - "btnText": { - "default": "上线", - "description": "操作按钮文字", - "type": "string" - }, - "checkApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "用来获取任务状态的 API,当没有进行时任务时不会发送。" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", - "description": "给当前组件设定一个名,方便其他组件引用。" - }, - "operationLabel": { - "default": "操作", - "description": "操作列说明", - "type": "string" - }, - "reSubmitApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "如果任务失败,且可以重试,提交的时候会使用此 API" - }, - "remarkLabel": { - "default": "备注", - "description": "备注列说明", - "type": "string" - }, - "retryBtnClassName": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "提交任务使用的 API" - }, - "tableClassName": { - "$ref": "https://houtai.baidu.com/v2/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" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/tasks.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/tasks.json#/definitions/common" }, - "description": "AMis Tasks 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#tasks", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "btnClassName": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "default": "btn-sm btn-default", + "description": "配置容器按钮 className" + }, + "btnText": { + "default": "上线", + "description": "操作按钮文字", + "type": "string" + }, + "checkApi": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "用来获取任务状态的 API,当没有进行时任务时不会发送。" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/name", + "description": "给当前组件设定一个名,方便其他组件引用。" + }, + "operationLabel": { + "default": "操作", + "description": "操作列说明", + "type": "string" + }, + "reSubmitApi": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "如果任务失败,且可以重试,提交的时候会使用此 API" + }, + "remarkLabel": { + "default": "备注", + "description": "备注列说明", + "type": "string" + }, + "retryBtnClassName": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "提交任务使用的 API" + }, + "tableClassName": { + "$ref": "https://houtai.baidu.com/v2/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 index 6059915c..5fc38997 100644 --- a/schemas/tpl.json +++ b/schemas/tpl.json @@ -1,96 +1,88 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/tpl.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "dependencies": {}, - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/common" + "$id": "https://houtai.baidu.com/v2/schemas/tpl.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "dependencies": {}, + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/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 格式说明,可忽略!" }, - { - "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" - ] + "type": { + "description": "指定为 TPL 类型的渲染器", + "enum": ["tpl", "html"], + "type": "string" } - ], - "definitions": { - "common": { - "description": "AMis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl", - "properties": { - "$ref": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "html": { - "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", - "title": "HTML 片段", - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl" - }, - "inline": { - "description": "是否为 inline 模式", - "type": "boolean" - }, - "text": { - "description": "不支持 html 标签。", - "title": "文本", - "type": "string" - }, - "tpl": { - "title": "模板", - "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl" - }, - "wrapperComponent": { - "description": "外层用什么标签?默认根据 inline来定,内嵌用 span,非内联用 div", - "type": "string" - }, - "$schema": { - "enum": [ - "https://houtai.baidu.com/v2/schemas/tpl.json#", - "https://houtai.baidu.com/v2/schemas/tpl.json" - ], - "description": "绑定 JSON 格式说明" - } - } + }, + "required": ["type"] + } + ], + "definitions": { + "common": { + "description": "amis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl", + "properties": { + "$ref": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" }, - "test": { - "properties": { - "type": { - "description": "指定为 TPL 类型的渲染器", - "enum": [ - "tpl", - "html" - ], - "type": "string" - } - } + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "html": { + "description": "支持模板, 可通过 $xxx 或者 ${xxx} 取值,或者直接用 lodash.template 模板引擎。详情: https://baidu.github.io/amis/docs/renderers#tpl", + "title": "HTML 片段", + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl" + }, + "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", - "type": "string" + "title": "模板", + "$ref": "https://houtai.baidu.com/v2/schemas/tpl.json#/definitions/tpl" + }, + "wrapperComponent": { + "description": "外层用什么标签?默认根据 inline来定,内嵌用 span,非内联用 div", + "type": "string" + }, + "$schema": { + "enum": [ + "https://houtai.baidu.com/v2/schemas/tpl.json#", + "https://houtai.baidu.com/v2/schemas/tpl.json" + ], + "description": "绑定 JSON 格式说明" } + } }, - "description": "AMis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl" -} \ No newline at end of file + "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 index 70d2e200..b1f89410 100644 --- a/schemas/video.json +++ b/schemas/video.json @@ -1,132 +1,130 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "autoPlay": { - "description": "是否自动播放", - "type": "boolean" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "columnsCount": { - "default": 8, - "description": "如果显示切帧,通过此配置项可以控制每行显示多少帧" - }, - "frames": { - "description": "设置后,可以显示切帧" - }, - "framesClassName": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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" - } - } - } + "$schema": "http://json-schema.org/draft-04/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/video.json#/definitions/common" }, - "description": "AMis Video 渲染器,用来生成视频播放器", - "id": "https://houtai.baidu.com/v2/schemas/video.json#", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "autoPlay": { + "description": "是否自动播放", + "type": "boolean" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "columnsCount": { + "default": 8, + "description": "如果显示切帧,通过此配置项可以控制每行显示多少帧" + }, + "frames": { + "description": "设置后,可以显示切帧" + }, + "framesClassName": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/video.json#", + "type": "object" +} diff --git a/schemas/wizard.json b/schemas/wizard.json index d3595a40..e7431ba7 100644 --- a/schemas/wizard.json +++ b/schemas/wizard.json @@ -1,198 +1,192 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/wizard.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "actionClassName": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "Wizard 用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#wizard)" - }, - "bulkSubmit": { - "default": false, - "description": "是否合并后再提交", - "type": "boolean" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className" - }, - "disabled": { - "description": "是否为禁用状态。", - "type": "boolean" - }, - "disabledOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项的禁用状态。" - }, - "hiddenOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否隐藏。" - }, - "initApi": { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "当前步骤用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "initApi": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", - "description": "当前步骤用来获取初始数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" - }, - "jumpable": { - "description": "是否可直接跳转到该步骤,一般编辑模式需要可直接跳转查看。", - "type": "boolean" - }, - "jumpableOn": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前步骤可否被直接跳转到。" - }, - "label": { - "description": "Step 标题 title 别名,推荐直接用 title", - "type": "string" - }, - "title": { - "description": "Step 标题", - "type": "string" - } - }, - "type": "object" - }, - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", - "description": "通过 JS 表达式来配置当前表单项是否显示" - } - } - }, - "test": { - "properties": { - "type": { - "const": "wizard" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/wizard.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/wizard.json#/definitions/common" }, - "description": "AMis Wizard 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers#wizard", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "actionClassName": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "Wizard 用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#wizard)" + }, + "bulkSubmit": { + "default": false, + "description": "是否合并后再提交", + "type": "boolean" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", + "description": "配置容器 className" + }, + "disabled": { + "description": "是否为禁用状态。", + "type": "boolean" + }, + "disabledOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项的禁用状态。" + }, + "hiddenOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前表单项是否隐藏。" + }, + "initApi": { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "当前步骤用来保存数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" + }, + "initApi": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/api", + "description": "当前步骤用来获取初始数据的 api。[详情](https://baidu.github.io/amis/docs/api#form)" + }, + "jumpable": { + "description": "是否可直接跳转到该步骤,一般编辑模式需要可直接跳转查看。", + "type": "boolean" + }, + "jumpableOn": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/expression", + "description": "通过 JS 表达式来配置当前步骤可否被直接跳转到。" + }, + "label": { + "description": "Step 标题 title 别名,推荐直接用 title", + "type": "string" + }, + "title": { + "description": "Step 标题", + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/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 index ef68b054..0b386cda 100644 --- a/schemas/wrapper.json +++ b/schemas/wrapper.json @@ -1,71 +1,62 @@ { - "$id": "https://houtai.baidu.com/v2/schemas/wrapper.json#", - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { - "$ref": "https://houtai.baidu.com/v2/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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", - "description": "引用页面中的定义" - }, - "body": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", - "description": "内容区域" - }, - "className": { - "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/className", - "description": "配置容器 className", - "default": "bg-white" - }, - "size": { - "description": "容器内边距大小", - "enum": [ - "xs", - "sm", - "md", - "lg", - "none", - "" - ] - } - } - }, - "test": { - "properties": { - "type": { - "const": "wrapper" - } - } - } + "$id": "https://houtai.baidu.com/v2/schemas/wrapper.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "allOf": [ + { + "$ref": "https://houtai.baidu.com/v2/schemas/wrapper.json#/definitions/common" }, - "description": "AMis Wrapper 渲染器,格式说明。https://baidu.github.io/amis/docs/renderers/Wrapper", - "type": "object" -} \ No newline at end of file + { + "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": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/$ref", + "description": "引用页面中的定义" + }, + "body": { + "$ref": "https://houtai.baidu.com/v2/schemas/page.json#/definitions/container", + "description": "内容区域" + }, + "className": { + "$ref": "https://houtai.baidu.com/v2/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" +}