2022-02-09 18:06:36 +08:00
|
|
|
---
|
|
|
|
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`.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2022-05-23 14:37:16 +08:00
|
|
|
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
|
2022-02-09 18:06:36 +08:00
|
|
|
import { InputNumber } from 'antd';
|
2022-05-23 14:37:16 +08:00
|
|
|
import React from 'react';
|
2022-02-09 18:06:36 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2022-04-03 23:27:45 +08:00
|
|
|
<InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} />
|
2022-02-16 11:48:24 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2022-02-09 18:06:36 +08:00
|
|
|
```
|