amis
Version:
一种MIS页面生成工具
1,994 lines (1,993 loc) • 4.26 MB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/RootSchema",
"definitions": {
"RootSchema": {
"$ref": "#/definitions/PageSchema"
},
"PageSchema": {
"type": "object",
"properties": {
"loadingConfig": {
"type": "object",
"properties": {
"root": {
"type": "string"
},
"show": {
"type": "boolean"
}
},
"additionalProperties": false
},
"$$id": {
"type": "string",
"description": "组件唯一 id,主要用于页面设计器中定位 json 节点"
},
"className": {
"$ref": "#/definitions/SchemaClassName",
"description": "配置容器 className"
},
"$ref": {
"type": "string",
"description": "配合 definitions 一起使用,可以实现无限循环的渲染器。"
},
"disabled": {
"type": "boolean",
"description": "是否禁用"
},
"disabledOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否禁用表达式"
},
"hidden": {
"type": "boolean",
"description": "是否隐藏"
},
"hiddenOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否隐藏表达式"
},
"visible": {
"type": "boolean",
"description": "是否显示"
},
"visibleOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否显示表达式"
},
"id": {
"type": "string",
"description": "组件唯一 id,主要用于日志采集"
},
"onEvent": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"weight": {
"type": "number"
},
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/ListenerAction"
}
},
"debounce": {
"$ref": "#/definitions/debounceConfig"
},
"track": {
"$ref": "#/definitions/trackConfig"
}
},
"required": [
"actions"
],
"additionalProperties": false
},
"description": "事件动作配置"
},
"static": {
"type": "boolean",
"description": "是否静态展示"
},
"staticOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否静态展示表达式"
},
"staticPlaceholder": {
"type": "string",
"description": "静态展示空值占位"
},
"staticClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项类名"
},
"staticLabelClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项Label类名"
},
"staticInputClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项Value类名"
},
"staticSchema": {},
"style": {
"type": "object",
"description": "自定义样式"
},
"editorSetting": {
"type": "object",
"properties": {
"behavior": {
"type": "string",
"description": "组件行为、用途,如 create、update、remove"
},
"displayName": {
"type": "string",
"description": "组件名称,通常是业务名称方便定位"
},
"mock": {
"description": "编辑器假数据,方便展示"
}
},
"description": "编辑器配置,运行时可以忽略"
},
"useMobileUI": {
"type": "boolean",
"description": "可以组件级别用来关闭移动端样式"
},
"testIdBuilder": {
"$ref": "#/definitions/TestIdBuilder"
},
"type": {
"type": "string",
"const": "page",
"description": "指定为 page 渲染器。"
},
"testid": {
"type": "string"
},
"title": {
"type": "string",
"description": "页面标题"
},
"subTitle": {
"type": "string",
"description": "页面副标题"
},
"remark": {
"$ref": "#/definitions/SchemaRemark",
"description": "页面描述, 标题旁边会出现个小图标,放上去会显示这个属性配置的内容。"
},
"body": {
"$ref": "#/definitions/SchemaCollection",
"description": "内容区域"
},
"bodyClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "内容区 css 类名"
},
"aside": {
"$ref": "#/definitions/SchemaCollection",
"description": "边栏区域"
},
"asideResizor": {
"type": "boolean",
"description": "边栏是否允许拖动"
},
"asideSticky": {
"type": "boolean",
"description": "边栏内容是否粘住,即不跟随滚动。",
"default": true
},
"asidePosition": {
"type": "string",
"enum": [
"left",
"right"
],
"description": "边栏位置",
"default": "left"
},
"asideMinWidth": {
"type": "number",
"description": "边栏最小宽度"
},
"asideMaxWidth": {
"type": "number",
"description": "边栏最小宽度"
},
"asideClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "边栏区 css 类名"
},
"css": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
]
},
"description": "自定义页面级别样式表"
},
"mobileCSS": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
]
},
"description": "移动端下的样式表"
},
"data": {
"$ref": "#/definitions/SchemaDefaultData",
"description": "页面级别的初始数据"
},
"headerClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "配置 header 容器 className"
},
"initApi": {
"$ref": "#/definitions/SchemaApi",
"description": "页面初始化的时候,可以设置一个 API 让其取拉取,发送数据会携带当前 data 数据(包含地址栏参数),获取得数据会合并到 data 中,供组件内使用。"
},
"initFetch": {
"type": "boolean",
"description": "是否默认就拉取?"
},
"initFetchOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否默认就拉取表达式"
},
"messages": {
"$ref": "#/definitions/SchemaMessage"
},
"name": {
"$ref": "#/definitions/SchemaName"
},
"toolbar": {
"$ref": "#/definitions/SchemaCollection",
"description": "页面顶部区域,当存在 title 时在右上角显示。"
},
"toolbarClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "配置 toolbar 容器 className"
},
"definitions": {},
"interval": {
"type": "number",
"description": "配置轮询间隔,配置后 initApi 将轮询加载。"
},
"silentPolling": {
"type": "boolean",
"description": "是否要静默加载,也就是说不显示进度"
},
"stopAutoRefreshWhen": {
"$ref": "#/definitions/SchemaExpression",
"description": "配置停止轮询的条件。"
},
"showErrorMsg": {
"type": "boolean",
"description": "是否显示错误信息,默认是显示的。"
},
"cssVars": {
"description": "css 变量"
},
"regions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"aside",
"body",
"toolbar",
"header"
]
},
"description": "默认不设置自动感觉内容来决定要不要展示这些区域 如果配置了,以配置为主。"
},
"pullRefresh": {
"type": "object",
"properties": {
"disabled": {
"type": "boolean"
},
"pullingText": {
"type": "string"
},
"loosingText": {
"type": "string"
}
},
"additionalProperties": false,
"description": "下拉刷新配置"
}
},
"required": [
"type"
],
"additionalProperties": false,
"description": "amis Page 渲染器。详情请见:https://aisuda.bce.baidu.com/amis/zh-CN/components/page"
},
"SchemaClassName": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"not": {}
},
{
"type": "null"
},
{
"$ref": "#/definitions/SchemaExpression"
}
]
}
}
],
"description": "css类名,配置字符串,或者对象。\n\n className: \"red\"\n\n用对象配置时意味着你能跟表达式一起搭配使用,如:\n\n className: { \"red\": \"data.progress > 80\", \"blue\": \"data.progress > 60\" }"
},
"SchemaExpression": {
"type": "string",
"description": "表达式,语法 `data.xxx > 5`。"
},
"ListenerAction": {
"type": "object",
"properties": {
"actionType": {
"type": "string"
},
"description": {
"type": "string"
},
"componentId": {
"type": "string"
},
"componentName": {
"type": "string"
},
"ignoreError": {
"type": "boolean"
},
"args": {
"type": "object"
},
"data": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"dataMergeMode": {
"type": "string",
"enum": [
"merge",
"override"
]
},
"outputVar": {
"type": "string"
},
"preventDefault": {
"type": "boolean"
},
"stopPropagation": {
"type": "boolean"
},
"expression": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/ConditionGroupValue"
}
]
},
"execOn": {
"type": "string"
}
},
"required": [
"actionType"
]
},
"ConditionGroupValue": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conjunction": {
"type": "string",
"enum": [
"and",
"or"
]
},
"not": {
"type": "boolean"
},
"children": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/ConditionRule"
},
{
"$ref": "#/definitions/ConditionGroupValue"
}
]
}
},
"if": {
"type": "string"
}
},
"required": [
"id",
"conjunction"
],
"additionalProperties": false
},
"ConditionRule": {
"type": "object",
"properties": {
"id": {},
"left": {
"$ref": "#/definitions/ExpressionComplex"
},
"op": {
"$ref": "#/definitions/OperatorType"
},
"right": {
"anyOf": [
{
"$ref": "#/definitions/ExpressionComplex"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/ExpressionComplex"
}
}
]
},
"if": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"ExpressionComplex": {
"anyOf": [
{
"$ref": "#/definitions/ExpressionValue"
},
{
"$ref": "#/definitions/ExpressionFunc"
},
{
"$ref": "#/definitions/ExpressionField"
},
{
"$ref": "#/definitions/ExpressionFormula"
}
]
},
"ExpressionValue": {
"anyOf": [
{
"$ref": "#/definitions/ExpressionSimple"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "value"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "object"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"ExpressionSimple": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "object"
},
{
"not": {}
}
]
},
"ExpressionFunc": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "func"
},
"func": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"$ref": "#/definitions/ExpressionComplex"
}
}
},
"required": [
"type",
"func",
"args"
],
"additionalProperties": false
},
"ExpressionField": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "field"
},
"field": {
"type": "string"
}
},
"required": [
"type",
"field"
],
"additionalProperties": false
},
"ExpressionFormula": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "formula"
},
"value": {
"type": "string"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
"OperatorType": {
"anyOf": [
{
"type": "string",
"const": "equal"
},
{
"type": "string",
"const": "not_equal"
},
{
"type": "string",
"const": "is_empty"
},
{
"type": "string",
"const": "is_not_empty"
},
{
"type": "string",
"const": "like"
},
{
"type": "string",
"const": "not_like"
},
{
"type": "string",
"const": "starts_with"
},
{
"type": "string",
"const": "ends_with"
},
{
"type": "string",
"const": "less"
},
{
"type": "string",
"const": "less_or_equal"
},
{
"type": "string",
"const": "greater"
},
{
"type": "string",
"const": "greater_or_equal"
},
{
"type": "string",
"const": "between"
},
{
"type": "string",
"const": "not_between"
},
{
"type": "string",
"const": "select_equals"
},
{
"type": "string",
"const": "select_not_equals"
},
{
"type": "string",
"const": "select_any_in"
},
{
"type": "string",
"const": "select_not_any_in"
},
{
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"label",
"value"
],
"additionalProperties": false
}
]
},
"debounceConfig": {
"type": "object",
"properties": {
"maxWait": {
"type": "number"
},
"wait": {
"type": "number"
},
"leading": {
"type": "boolean"
},
"trailing": {
"type": "boolean"
}
},
"additionalProperties": false
},
"trackConfig": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"TestIdBuilder": {
"type": "object",
"properties": {
"testId": {
"type": "string"
}
},
"additionalProperties": false
},
"SchemaRemark": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"label": {
"type": "string"
},
"icon": {
"$ref": "#/definitions/SchemaIcon"
},
"tooltipClassName": {
"$ref": "#/definitions/SchemaClassName"
},
"trigger": {
"type": "array",
"items": {
"type": "string",
"enum": [
"click",
"hover",
"focus"
]
},
"description": "触发规则"
},
"title": {
"type": "string",
"description": "提示标题"
},
"content": {
"$ref": "#/definitions/SchemaTpl",
"description": "提示内容"
},
"placement": {
"type": "string",
"enum": [
"top",
"right",
"bottom",
"left"
],
"description": "显示位置"
},
"rootClose": {
"type": "boolean",
"description": "点击其他内容时是否关闭弹框信息"
},
"shape": {
"type": "string",
"enum": [
"circle",
"square"
],
"description": "icon的形状"
},
"testid": {
"type": "string"
},
"$$id": {
"type": "string",
"description": "组件唯一 id,主要用于页面设计器中定位 json 节点"
},
"className": {
"$ref": "#/definitions/SchemaClassName",
"description": "容器 css 类名"
},
"$ref": {
"type": "string",
"description": "配合 definitions 一起使用,可以实现无限循环的渲染器。"
},
"disabled": {
"type": "boolean",
"description": "是否禁用"
},
"disabledOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否禁用表达式"
},
"hidden": {
"type": "boolean",
"description": "是否隐藏"
},
"hiddenOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否隐藏表达式"
},
"visible": {
"type": "boolean",
"description": "是否显示"
},
"visibleOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否显示表达式"
},
"id": {
"type": "string",
"description": "组件唯一 id,主要用于日志采集"
},
"onEvent": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"weight": {
"type": "number"
},
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/ListenerAction"
}
},
"debounce": {
"$ref": "#/definitions/debounceConfig"
},
"track": {
"$ref": "#/definitions/trackConfig"
}
},
"required": [
"actions"
],
"additionalProperties": false
},
"description": "事件动作配置"
},
"static": {
"type": "boolean",
"description": "是否静态展示"
},
"staticOn": {
"$ref": "#/definitions/SchemaExpression",
"description": "是否静态展示表达式"
},
"staticPlaceholder": {
"type": "string",
"description": "静态展示空值占位"
},
"staticClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项类名"
},
"staticLabelClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项Label类名"
},
"staticInputClassName": {
"$ref": "#/definitions/SchemaClassName",
"description": "静态展示表单项Value类名"
},
"staticSchema": {},
"style": {
"type": "object",
"description": "组件样式"
},
"editorSetting": {
"type": "object",
"properties": {
"behavior": {
"type": "string",
"description": "组件行为、用途,如 create、update、remove"
},
"displayName": {
"type": "string",
"description": "组件名称,通常是业务名称方便定位"
},
"mock": {
"description": "编辑器假数据,方便展示"
}
},
"description": "编辑器配置,运行时可以忽略"
},
"useMobileUI": {
"type": "boolean",
"description": "可以组件级别用来关闭移动端样式"
},
"testIdBuilder": {
"$ref": "#/definitions/TestIdBuilder"
}
},
"required": [
"content"
],
"additionalProperties": false
}
]
},
"SchemaIcon": {
"type": "string",
"description": "iconfont 里面的类名。"
},
"SchemaTpl": {
"type": "string",
"description": "支持两种语法,但是不能混着用。分别是:\n\n1. `${xxx}` 或者 `${xxx|upperCase}` 2. `<%= data.xxx %>`\n\n\n更多文档:https://aisuda.bce.baidu.com/amis/zh-CN/docs/concepts/template"
},
"SchemaCollection": {
"anyOf": [
{
"$ref": "#/definitions/SchemaObject"
},
{
"$ref": "#/definitions/SchemaTpl"
},
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/SchemaObject"
},
{
"$ref": "#/definitions/SchemaTpl"
}
]
}
}
]
},
"SchemaObject": {
"allOf": [
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "page",
"description": "指定为 page 渲染器。"
}
}
},
"then": {
"$ref": "#/definitions/PageSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "flex",
"description": "指定为 flex 展示类型"
}
}
},
"then": {
"$ref": "#/definitions/FlexSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"tpl",
"html"
],
"description": "指定为模板渲染器。\n\n文档:https://aisuda.bce.baidu.com/amis/zh-CN/docs/concepts/template"
}
}
},
"then": {
"$ref": "#/definitions/TplSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "remark",
"description": "指定为提示类型"
}
}
},
"then": {
"$ref": "#/definitions/RemarkSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "ajax",
"description": "指定为发送 ajax 的行为。"
}
}
},
"then": {
"$ref": "#/definitions/AjaxActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "url",
"description": "指定为打开链接"
}
}
},
"then": {
"$ref": "#/definitions/UrlActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "link",
"description": "指定为打开链接行为,跟 url 不同的时这个行为为单页模式。"
}
}
},
"then": {
"$ref": "#/definitions/LinkActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "dialog",
"description": "指定为打开弹窗"
}
}
},
"then": {
"$ref": "#/definitions/DialogActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "drawer",
"description": "指定为打开弹窗,抽出式弹窗"
}
}
},
"then": {
"$ref": "#/definitions/DrawerActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "toast",
"description": "指定为打开弹窗,抽出式弹窗"
}
}
},
"then": {
"$ref": "#/definitions/ToastActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "copy",
"description": "指定为复制内容行为"
}
}
},
"then": {
"$ref": "#/definitions/CopyActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "reload",
"description": "指定为刷新目标组件。"
}
}
},
"then": {
"$ref": "#/definitions/ReloadActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"const": "email",
"description": "指定为打开邮箱行为"
}
}
},
"then": {
"$ref": "#/definitions/EmailActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
},
"actionType": {
"type": "string",
"enum": [
"prev",
"next",
"cancel",
"close",
"submit",
"confirm",
"add",
"reset",
"reset-and-submit"
]
}
}
},
"then": {
"$ref": "#/definitions/OtherActionSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"button",
"submit",
"reset"
],
"description": "指定按钮类型,支持 button、submit或者reset三种类型。"
}
}
},
"then": {
"$ref": "#/definitions/VanillaAction"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "alert",
"description": "指定为提示框类型"
}
}
},
"then": {
"$ref": "#/definitions/AlertSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "audio",
"description": "指定为音频播放器"
}
}
},
"then": {
"$ref": "#/definitions/AudioSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "avatar"
}
}
},
"then": {
"$ref": "#/definitions/AvatarSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "button-group",
"description": "指定为提交按钮类型"
}
}
},
"then": {
"$ref": "#/definitions/ButtonGroupSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "button-toolbar",
"description": "指定为按钮工具集合类型"
}
}
},
"then": {
"$ref": "#/definitions/ButtonToolbarSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "calendar",
"description": "指定为日历选择控件"
}
}
},
"then": {
"$ref": "#/definitions/CalendarSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "card",
"description": "指定为 card 类型"
}
}
},
"then": {
"$ref": "#/definitions/CardSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "cards",
"description": "指定为 cards 类型"
}
}
},
"then": {
"$ref": "#/definitions/CardsSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "carousel",
"description": "指定为轮播图类型"
},
"thumbMode": {
"type": "string",
"enum": [
"contain",
"cover"
],
"description": "预览图模式"
}
}
},
"then": {
"$ref": "#/definitions/CarouselSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "chart",
"description": "指定为 chart 类型"
}
}
},
"then": {
"$ref": "#/definitions/ChartSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "collapse",
"description": "指定为折叠器类型"
}
}
},
"then": {
"$ref": "#/definitions/CollapseSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "collapse-group",
"description": "指定为折叠器类型"
}
}
},
"then": {
"$ref": "#/definitions/CollapseGroupSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "color",
"description": "指定为颜色显示控件"
}
}
},
"then": {
"$ref": "#/definitions/ColorSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "container",
"description": "指定为 container 类型"
}
}
},
"then": {
"$ref": "#/definitions/ContainerSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "switch-container",
"description": "指定为 container 类型"
}
}
},
"then": {
"$ref": "#/definitions/SwitchContainerSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "cards"
},
"type": {
"type": "string",
"const": "crud",
"description": "指定为 CRUD 渲染器。"
}
}
},
"then": {
"$ref": "#/definitions/CRUDCardsSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "list"
},
"type": {
"type": "string",
"const": "crud",
"description": "指定为 CRUD 渲染器。"
}
}
},
"then": {
"$ref": "#/definitions/CRUDListSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "table"
},
"type": {
"type": "string",
"const": "crud",
"description": "指定为 CRUD 渲染器。"
}
}
},
"then": {
"$ref": "#/definitions/CRUDTableSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "cards"
},
"type": {
"type": "string",
"const": "crud2",
"description": "指定为 CRUD2 渲染器。"
},
"loadType": {
"type": "string",
"enum": [
"more",
"pagination"
],
"description": "数据展示模式 无限加载 or 分页"
}
}
},
"then": {
"$ref": "#/definitions/CRUD2CardsSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "list"
},
"type": {
"type": "string",
"const": "crud2",
"description": "指定为 CRUD2 渲染器。"
},
"loadType": {
"type": "string",
"enum": [
"more",
"pagination"
],
"description": "数据展示模式 无限加载 or 分页"
}
}
},
"then": {
"$ref": "#/definitions/CRUD2ListSchema"
}
},
{
"if": {
"properties": {
"mode": {
"type": "string",
"description": "指定内容区的展示模式。",
"const": "table2"
},
"type": {
"type": "string",
"const": "crud2",
"description": "指定为 CRUD2 渲染器。"
},
"loadType": {
"type": "string",
"enum": [
"more",
"pagination"
],
"description": "数据展示模式 无限加载 or 分页"
}
}
},
"then": {
"$ref": "#/definitions/CRUD2TableSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"date",
"datetime",
"time",
"static-date",
"static-datetime",
"static-time"
],
"description": "指定为日期展示类型"
}
}
},
"then": {
"$ref": "#/definitions/DateSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "dialog"
},
"dialogType": {
"type": "string",
"const": "confirm",
"description": "弹框类型 confirm 确认弹框"
}
}
},
"then": {
"$ref": "#/definitions/DialogSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "divider"
}
}
},
"then": {
"$ref": "#/definitions/DividerSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "drawer"
}
}
},
"then": {
"$ref": "#/definitions/DrawerSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "dropdown-button",
"description": "指定为 DropDown Button 类型"
}
}
},
"then": {
"$ref": "#/definitions/DropdownButtonSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "each",
"description": "指定为each展示类型"
}
}
},
"then": {
"$ref": "#/definitions/EachSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "grid",
"description": "指定为 Grid 格子布局渲染器。"
}
}
},
"then": {
"$ref": "#/definitions/GridSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "grid-2d",
"description": "指定为 grid-2d 展示类型"
}
}
},
"then": {
"$ref": "#/definitions/Grid2DSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "hbox",
"description": "指定为each展示类型"
},
"subFormMode": {
"type": "string",
"enum": [
"normal",
"inline",
"horizontal"
],
"description": "配置子表单项默认的展示方式。"
}
}
},
"then": {
"$ref": "#/definitions/HBoxSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "icon"
}
}
},
"then": {
"$ref": "#/definitions/IconSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "iframe"
}
}
},
"then": {
"$ref": "#/definitions/IFrameSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"image",
"static-image"
],
"description": "指定为图片展示类型"
},
"imageMode": {
"type": "string",
"enum": [
"thumb",
"original"
],
"description": "图片展示模式,默认为缩略图模式、可以配置成原图模式"
},
"thumbMode": {
"type": "string",
"enum": [
"w-full",
"h-full",
"contain",
"cover"
],
"description": "预览图模式"
},
"hoverMode": {
"type": "string",
"enum": [
"hover-slide",
"pull-top",
"scale-center",
"scale-top",
"text-style-1",
"text-style-2",
"text-style-3",
"text-style-4",
"text-style-5",
"text-style-6",
"text-style-7"
],
"description": "鼠标悬浮时的展示状态(对应AIpage的文字6,9,10不存在)"
}
}
},
"then": {
"$ref": "#/definitions/ImageSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"images",
"static-images"
],
"description": "指定为图片集渲染器"
},
"thumbMode": {
"type": "string",
"enum": [
"w-full",
"h-full",
"contain",
"cover"
],
"description": "预览图模式"
},
"displayMode": {
"type": "string",
"enum": [
"thumb",
"full"
],
"description": "展示模式,支持缩略图模式(thumb)和大图模式(full)"
},
"fullThumbMode": {
"type": "string",
"enum": [
"cover",
"contain"
],
"description": "大图模式下的缩放模式"
},
"sortType": {
"type": "string",
"enum": [
"sm-ss-sss-m",
"sss-ss-ms-m",
"sms-ss-sms-m",
"sm-ss-sss-ss",
"ms-ss-sss-ss",
"sss-ss-sm-ss",
"mss-ss-ssm-ss",
"sss-ss-mm-ss",
"even-${number}-${number}"
],
"description": "排列方式 类命名方式按照上右下左四个边命名,l=2m,m=2s,最小单位为s 每条边的顺序都是从上到下,从左到右。"
},
"hoverMode": {
"type": "string",
"enum": [
"hover-slide",
"pull-top",
"scale-center",
"scale-top",
"text-style-1",
"text-style-2",
"text-style-3",
"text-style-4",
"text-style-5",
"text-style-6",
"text-style-7"
],
"description": "鼠标悬浮时的展示状态(对应AIpage的文字6,9,10不存在)"
}
}
},
"then": {
"$ref": "#/definitions/ImagesSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"json",
"static-json"
],
"description": "指定为Json展示类型"
}
}
},
"then": {
"$ref": "#/definitions/JsonSchema"
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"const": "link",
"description": "指定为 link 链接展示控件"
}
}
},
"then": {
"$ref": "#/definitions/LinkSchema"
}
},
{
"if": {
"properties": {
"type": {