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
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2020-02-09 11:57:42 +08:00
|
|
|
import { UserOutlined } from '@ant-design/icons';
|
2022-05-23 14:37:16 +08:00
|
|
|
import { Input } from 'antd';
|
|
|
|
import React from 'react';
|
2015-10-29 08:41:51 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-04-23 18:11:11 +08:00
|
|
|
<>
|
2020-02-09 11:57:42 +08:00
|
|
|
<Input size="large" placeholder="large size" prefix={<UserOutlined />} />
|
2020-04-23 18:11:11 +08:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-02-09 11:57:42 +08:00
|
|
|
<Input placeholder="default size" prefix={<UserOutlined />} />
|
2020-04-23 18:11:11 +08:00
|
|
|
<br />
|
|
|
|
<br />
|
2020-02-09 11:57:42 +08:00
|
|
|
<Input size="small" placeholder="small size" prefix={<UserOutlined />} />
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|