1 | ## Input 组件的使用
|
2 |
|
3 | ```jsx
|
4 | import { Input } from 'dh-c';
|
5 | <Input placeholder="请输入正常文字"/>
|
6 | <Input.Number placeholder="请输入正常数字"/>
|
7 | ```
|
8 |
|
9 | ### 文字输入框
|
10 |
|
11 | | props | 说明 | 参数类型 | 默认值|
|
12 | | ------| ------ | ------ |
|
13 | | width | 输入框宽度 | number或string | 无|
|
14 | | placeholder | 提示信息 | string | 无 |
|
15 | | name | 字段名字 | string | 无 |
|
16 | | defaultValue | 默认值 | number | 无 |
|
17 | | value | 输入框的值 | number或 string | 无 |
|
18 | | addonBefore | 前置元素 | element | 无 |
|
19 | | addonAfter | 后置元素 | element | 无 |
|
20 | | searched | 搜索框 | bool | 无 |
|
21 | | danger | 危险输入框 | bool | 无 |
|
22 | | onChange | 输入内容改变的回调function(current, e)| function |无 |
|
23 | | onBlur| 鼠标离开的回调function(current, e)| function |无 |
|
24 |
|
25 | ### 数字输入框
|
26 |
|
27 | | props | 说明 | 参数类型 | 默认值
|
28 | | ------| ------ | ------ |
|
29 | | width | 输入框宽度 | number或string | 无
|
30 | | placeholder | 提示信息 | string | 无
|
31 | | name | 字段名字 | string | 无
|
32 | | defaultValue | 默认值 | number | 无
|
33 | | value | 输入框的值 | number或 string | 无
|
34 | | min | 最小值 | number | 无
|
35 | | step | 每次增加数量 | number 或 string | 1
|
36 | | searched | 搜索框 | bool | 无
|
37 | | danger | 危险输入框 | bool | 无
|
38 | | onChange | 输入内容改变的回调function(current, e)| function |无
|