ant-design/components/input-number/demo/controls.md
2022-05-23 14:37:16 +08:00

573 B

order debug title
99 true
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.

import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons';
import { InputNumber } from 'antd';
import React from 'react';

const App: React.FC = () => (
  <InputNumber controls={{ upIcon: <ArrowUpOutlined />, downIcon: <ArrowDownOutlined /> }} />
);

export default App;