• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "object",
3  "properties": {
4    "name": {
5      "type": "string",
6      "description": "组件名称,如div、list等"
7    },
8    "version": {
9      "type": "array",
10      "description": "该属性的当前的版本",
11      "items": {
12        "type": "object",
13        "properties": {
14          "name": {
15            "type": "string",
16            "description": "版本号例如:V3.0"
17          },
18          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"]
19        },
20        "required": ["name"]
21      }
22    },
23    "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
24    "description": {
25      "type": "array",
26      "items": {
27        "type": "object",
28        "properties": {
29          "name": {
30            "type": "string",
31            "description": "属性的描述文档"
32          },
33          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"]
34        },
35        "required": ["name"]
36      }
37    },
38    "attributes": {
39      "type": "array",
40      "description": "组件的属性信息",
41      "items": {
42        "type": "object",
43        "properties": {
44          "name": {
45            "type": "string",
46            "description": "属性名称"
47          },
48          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
49          "required": {
50            "type": "boolean",
51            "description": "表示属性是否为组件的必填属性"
52          },
53          "description": {
54            "type": "array",
55            "items": {
56              "type": "object",
57              "properties": {
58                "name": {
59                  "type": "string",
60                  "description": "属性的描述文档"
61                },
62                "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"]
63              },
64              "required": ["name"]
65            }
66          },
67          "type": {
68            "type": "string",
69            "description": "属性的类型"
70          },
71          "options": {
72            "type": "array",
73            "description": "本字段非必填,表示属性值的枚举类型,当属性type为'enum'时才生效",
74            "items": {
75              "type": "object",
76              "properties": {
77                "name": {
78                  "type": "string",
79                  "description": "属性值"
80                },
81                "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"]
82              },
83              "required": ["name"]
84            }
85          }
86        },
87        "required": ["name", "required", "description", "type"]
88      }
89    },
90    "events": {
91      "type": "array",
92      "description": "组件支持的事件",
93      "items": {
94        "type": "object",
95        "properties": {
96          "name": {
97            "type": "string",
98            "description": "事件名称"
99          },
100          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
101          "description": {
102            "type": "array",
103            "items": {
104              "type": "object",
105              "properties": {
106                "name": {
107                  "type": "string",
108                  "description": "事件的描述文档"
109                },
110                "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"]
111              }
112            }
113          }
114        },
115        "required": ["name", "description"]
116      }
117    },
118    "supportedSubComponents": {
119      "type": "boolean",
120      "description": "组件是否支持子组件,参数为false表示不支持子组件,为true表示支持子组件。当参数为true并且supportedSubComponentsRestriction为空时,表示支持所以子组件"
121    },
122    "supportedSubComponentsRestriction": {
123      "type": "array",
124      "description": "组件支持的子组件列表",
125      "items": {
126        "type": "object",
127        "properties": {
128          "name": {
129            "type": "string",
130            "description": "支持的子组件名称"
131          },
132          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
133          "level": {
134            "type": "number"
135          }
136        },
137        "required": ["name"]
138      }
139    },
140    "unSupportSubComponentsRestriction": {
141      "type": "array",
142      "description": "组件不支持的子组件列表",
143      "items": {
144        "type": "object",
145        "properties": {
146          "name": {
147            "type": "string",
148            "description": "不支持的子组件名称"
149          },
150          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
151          "level": {
152            "type": "number"
153          }
154        },
155        "required": ["name"]
156      }
157    },
158    "parentComponentsRestriction": {
159      "type": "array",
160      "description": "支持的父组件列表,即只支持列表中的组件作为自己的父组件",
161      "items": {
162        "type": "object",
163        "properties": {
164          "name": {
165            "type": "string",
166            "description": "支持的父组件的组件名称"
167          },
168          "syscap": ["SystemCapability.ArkUI.ArkUI.Full", "SystemCapability.ArkUI.ArkUI.Lite"],
169          "level": {
170            "type": "number",
171            "description": "本字段非必填,取值范围大于等于1,只有标签补齐时需要联想出对应子组件时需要填此字段,如果level为n+1时,level为n的组件有且只有一个(n>1)"
172          }
173        },
174        "required": ["name"]
175      }
176    }
177  },
178  "required": [
179    "name",
180    "version",
181    "description",
182    "attributes",
183    "events",
184    "supportedSubComponents",
185    "supportedSubComponentsRestriction",
186    "unSupportSubComponentsRestriction",
187    "parentComponentsRestriction"
188  ]
189}
190