mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 11:28:30 +08:00
96 lines
3.7 KiB
JSON
96 lines
3.7 KiB
JSON
|
{
|
|||
|
"$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 格式说明,可忽略!"
|
|||
|
},
|
|||
|
"type": {
|
|||
|
"description": "指定为 TPL 类型的渲染器",
|
|||
|
"enum": [
|
|||
|
"tpl",
|
|||
|
"html"
|
|||
|
],
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
},
|
|||
|
"required": [
|
|||
|
"type"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"definitions": {
|
|||
|
"common": {
|
|||
|
"description": "AMis Tpl 渲染器格式说明。https://baidu.github.io/amis/docs/renderers#tpl",
|
|||
|
"properties": {
|
|||
|
"$ref": {
|
|||
|
"$ref": "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 格式说明"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"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"
|
|||
|
}
|