@@ -49,16 +49,11 @@ DefaultButton(default-btn),可以通过两种方式引入:
49
49
...
50
50
```
51
51
52
- 支持属性:
53
-
54
- * ` outline `
55
-
56
- 设置该属性后,其背景颜色将变成透明
57
- * ` size `
58
-
52
+ ** props:**
53
+ * ` outline ` : {boolean} - 设置该属性后,其背景颜色将变成透明
54
+ * ` size ` : {string}
59
55
- ` small ` - 小按钮(inline-block)
60
-
61
- * ` disabled ` - 设置该属性后,其按钮变灰
56
+ * ` disabled ` : {boolean} - 设置该属性后,其按钮变灰
62
57
63
58
64
59
### Cell
@@ -91,10 +86,10 @@ import { Cell } from "weui-react-component";
91
86
...
92
87
< Cell> 这是一个说明< / Cell>
93
88
```
89
+ ** props:**
94
90
95
- * ` header `
96
-
97
- * ` footer `
91
+ * ` header ` : {string | ReactElement}
92
+ * ` footer ` : {string | ReactElement}
98
93
99
94
100
95
#### Link 组件
@@ -108,9 +103,9 @@ import { Link } from "weui-react-component";
108
103
```
109
104
like as ` <a href="...">这是一个链接</a> `
110
105
111
- * ` header `
106
+ * ` header ` : {string | ReactElement}
112
107
113
- * ` footer `
108
+ * ` footer ` : {string | ReactElement}
114
109
115
110
116
111
#### Input 组件
@@ -124,7 +119,9 @@ import { Input } from "weui-react-component";
124
119
```
125
120
like as ` <label>Description</label><input type="text"> `
126
121
127
- * ` label `
122
+ ** props:**
123
+
124
+ * ` label ` : {string}
128
125
129
126
130
127
#### Checkbox 组件
@@ -138,11 +135,11 @@ import { Checkbox } from "weui-react-component";
138
135
```
139
136
like as ` <label>Description></label><input type="checkbox"> `
140
137
141
- * ` label `
142
-
143
- * ` checked `
138
+ ** props:**
144
139
145
- * ` defaultChecked `
140
+ * ` label ` : {string}
141
+ * ` checked ` : {boolean}
142
+ * ` defaultChecked ` : {boolean}
146
143
147
144
#### Radio 组件
148
145
@@ -175,9 +172,10 @@ like as
175
172
</select >
176
173
```
177
174
178
- * ` header `
175
+ ** props **
179
176
180
- * ` label `
177
+ * ` header ` : {string | ReactElement}
178
+ * ` label ` : {string}
181
179
182
180
183
181
#### Switch 组件
@@ -190,9 +188,10 @@ import { Switch } from "weui-react-component";
190
188
...
191
189
```
192
190
193
- * ` checked `
191
+ ** props: **
194
192
195
- * ` defaultChecked `
193
+ * ` checked ` : {boolean}
194
+ * ` defaultChecked ` : {boolean}
196
195
197
196
198
197
#### Textarea 组件
@@ -205,7 +204,9 @@ import { Textarea } from "weui-react-component";
205
204
...
206
205
```
207
206
208
- * ` value `
207
+ ** props:**
208
+
209
+ * ` value ` : {string}
209
210
210
211
211
212
@@ -231,7 +232,9 @@ import { Toast } from "weui-react-component";
231
232
< Toast icon= {... }> 已完成< / Toast>
232
233
```
233
234
234
- * ` open `
235
+ ** props:**
236
+
237
+ * ` open ` : {boolean}
235
238
236
239
237
240
#### Loading 组件
@@ -244,7 +247,9 @@ import { Loading } from "weui-react-component";
244
247
...
245
248
```
246
249
247
- * ` open `
250
+ ** props:**
251
+
252
+ * ` open ` : {boolean}
248
253
249
254
250
255
### Dialog
@@ -259,11 +264,11 @@ import { Alert } from "weui-react-component";
259
264
...
260
265
```
261
266
262
- * ` title `
263
-
264
- * ` open `
267
+ ** props:**
265
268
266
- * ` onConfirm `
269
+ * ` title ` : {string}
270
+ * ` open ` : {boolean}
271
+ * ` onConfirm ` : {Function}
267
272
268
273
269
274
@@ -276,13 +281,13 @@ import { Confirm } from "weui-react-component";
276
281
< Confirm title= " 这是标题" onConfirm= {... } onCancel= {... }> 内容... < / Confirm>
277
282
...
278
283
```
279
- * ` title `
280
284
281
- * ` open `
285
+ ** props **
282
286
283
- * ` onConfirm `
284
-
285
- * ` onCancel `
287
+ * ` title ` : {string}
288
+ * ` open ` : {boolean}
289
+ * ` onConfirm ` : {Function}
290
+ * ` onCancel ` : {Function}
286
291
287
292
288
293
### Progress
@@ -295,13 +300,12 @@ import { Progress } from "weui-react-component";
295
300
...
296
301
```
297
302
298
- * ` value `
299
-
300
- * ` max `
301
-
302
- * ` onCancel `
303
+ ** props:**
303
304
304
- * ` canceled `
305
+ * ` value ` : {number}
306
+ * ` max ` : {number}
307
+ * ` onCancel ` : {Function}
308
+ * ` canceled ` : {boolean}
305
309
306
310
307
311
### Msg Page
@@ -318,15 +322,13 @@ import { Msg } from "weui-react-component";
318
322
...
319
323
```
320
324
321
- * ` title `
325
+ ** props: **
322
326
323
- * ` icon `
324
-
325
- * ` more `
326
-
327
- * ` onConfirm `
328
-
329
- * ` onCancel `
327
+ * ` title ` : {string}
328
+ * ` icon ` : {ReactElement}
329
+ * ` more ` : {string} - URL
330
+ * ` onConfirm ` : {Function}
331
+ * ` onCancel ` : {Function}
330
332
331
333
332
334
### Article
@@ -359,36 +361,30 @@ import { ActionSheet } from "weui-react-component";
359
361
...
360
362
```
361
363
362
- 属性:
364
+ ** props: **
363
365
364
366
* ` items ` : {string[ ] }
365
-
366
- * ` onClick ` : {(): (() => Promise<any >, () => Promise)}
367
-
368
- 有两个参数,两个参数都是返回 Promise 的函数,
369
-
370
- ``` js
371
- onClick = function (getValue , cleanup ) {
372
- getValue ().then (function (val ) {
373
- // val
374
- return cleanup ();
375
- }).then (function () {
376
- // done
377
- });
378
- }
379
- ```
380
-
381
- * ` onCancel ` : {(): () => Promise}
382
-
383
- 有一个参数
384
-
385
- ``` js
386
- onCancel = function (cleanup ) {
387
- cleanup ().then (function () {
388
- // done
389
- });
390
- }
391
- ```
367
+ * ` onClick ` : {` (() => Promise<any>, () => Promise) => void ` }
368
+
369
+ ``` js
370
+ onClick = function (getValue , cleanup ) {
371
+ getValue ().then (function (val ) {
372
+ // val
373
+ return cleanup ();
374
+ }).then (function () {
375
+ // done
376
+ });
377
+ }
378
+ ```
379
+ * ` onCancel ` : {` (() => Promise) => void ` }
380
+
381
+ ``` js
382
+ onCancel = function (cleanup ) {
383
+ cleanup ().then (function () {
384
+ // done
385
+ });
386
+ }
387
+ ```
392
388
393
389
### Icons
394
390
@@ -400,10 +396,10 @@ import { Icon } from "weui-react-component";
400
396
...
401
397
```
402
398
403
- 属性:
399
+ ** props: **
404
400
405
- * ` type ` : { blank, circle, download, info, safe-success, safe-warning,
406
- success, success-circle, success-no-circle, waiting, info-circle, cancle }
401
+ * ` type ` : {string} - one of ( blank, circle, download, info, safe-success, safe-warning,
402
+ success, success-circle, success-no-circle, waiting, info-circle, cancle)
407
403
408
404
409
405
## Develop
0 commit comments