2016-03-31 09:40:55 +08:00
|
|
|
|
---
|
|
|
|
|
order: 0
|
|
|
|
|
title: Input 输入框
|
|
|
|
|
---
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
2016-03-31 09:40:55 +08:00
|
|
|
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),具体使用详见 <a href="/components/form/#input">API</a>。
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
|
|
|
|
注意: 在表单里面,我们只使用**大尺寸**, 即高度为 **32px**,作为唯一的尺寸。
|
|
|
|
|
|
|
|
|
|
````jsx
|
2016-01-27 16:44:50 +08:00
|
|
|
|
import { Row, Col, Input } from 'antd';
|
2015-10-29 08:41:51 +08:00
|
|
|
|
const InputGroup = Input.Group;
|
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
|
<Row>
|
|
|
|
|
<InputGroup>
|
|
|
|
|
<Col span="6">
|
|
|
|
|
<Input id="largeInput" size="large" placeholder="大尺寸" />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span="6">
|
|
|
|
|
<Input id="defaultInput" placeholder="默认尺寸" />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span="6">
|
|
|
|
|
<Input id="smallInput" placeholder="小尺寸" size="small" />
|
|
|
|
|
</Col>
|
|
|
|
|
</InputGroup>
|
|
|
|
|
</Row>
|
2015-12-29 12:08:58 +08:00
|
|
|
|
, mountNode);
|
2015-10-29 08:41:51 +08:00
|
|
|
|
````
|