UNPKG

13.7 kBJSONView Raw
1{
2 "name": "Radio",
3 "props": {
4 "className": {
5 "type": {
6 "name": "string"
7 },
8 "required": false,
9 "description": "自定义类名",
10 "docblock": "自定义类名"
11 },
12 "id": {
13 "type": {
14 "name": "string"
15 },
16 "required": false,
17 "description": "组件input的id",
18 "docblock": "组件input的id"
19 },
20 "style": {
21 "type": {
22 "name": "object"
23 },
24 "required": false,
25 "description": "自定义内敛样式",
26 "docblock": "自定义内敛样式",
27 "properties": []
28 },
29 "checked": {
30 "type": {
31 "name": "bool"
32 },
33 "required": false,
34 "description": "设置radio是否选中",
35 "docblock": "设置radio是否选中"
36 },
37 "defaultChecked": {
38 "type": {
39 "name": "bool"
40 },
41 "required": false,
42 "description": "设置radio是否默认选中",
43 "docblock": "设置radio是否默认选中"
44 },
45 "label": {
46 "type": {
47 "name": "node"
48 },
49 "required": false,
50 "description": "通过属性配置label",
51 "docblock": "通过属性配置label"
52 },
53 "onChange": {
54 "type": {
55 "name": "func"
56 },
57 "required": false,
58 "description": "状态变化时触发的事件",
59 "defaultValue": {
60 "value": "func.noop",
61 "computed": true
62 },
63 "docblock": "状态变化时触发的事件\n@param {Boolean} checked 是否选中\n@param {Event} e Dom 事件对象",
64 "params": [
65 {
66 "name": "checked",
67 "description": "是否选中",
68 "type": {
69 "name": "Boolean"
70 }
71 },
72 {
73 "name": "e",
74 "description": "Dom 事件对象",
75 "type": {
76 "name": "Event"
77 }
78 }
79 ],
80 "returns": null
81 },
82 "onMouseEnter": {
83 "type": {
84 "name": "func"
85 },
86 "required": false,
87 "description": "鼠标进入enter事件",
88 "defaultValue": {
89 "value": "func.noop",
90 "computed": true
91 },
92 "docblock": "鼠标进入enter事件\n@param {Event} e Dom 事件对象",
93 "params": [
94 {
95 "name": "e",
96 "description": "Dom 事件对象",
97 "type": {
98 "name": "Event"
99 }
100 }
101 ],
102 "returns": null
103 },
104 "onMouseLeave": {
105 "type": {
106 "name": "func"
107 },
108 "required": false,
109 "description": "鼠标离开事件",
110 "defaultValue": {
111 "value": "func.noop",
112 "computed": true
113 },
114 "docblock": "鼠标离开事件\n@param {Event} e Dom 事件对象",
115 "params": [
116 {
117 "name": "e",
118 "description": "Dom 事件对象",
119 "type": {
120 "name": "Event"
121 }
122 }
123 ],
124 "returns": null
125 },
126 "disabled": {
127 "type": {
128 "name": "bool"
129 },
130 "required": false,
131 "description": "radio是否被禁用",
132 "docblock": "radio是否被禁用"
133 },
134 "value": {
135 "type": {
136 "name": "union",
137 "value": [
138 {
139 "name": "string"
140 },
141 {
142 "name": "number"
143 },
144 {
145 "name": "bool"
146 }
147 ]
148 },
149 "required": false,
150 "description": "radio 的value",
151 "docblock": "radio 的value"
152 },
153 "name": {
154 "type": {
155 "name": "string"
156 },
157 "required": false,
158 "description": "name",
159 "docblock": "name"
160 },
161 "isPreview": {
162 "type": {
163 "name": "bool"
164 },
165 "required": false,
166 "description": "是否为预览态",
167 "defaultValue": {
168 "value": "false",
169 "computed": false
170 },
171 "docblock": "是否为预览态"
172 },
173 "renderPreview": {
174 "type": {
175 "name": "func"
176 },
177 "required": false,
178 "description": "预览态模式下渲染的内容",
179 "docblock": "预览态模式下渲染的内容\n@param {Boolean} checked 是否选中\n@param {Object} props 所有传入的参数\n@returns {reactNode} Element 渲染内容",
180 "params": [
181 {
182 "name": "checked",
183 "description": "是否选中",
184 "type": {
185 "name": "Boolean"
186 }
187 },
188 {
189 "name": "props",
190 "description": "所有传入的参数",
191 "type": {
192 "name": "Object"
193 }
194 }
195 ],
196 "returns": {
197 "description": "Element 渲染内容",
198 "type": {
199 "name": "reactNode"
200 }
201 }
202 }
203 },
204 "methods": [],
205 "order": 1,
206 "subComponents": [
207 {
208 "name": "Group",
209 "props": {
210 "prefix": {
211 "type": {
212 "name": "string"
213 },
214 "required": false,
215 "description": "样式类名的品牌前缀",
216 "defaultValue": {
217 "value": "'next-'",
218 "computed": false
219 },
220 "docblock": "样式类名的品牌前缀"
221 },
222 "className": {
223 "type": {
224 "name": "string"
225 },
226 "required": false,
227 "description": "自定义类名",
228 "docblock": "自定义类名"
229 },
230 "style": {
231 "type": {
232 "name": "object"
233 },
234 "required": false,
235 "description": "自定义内敛样式",
236 "docblock": "自定义内敛样式",
237 "properties": []
238 },
239 "name": {
240 "type": {
241 "name": "string"
242 },
243 "required": false,
244 "description": "name",
245 "docblock": "name"
246 },
247 "value": {
248 "type": {
249 "name": "union",
250 "value": [
251 {
252 "name": "string"
253 },
254 {
255 "name": "number"
256 },
257 {
258 "name": "bool"
259 }
260 ]
261 },
262 "required": false,
263 "description": "radio group的选中项的值",
264 "docblock": "radio group的选中项的值"
265 },
266 "defaultValue": {
267 "type": {
268 "name": "union",
269 "value": [
270 {
271 "name": "string"
272 },
273 {
274 "name": "number"
275 },
276 {
277 "name": "bool"
278 }
279 ]
280 },
281 "required": false,
282 "description": "radio group的默认值",
283 "docblock": "radio group的默认值"
284 },
285 "component": {
286 "type": {
287 "name": "union",
288 "value": [
289 {
290 "name": "string"
291 },
292 {
293 "name": "func"
294 }
295 ]
296 },
297 "required": false,
298 "description": "设置标签类型",
299 "defaultValue": {
300 "value": "'div'",
301 "computed": false
302 },
303 "docblock": "设置标签类型"
304 },
305 "onChange": {
306 "type": {
307 "name": "func"
308 },
309 "required": false,
310 "description": "选中值改变时的事件",
311 "defaultValue": {
312 "value": "() => {}",
313 "computed": false
314 },
315 "docblock": "选中值改变时的事件\n@param {String/Number} value 选中项的值\n@param {Event} e Dom 事件对象",
316 "params": [
317 {
318 "name": "value",
319 "description": "选中项的值",
320 "type": {
321 "name": "String/Number"
322 }
323 },
324 {
325 "name": "e",
326 "description": "Dom 事件对象",
327 "type": {
328 "name": "Event"
329 }
330 }
331 ],
332 "returns": null
333 },
334 "disabled": {
335 "type": {
336 "name": "bool"
337 },
338 "required": false,
339 "description": "表示radio被禁用",
340 "docblock": "表示radio被禁用"
341 },
342 "shape": {
343 "type": {
344 "name": "enum",
345 "value": [
346 {
347 "value": "'normal'",
348 "computed": false,
349 "description": "按钮状"
350 },
351 {
352 "value": "'button'",
353 "computed": false
354 }
355 ]
356 },
357 "required": false,
358 "description": "可以设置成 button 展示形状",
359 "docblock": "可以设置成 button 展示形状\n@enumdesc 按钮状",
360 "value": [
361 {
362 "value": "'normal'",
363 "computed": false,
364 "description": "按钮状"
365 },
366 {
367 "value": "'button'",
368 "computed": false
369 }
370 ]
371 },
372 "size": {
373 "type": {
374 "name": "enum",
375 "value": [
376 {
377 "value": "'large'",
378 "computed": false,
379 "description": "大"
380 },
381 {
382 "value": "'medium'",
383 "computed": false,
384 "description": "中"
385 },
386 {
387 "value": "'small'",
388 "computed": false,
389 "description": "小"
390 }
391 ]
392 },
393 "required": false,
394 "description": "与 `shape` 属性配套使用,shape设为button时有效",
395 "defaultValue": {
396 "value": "'medium'",
397 "computed": false
398 },
399 "docblock": "与 `shape` 属性配套使用,shape设为button时有效\n@enumdesc 大, 中, 小",
400 "value": [
401 {
402 "value": "'large'",
403 "computed": false,
404 "description": "大"
405 },
406 {
407 "value": "'medium'",
408 "computed": false,
409 "description": "中"
410 },
411 {
412 "value": "'small'",
413 "computed": false,
414 "description": "小"
415 }
416 ]
417 },
418 "dataSource": {
419 "type": {
420 "name": "union",
421 "value": [
422 {
423 "name": "arrayOf",
424 "value": {
425 "name": "string"
426 }
427 },
428 {
429 "name": "arrayOf",
430 "value": {
431 "name": "object"
432 }
433 }
434 ]
435 },
436 "required": false,
437 "description": "可选项列表, 数据项可为 String 或者 Object, 如 `['apple', 'pear', 'orange']` `[{label: 'apply', value: 'apple'}]`",
438 "defaultValue": {
439 "value": "[]",
440 "computed": false
441 },
442 "docblock": "可选项列表, 数据项可为 String 或者 Object, 如 `['apple', 'pear', 'orange']` `[{label: 'apply', value: 'apple'}]`"
443 },
444 "children": {
445 "type": {
446 "name": "union",
447 "value": [
448 {
449 "name": "arrayOf",
450 "value": {
451 "name": "element"
452 }
453 },
454 {
455 "name": "element"
456 }
457 ]
458 },
459 "required": false,
460 "description": "通过子元素方式设置内部radio",
461 "docblock": "通过子元素方式设置内部radio"
462 },
463 "direction": {
464 "type": {
465 "name": "enum",
466 "value": [
467 {
468 "value": "'hoz'",
469 "computed": false
470 },
471 {
472 "value": "'ver'",
473 "computed": false
474 }
475 ]
476 },
477 "required": false,
478 "description": "子项目的排列方式\n- hoz: 水平排列 (default)\n- ver: 垂直排列",
479 "defaultValue": {
480 "value": "'hoz'",
481 "computed": false
482 },
483 "docblock": "子项目的排列方式\n- hoz: 水平排列 (default)\n- ver: 垂直排列"
484 },
485 "isPreview": {
486 "type": {
487 "name": "bool"
488 },
489 "required": false,
490 "description": "是否为预览态",
491 "defaultValue": {
492 "value": "false",
493 "computed": false
494 },
495 "docblock": "是否为预览态"
496 },
497 "renderPreview": {
498 "type": {
499 "name": "func"
500 },
501 "required": false,
502 "description": "预览态模式下渲染的内容",
503 "docblock": "预览态模式下渲染的内容\n@param {Object} previewed 预览值:{label: \"\", value: \"\"}\n@param {Object} props 所有传入的参数\n@returns {reactNode} Element 渲染内容",
504 "params": [
505 {
506 "name": "previewed",
507 "description": "预览值:{label: \"\", value: \"\"}",
508 "type": {
509 "name": "Object"
510 }
511 },
512 {
513 "name": "props",
514 "description": "所有传入的参数",
515 "type": {
516 "name": "Object"
517 }
518 }
519 ],
520 "returns": {
521 "description": "Element 渲染内容",
522 "type": {
523 "name": "reactNode"
524 }
525 }
526 }
527 },
528 "methods": [],
529 "order": 2
530 }
531 ]
532}
\No newline at end of file