mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
Improve Layout fixed demo
This commit is contained in:
parent
27ccd4afd5
commit
c361165352
@ -201,7 +201,8 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
|
||||
class="ant-layout"
|
||||
>
|
||||
<div
|
||||
class="header ant-layout-header"
|
||||
class="ant-layout-header"
|
||||
style="position:fixed;width:100%;"
|
||||
>
|
||||
<div
|
||||
class="logo"
|
||||
@ -237,7 +238,8 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
class="content ant-layout-content"
|
||||
class="ant-layout-content"
|
||||
style="padding:0 50px;margin-top:64px;"
|
||||
>
|
||||
<div
|
||||
class="ant-breadcrumb"
|
||||
@ -281,7 +283,7 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style="background:#fff;padding:24px;min-height:280px;"
|
||||
style="background:#fff;padding:24px;min-height:380px;"
|
||||
>
|
||||
Content
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
order: 6
|
||||
iframe: true
|
||||
iframe: 360
|
||||
title:
|
||||
zh-CN: 固定头部
|
||||
en-US: Fixed Header
|
||||
@ -20,7 +20,7 @@ const { Header, Content, Footer } = Layout;
|
||||
|
||||
ReactDOM.render(
|
||||
<Layout>
|
||||
<Header className="header">
|
||||
<Header style={{ position: 'fixed', width: '100%' }}>
|
||||
<div className="logo" />
|
||||
<Menu
|
||||
theme="dark"
|
||||
@ -33,13 +33,13 @@ ReactDOM.render(
|
||||
<Menu.Item key="3">nav 3</Menu.Item>
|
||||
</Menu>
|
||||
</Header>
|
||||
<Content className="content">
|
||||
<Content style={{ padding: '0 50px', marginTop: 64 }}>
|
||||
<Breadcrumb style={{ margin: '12px 0' }}>
|
||||
<Breadcrumb.Item>Home</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>List</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>App</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<div style={{ background: '#fff', padding: 24, minHeight: 280 }}>Content</div>
|
||||
<div style={{ background: '#fff', padding: 24, minHeight: 380 }}>Content</div>
|
||||
</Content>
|
||||
<Footer style={{ textAlign: 'center' }}>
|
||||
Ant Design ©2016 Created by Ant UED
|
||||
@ -57,12 +57,4 @@ ReactDOM.render(
|
||||
margin: 16px 24px 16px 0;
|
||||
float: left;
|
||||
}
|
||||
#components-layout-demo-fixed .header {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
#components-layout-demo-fixed .content {
|
||||
padding: 0 50px;
|
||||
margin-top: 64px;
|
||||
}
|
||||
````
|
||||
|
@ -90,7 +90,7 @@
|
||||
"babel-preset-stage-0": "^6.16.0",
|
||||
"bezier-easing": "^2.0.3",
|
||||
"bisheng": "^0.22.0",
|
||||
"bisheng-plugin-antd": "^0.13.0",
|
||||
"bisheng-plugin-antd": "^0.13.2",
|
||||
"bisheng-plugin-description": "^0.1.1",
|
||||
"bisheng-plugin-react": "^0.5.0",
|
||||
"bisheng-plugin-toc": "^0.4.0",
|
||||
|
@ -82,7 +82,7 @@ export default class Demo extends React.Component {
|
||||
expand,
|
||||
} = props;
|
||||
if (!this.liveDemo) {
|
||||
this.liveDemo = meta.iframe ? <iframe src={src} /> : preview(React, ReactDOM);
|
||||
this.liveDemo = meta.iframe ? <iframe src={src} height={meta.iframe} /> : preview(React, ReactDOM);
|
||||
}
|
||||
const codeExpand = state.codeExpand || expand;
|
||||
const codeBoxClass = classNames({
|
||||
|
Loading…
Reference in New Issue
Block a user