order | title | ||||
---|---|---|---|---|---|
7 |
|
给 Segmented Item 设置 Icon。
Set icon
for Segmented Item.
import { Segmented } from 'antd';
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
const Demo = () => (
<Segmented
options={[
{
label: 'List',
value: 'List',
icon: <BarsOutlined />,
},
{
label: 'Kanban',
value: 'Kanban',
icon: <AppstoreOutlined />,
},
]}
/>
);
export default Demo;