ant-design/components/tabs/demo/icon.md

27 lines
568 B
Markdown
Raw Normal View History

2015-06-15 16:11:28 +08:00
# 图标
- order: 2
2015-06-17 20:28:02 +08:00
有图标的标签。
2015-06-15 16:11:28 +08:00
---
````jsx
import { Tabs, Icon } from 'antd';
const TabPane = Tabs.TabPane;
2015-06-15 16:11:28 +08:00
const tabContent = [
2015-10-02 16:34:37 +08:00
<span><Icon type="apple" />选项卡一</span>,
<span><Icon type="android" />选项卡二</span>,
<span><Icon type="lock" />选项卡三</span>,
2015-06-19 15:45:40 +08:00
];
2015-06-15 16:11:28 +08:00
2015-10-20 16:47:55 +08:00
ReactDOM.render(
2015-08-06 16:47:01 +08:00
<Tabs defaultActiveKey="2">
2015-06-15 16:11:28 +08:00
<TabPane tab={tabContent[0]} key="1">选项卡一</TabPane>
2015-08-06 16:47:01 +08:00
<TabPane tab={tabContent[1]} key="2">选项卡二</TabPane>
<TabPane tab={tabContent[2]} key="3">选项卡三</TabPane>
2015-06-15 19:56:58 +08:00
</Tabs>
, mountNode);
2015-06-15 16:11:28 +08:00
````