2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-05-25 18:21:27 +08:00
|
|
|
order: 1
|
2017-09-27 22:32:49 +08:00
|
|
|
title:
|
2019-01-25 11:06:05 +08:00
|
|
|
zh-CN: 三种大小
|
|
|
|
en-US: Three sizes of Input
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2016-08-22 09:53:39 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),高度分别为 `40px`、`32px` 和 `24px`。
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2016-08-22 09:53:39 +08:00
|
|
|
## en-US
|
|
|
|
|
2019-02-06 20:51:46 +08:00
|
|
|
There are three sizes of an Input box: `large` (40px), `default` (32px) and `small` (24px).
|
2016-08-22 09:53:39 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2016-05-19 14:43:10 +08:00
|
|
|
import { Input } from 'antd';
|
2020-02-09 11:57:42 +08:00
|
|
|
import { UserOutlined } from '@ant-design/icons';
|
2015-10-29 08:41:51 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
2016-05-19 14:43:10 +08:00
|
|
|
<div className="example-input">
|
2020-02-09 11:57:42 +08:00
|
|
|
<Input size="large" placeholder="large size" prefix={<UserOutlined />} />
|
|
|
|
<Input placeholder="default size" prefix={<UserOutlined />} />
|
|
|
|
<Input size="small" placeholder="small size" prefix={<UserOutlined />} />
|
|
|
|
<Input.Password size="large" placeholder="large Password" />
|
2018-06-27 15:55:04 +08:00
|
|
|
</div>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|
2016-05-19 14:43:10 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```css
|
2020-02-09 11:57:42 +08:00
|
|
|
.example-input > span {
|
2016-05-25 18:21:27 +08:00
|
|
|
width: 200px;
|
|
|
|
margin: 0 8px 8px 0;
|
2016-05-19 14:43:10 +08:00
|
|
|
}
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|