mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
Add tabPostion bottom
This commit is contained in:
parent
f056e517b9
commit
7eb3c04a1e
45
components/tabs/demo/position.md
Normal file
45
components/tabs/demo/position.md
Normal file
@ -0,0 +1,45 @@
|
||||
# 位置
|
||||
|
||||
- order: 6
|
||||
|
||||
有四个位置,`tabPosition="left|right|top|bottom"`。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
import { Tabs, Select } from 'antd';
|
||||
const TabPane = Tabs.TabPane;
|
||||
const Option = Select.Option;
|
||||
|
||||
const Demo = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
tabPosition: 'top',
|
||||
};
|
||||
},
|
||||
changeTabPosition(tabPosition) {
|
||||
this.setState({ tabPosition });
|
||||
},
|
||||
render() {
|
||||
return <div>
|
||||
<div style={{marginBottom: 16}}>
|
||||
页签位置:
|
||||
<Select value={this.state.tabPosition} onChange={this.changeTabPosition}
|
||||
dropdownMatchSelectWidth={false}>
|
||||
<Option value="top">top</Option>
|
||||
<Option value="bottom">bottom</Option>
|
||||
<Option value="left">left</Option>
|
||||
<Option value="right">right</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<Tabs tabPosition={this.state.tabPosition}>
|
||||
<TabPane tab="选项卡一" key="1">选项卡一内容</TabPane>
|
||||
<TabPane tab="选项卡二" key="2">选项卡二内容</TabPane>
|
||||
<TabPane tab="选项卡三" key="3">选项卡三内容</TabPane>
|
||||
</Tabs>
|
||||
</div>;
|
||||
}
|
||||
});
|
||||
|
||||
ReactDOM.render(<Demo />, document.getElementById('components-tabs-demo-position'));
|
||||
````
|
@ -1,21 +0,0 @@
|
||||
# 垂直
|
||||
|
||||
- order: 6
|
||||
|
||||
选项卡在左边。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
import { Tabs } from 'antd';
|
||||
const TabPane = Tabs.TabPane;
|
||||
|
||||
ReactDOM.render(
|
||||
<Tabs defaultActiveKey="1" tabPosition="left">
|
||||
<TabPane tab="选项卡一" key="1">选项卡一内容</TabPane>
|
||||
<TabPane tab="选项卡二" key="2">选项卡二内容</TabPane>
|
||||
<TabPane tab="选项卡三长" key="3">选项卡三内容</TabPane>
|
||||
</Tabs>
|
||||
, document.getElementById('components-tabs-demo-vertical-left'));
|
||||
````
|
||||
|
@ -1,20 +0,0 @@
|
||||
# 垂直
|
||||
|
||||
- order: 7
|
||||
|
||||
选项卡在右边。
|
||||
|
||||
---
|
||||
|
||||
````jsx
|
||||
import { Tabs } from 'antd';
|
||||
const TabPane = Tabs.TabPane;
|
||||
|
||||
ReactDOM.render(
|
||||
<Tabs defaultActiveKey="1" tabPosition="right">
|
||||
<TabPane tab="选项卡一" key="1">选项卡一内容</TabPane>
|
||||
<TabPane tab="选项卡二" key="2">选项卡二内容</TabPane>
|
||||
<TabPane tab="选项卡三长" key="3">选项卡三内容</TabPane>
|
||||
</Tabs>
|
||||
, document.getElementById('components-tabs-demo-vertical-right'));
|
||||
````
|
@ -364,6 +364,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-bottom &-tabs-bar {
|
||||
margin-bottom: 0;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
|
||||
// card style
|
||||
&&-card &-ink-bar {
|
||||
|
Loading…
Reference in New Issue
Block a user