mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 17:09:46 +08:00
6a7acfbf6e
* feat: inputNumber support status * test: fix test * feat: custom status first * refactor: getMergedStatus pass status in params
26 lines
526 B
Markdown
26 lines
526 B
Markdown
---
|
|
order: 99
|
|
debug: true
|
|
title:
|
|
zh-CN: 图标按钮
|
|
en-US: Icon
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
可以扩展 `controls` 属性用以设置自定义图标。
|
|
|
|
## en-US
|
|
|
|
When you need to use a custom `Icon`, you can set the `Icon` component as the property value of `upIcon` and `downIcon`.
|
|
|
|
```jsx
|
|
import { InputNumber } from 'antd';
|
|
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
|
|
|
ReactDOM.render(
|
|
<InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} />,
|
|
mountNode,
|
|
);
|
|
```
|