2015-06-15 16:11:28 +08:00
|
|
|
# 图标
|
|
|
|
|
|
|
|
- order: 2
|
|
|
|
|
|
|
|
带有图标。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````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
|
|
|
|
|
|
|
function callback() {}
|
|
|
|
|
|
|
|
var tabContent = [
|
|
|
|
<span><i className="anticon anticon-lock"></i>tab 1</span>,
|
|
|
|
<span><i className="anticon anticon-lock"></i>tab 2</span>,
|
|
|
|
<span><i className="anticon anticon-lock"></i>tab 3</span>,
|
|
|
|
]
|
|
|
|
|
|
|
|
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
|
|
|
````
|