mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:49:57 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
32 lines
574 B
Markdown
32 lines
574 B
Markdown
---
|
|
order: 7
|
|
title:
|
|
zh-CN: 前缀
|
|
en-US: Prefix
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
在输入框上添加前缀图标。
|
|
|
|
## en-US
|
|
|
|
Add a prefix inside input.
|
|
|
|
```jsx
|
|
import { InputNumber } from 'antd';
|
|
import { InfoCircleOutlined, SmileOutlined, UserOutlined } from '@ant-design/icons';
|
|
|
|
export default () => (
|
|
<>
|
|
<InputNumber prefix="¥" style={{ width: '100%' }} />
|
|
<br />
|
|
<br />
|
|
<InputNumber addonBefore={<UserOutlined />} prefix="¥" style={{ width: '100%' }} />
|
|
<br />
|
|
<br />
|
|
<InputNumber prefix="¥" disabled style={{ width: '100%' }} />
|
|
</>
|
|
);
|
|
```
|