Browse Source

Fix footer

pull/2/head
afc163 9 years ago
parent
commit
a2b27a832f
  1. 30
      src/layouts/BasicLayout.js
  2. 6
      src/layouts/PageHeaderLayout.js
  3. 1
      src/routes/Forms/AdvancedForm.js
  4. 5
      src/routes/Forms/style.less

30
src/layouts/BasicLayout.js

@ -229,23 +229,23 @@ class BasicLayout extends React.PureComponent {
</Dropdown>
</div>
</Header>
<Content style={{ margin: '24px 24px 0 24px', height: '100%' }}>
<Content style={{ margin: '24px 24px 0', height: '100%' }}>
{children}
<GlobalFooter
links={[{
title: '帮助',
href: '',
}, {
title: '隐私',
href: '',
}, {
title: '条款',
href: '',
blankTarget: true,
}]}
copyright={<div>Copyright <Icon type="copyright" /> 2017 蚂蚁金服体验技术部出品</div>}
/>
</Content>
<GlobalFooter
links={[{
title: '帮助',
href: '',
}, {
title: '隐私',
href: '',
}, {
title: '条款',
href: '',
blankTarget: true,
}]}
copyright={<div>Copyright <Icon type="copyright" /> 2017 蚂蚁金服体验技术部出品</div>}
/>
</Layout>
</Layout>
</DocumentTitle>

6
src/layouts/PageHeaderLayout.js

@ -1,9 +1,9 @@
import React from 'react';
import PageHeader from '../components/PageHeader';
export default ({ children, ...restProps }) => (
<div style={{ margin: -24 }}>
export default ({ children, wrapperClassName, ...restProps }) => (
<div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
<PageHeader {...restProps} />
{children ? <div style={{ margin: 24 }}>{children}</div> : null}
{children ? <div style={{ margin: '24px 24px 0' }}>{children}</div> : null}
</div>
);

1
src/routes/Forms/AdvancedForm.js

@ -97,6 +97,7 @@ function AdvancedForm({ form, dispatch, submitting }) {
<PageHeaderLayout
title="高级表单"
content="在后台页面中,大批量的数据修改和提交是很常见的情况。"
wrapperClassName={styles.withFooterToolbar}
>
<Card title="仓库管理" className={styles.card} bordered={false}>
<Form layout="vertical" hideRequiredMark>

5
src/routes/Forms/style.less

@ -79,3 +79,8 @@
padding-bottom: 12.5px !important;
}
}
// custom footer for fixed footer toolbar
.withFooterToolbar + div {
padding-bottom: 64px;
}

Loading…
Cancel
Save