2020-05-27 14:57:40 +08:00
|
|
|
|
{
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"$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 格式说明,可忽略!"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"type": {
|
|
|
|
|
"description": "指定为 TPL 类型的渲染器",
|
|
|
|
|
"enum": ["tpl", "html"],
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
},
|
|
|
|
|
"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": "引用页面中的定义"
|
|
|
|
|
},
|
|
|
|
|
"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"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"text": {
|
|
|
|
|
"description": "不支持 html 标签。",
|
|
|
|
|
"title": "文本",
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
|
|
|
|
"tpl": {
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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 格式说明"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"test": {
|
|
|
|
|
"properties": {
|
|
|
|
|
"type": {
|
|
|
|
|
"description": "指定为 TPL 类型的渲染器",
|
|
|
|
|
"enum": ["tpl", "html"],
|
|
|
|
|
"type": "string"
|
2020-05-27 14:57:40 +08:00
|
|
|
|
}
|
2020-08-21 15:28:22 +08:00
|
|
|
|
}
|
2020-05-27 14:57:40 +08:00
|
|
|
|
},
|
2020-08-21 15:28:22 +08:00
|
|
|
|
"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"
|
|
|
|
|
}
|