2016-03-31 09:40:55 +08:00
|
|
|
|
---
|
|
|
|
|
order: 0
|
|
|
|
|
title: Input 输入框
|
|
|
|
|
---
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
2016-04-08 09:33:09 +08:00
|
|
|
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),具体使用详见 [API](/components/form/#input)。
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
|
|
|
|
注意: 在表单里面,我们只使用**大尺寸**, 即高度为 **32px**,作为唯一的尺寸。
|
|
|
|
|
|
|
|
|
|
````jsx
|
2016-05-19 14:43:10 +08:00
|
|
|
|
import { Input } from 'antd';
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-05-19 14:43:10 +08:00
|
|
|
|
<div className="example-input">
|
|
|
|
|
<Input size="large" placeholder="大尺寸" />
|
|
|
|
|
<Input placeholder="默认尺寸" />
|
|
|
|
|
<Input size="small" placeholder="小尺寸" />
|
|
|
|
|
</div>
|
2015-12-29 12:08:58 +08:00
|
|
|
|
, mountNode);
|
2015-10-29 08:41:51 +08:00
|
|
|
|
````
|
2016-05-19 14:43:10 +08:00
|
|
|
|
|
|
|
|
|
````css
|
|
|
|
|
.example-input .ant-input {
|
|
|
|
|
width: 140px;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
````
|