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 的代码从以下地址获取:
-*
的内容",
- "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"
+}