mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 16:39:41 +08:00
64b905e9bd
* update icons deps * update all icon ref * fix lint * update snapshot
50 lines
640 B
Markdown
50 lines
640 B
Markdown
---
|
|
order: 2
|
|
title:
|
|
zh-CN: 图标
|
|
en-US: Icon
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
有图标的标签。
|
|
|
|
## en-US
|
|
|
|
The Tab with Icon.
|
|
|
|
```jsx
|
|
import { Tabs } from 'antd';
|
|
import { AppleOutlined, AndroidOutlined } from '@ant-design/icons';
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
ReactDOM.render(
|
|
<Tabs defaultActiveKey="2">
|
|
<TabPane
|
|
tab={
|
|
<span>
|
|
<AppleOutlined />
|
|
Tab 1
|
|
</span>
|
|
}
|
|
key="1"
|
|
>
|
|
Tab 1
|
|
</TabPane>
|
|
<TabPane
|
|
tab={
|
|
<span>
|
|
<AndroidOutlined />
|
|
Tab 2
|
|
</span>
|
|
}
|
|
key="2"
|
|
>
|
|
Tab 2
|
|
</TabPane>
|
|
</Tabs>,
|
|
mountNode,
|
|
);
|
|
```
|