mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
fix card tabs demo
This commit is contained in:
parent
af03ae67f9
commit
42efc2927d
@ -712,8 +712,8 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
|||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-selected="false"
|
aria-selected="true"
|
||||||
class=" ant-tabs-tab"
|
class="ant-tabs-tab-active ant-tabs-tab"
|
||||||
role="tab"
|
role="tab"
|
||||||
>
|
>
|
||||||
tab1
|
tab1
|
||||||
@ -733,11 +733,11 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="ant-tabs-content ant-tabs-content-animated"
|
class="ant-tabs-content ant-tabs-content-animated"
|
||||||
style="display:none"
|
style="margin-left:0%"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="false"
|
||||||
class="ant-tabs-tabpane ant-tabs-tabpane-inactive"
|
class="ant-tabs-tabpane ant-tabs-tabpane-active"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
@ -65,6 +65,7 @@ class TabsCard extends React.Component {
|
|||||||
title="Card title"
|
title="Card title"
|
||||||
extra={<a href="#">More</a>}
|
extra={<a href="#">More</a>}
|
||||||
tabList={tabList}
|
tabList={tabList}
|
||||||
|
activeTabKey={this.state.key}
|
||||||
onTabChange={(key) => { this.onTabChange(key, 'key'); }}
|
onTabChange={(key) => { this.onTabChange(key, 'key'); }}
|
||||||
>
|
>
|
||||||
{contentList[this.state.key]}
|
{contentList[this.state.key]}
|
||||||
@ -83,7 +84,5 @@ class TabsCard extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(<TabsCard />, mountNode);
|
||||||
<TabsCard />,
|
|
||||||
mountNode);
|
|
||||||
````
|
````
|
||||||
|
Loading…
Reference in New Issue
Block a user