mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-26 01:42:30 +08:00
29 lines
677 B
Markdown
29 lines
677 B
Markdown
# 图标
|
|
|
|
- order: 2
|
|
|
|
有图标的标签。
|
|
|
|
---
|
|
|
|
````jsx
|
|
var Tabs = antd.Tabs;
|
|
var TabPane = Tabs.TabPane;
|
|
|
|
function callback(key) {}
|
|
|
|
var tabContent = [
|
|
<span><i className="anticon anticon-apple"></i>tab 1</span>,
|
|
<span><i className="anticon anticon-android"></i>tab 2</span>,
|
|
<span><i className="anticon anticon-lock"></i>tab 3</span>,
|
|
];
|
|
|
|
React.render(
|
|
<Tabs defaultActiveKey="2" onChange={callback}>
|
|
<TabPane tab={tabContent[0]} key="1">选项卡一</TabPane>
|
|
<TabPane tab={tabContent[1]} key="2">选项卡一</TabPane>
|
|
<TabPane tab={tabContent[2]} key="3">选项卡一</TabPane>
|
|
</Tabs>
|
|
, document.getElementById('components-tabs-demo-icon'));
|
|
````
|