提交 b2b0fb90 编写于 作者: WangMoYang's avatar WangMoYang

docs: 更新配置说明

上级 69af5e2e
## 简介 ## 简介
为了支持**组件加密**功能,**自定义组件**提供了一个**JSON配置文件**,用于配置组件的各项属性。 为了支持**组件加密**功能,**自定义组件**提供了一个**JSON配置文件**,用于配置组件的各项属性。
* json配置文件需要在组件同级目录下,与组件文件名一致,后缀为`.easycom.json`
* 例: 组件文件名为:`button.vue`,json配置文件名就是:`button.easycom.json`
## 配置文件结构 ## 配置文件结构
```JSON ```JSON
{ {
"name": "Test", "name": "Test",
"description": { "description": {
"value": "测试", "value": "测试",
"kind": "markdown"
},
"attributes": [
{
"name": "color",
"description": {
"value": "颜色",
"kind": "markdown" "kind": "markdown"
}, },
"attributes": [ "type": "string",
{ "values": [
"name": "color",
"description": {
"value": "颜色",
"kind": "markdown"
},
"type": "string",
"values": [
{
"name": "red",
"description": "红色"
}
]
},
{ {
"name": "[event]event", "name": "red",
"description": { "description": "红色"
"value": "测试用事件",
"kind": "markdown"
},
"type": "(event: UniEvent) => void"
} }
], ]
"example": "例子", },
"tutorial": "教程", {
"name": "[event]event",
"description": {
"value": "测试用事件",
"kind": "markdown"
},
"type": "(event: UniEvent) => void"
}
],
"example": "例子",
"tutorial": "教程",
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册