mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-08 04:18:23 +08:00
26 lines
573 B
Markdown
26 lines
573 B
Markdown
---
|
|
order: 2
|
|
title: 图标
|
|
---
|
|
|
|
有图标的标签。
|
|
|
|
````jsx
|
|
import { Tabs, Icon } from 'antd';
|
|
const TabPane = Tabs.TabPane;
|
|
|
|
const tabContent = [
|
|
<span><Icon type="apple" />选项卡一</span>,
|
|
<span><Icon type="android" />选项卡二</span>,
|
|
<span><Icon type="lock" />选项卡三</span>,
|
|
];
|
|
|
|
ReactDOM.render(
|
|
<Tabs defaultActiveKey="2">
|
|
<TabPane tab={tabContent[0]} key="1">选项卡一</TabPane>
|
|
<TabPane tab={tabContent[1]} key="2">选项卡二</TabPane>
|
|
<TabPane tab={tabContent[2]} key="3">选项卡三</TabPane>
|
|
</Tabs>
|
|
, mountNode);
|
|
````
|