|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- {
- "$schema": "http://json-schema.org/draft-04/schema",
- "description": "微信小程序 自定义组件 的 schema",
- "type": "object",
- "required": ["component"],
-
- "properties": {
- "component": {
- "type": "boolean",
- "default": true
- },
- "usingComponents": {
- "type": "object"
- },
- "minapp": {
- "type": "object",
- "properties": {
- "component": {
- "type": "object",
- "description": "关于此组件的文档",
- "properties": {
- "docLink": {
- "type": "string",
- "description": "线上文档链接"
- },
- "desc": {
- "type": "array",
- "description": "组件的描述,支持 markdown 语法",
- "items": {
- "type": "string"
- }
- },
- "attrs": {
- "type": "array",
- "description": "组件属性列表",
- "items": {
- "$ref": "#/definitions/attr"
- }
- }
- }
- }
- }
- }
- },
- "definitions": {
- "attr": {
- "required": ["name", "type"],
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "属性名字"
- },
- "type": {
- "type": "object",
- "description": "属性类型",
- "required": ["name"],
- "default": {"name": "string"},
- "properties": {
- "name": {
- "type": "string"
- }
- }
- },
- "desc": {
- "type": "array",
- "description": "属性的描述,支持 markdown 语法",
- "items": {
- "type": "string"
- }
- },
- "required": {
- "type": "boolean",
- "description": "是否必填"
- },
- "defaultValue": {
- "description": "属性默认值"
- }
- }
- }
- }
- }
-
|