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
|
2015-06-15 19:56:58 +08:00
|
|
|
var Tabs = antd.Tabs;
|
|
|
|
var TabPane = Tabs.TabPane;
|
2015-06-15 16:11:28 +08:00
|
|
|
|
2015-06-17 20:28:02 +08:00
|
|
|
function callback(key) {}
|
2015-06-15 16:11:28 +08:00
|
|
|
|
|
|
|
var tabContent = [
|
2015-06-19 15:45:40 +08:00
|
|
|
<span><i className="anticon anticon-apple"></i>tab 1</span>,
|
|
|
|
<span><i className="anticon anticon-android"></i>tab 2</span>,
|
2015-06-15 16:11:28 +08:00
|
|
|
<span><i className="anticon anticon-lock"></i>tab 3</span>,
|
2015-06-19 15:45:40 +08:00
|
|
|
];
|
2015-06-15 16:11:28 +08:00
|
|
|
|
|
|
|
React.render(
|
2015-06-15 19:56:58 +08:00
|
|
|
<Tabs defaultActiveKey="2" onChange={callback}>
|
2015-06-15 16:11:28 +08:00
|
|
|
<TabPane tab={tabContent[0]} key="1">选项卡一</TabPane>
|
|
|
|
<TabPane tab={tabContent[1]} key="2">选项卡一</TabPane>
|
|
|
|
<TabPane tab={tabContent[2]} key="3">选项卡一</TabPane>
|
2015-06-15 19:56:58 +08:00
|
|
|
</Tabs>
|
|
|
|
, document.getElementById('components-tabs-demo-icon'));
|
2015-06-15 16:11:28 +08:00
|
|
|
````
|