mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 15:46:10 +08:00
081604e253
* ⚡ Support Input.Password iconRender close #23778 close #23484 * ✅ fix snapshot
31 lines
519 B
Markdown
31 lines
519 B
Markdown
---
|
|
order: 10
|
|
title:
|
|
zh-CN: 密码框
|
|
en-US: Password box
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
密码框。
|
|
|
|
## en-US
|
|
|
|
Input type of password.
|
|
|
|
```jsx
|
|
import { Input, Space } from 'antd';
|
|
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
|
|
|
|
ReactDOM.render(
|
|
<Space direction="vertical">
|
|
<Input.Password placeholder="input password" />
|
|
<Input.Password
|
|
placeholder="input password"
|
|
iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}
|
|
/>
|
|
</Space>,
|
|
mountNode,
|
|
);
|
|
```
|