ant-design/components/input/demo/password-input.md

31 lines
519 B
Markdown
Raw Normal View History

2018-11-29 10:03:16 +08:00
---
order: 10
title:
2019-05-07 14:57:32 +08:00
zh-CN: 密码框
en-US: Password box
2018-11-29 10:03:16 +08:00
---
## zh-CN
密码框。
2018-11-29 10:03:16 +08:00
## en-US
Input type of password.
2018-11-29 10:03:16 +08:00
2019-05-07 14:57:32 +08:00
```jsx
import { Input, Space } from 'antd';
import { EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
2018-12-02 17:28:24 +08:00
ReactDOM.render(
<Space direction="vertical">
<Input.Password placeholder="input password" />
<Input.Password
placeholder="input password"
iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}
/>
</Space>,
mountNode,
);
2019-05-07 14:57:32 +08:00
```