提交 d9ffcb46b8a65aaf5026cec94db2c4daea5493c7

作者 愚道
1 个父辈 f78c3609

fix style

1   -import React from 'react';
2   -import { FormattedMessage } from 'umi/locale';
3   -import Link from 'umi/link';
4   -import { PageHeader } from 'ant-design-pro';
5   -import styles from './index.less';
6   -
7   -const PageHeaderWrapper = ({ children, wrapperClassName, ...restProps }) => (
8   - <div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
9   - <PageHeader
10   - home={<FormattedMessage id="BLOCK_BAME.menu.home" defaultMessage="Home" />}
11   - key="pageheader"
12   - {...restProps}
13   - linkElement={Link}
14   - itemRender={item => {
15   - if (item.locale) {
16   - return <FormattedMessage id={item.locale} defaultMessage={item.title} />;
17   - }
18   - return item.title;
19   - }}
20   - />
21   - {children ? <div className={styles.content}>{children}</div> : null}
22   - </div>
23   -);
24   -
25   -export default PageHeaderWrapper;
1   -@import '~antd/lib/style/themes/default.less';
2   -
3   -.content {
4   - margin: 24px 24px 0;
5   -}
6   -
7   -@media screen and (max-width: @screen-sm) {
8   - .content {
9   - margin: 24px 0 0;
10   - }
11   -}
... ... @@ -2,7 +2,6 @@ import React, { Fragment } from 'react';
2 2 import { formatMessage, FormattedMessage } from 'umi/locale';
3 3 import { Button, Row, Col, Icon, Steps, Card } from 'antd';
4 4 import { Result } from 'ant-design-pro';
5   -import PageHeaderWrapper from './components/PageHeaderWrapper';
6 5
7 6 const { Step } = Steps;
8 7
... ... @@ -129,16 +128,14 @@ const actions = (
129 128 );
130 129
131 130 export default () => (
132   - <PageHeaderWrapper>
133   - <Card bordered={false}>
134   - <Result
135   - type="success"
136   - title={formatMessage({ id: 'BLOCK_BAME.success.title' })}
137   - description={formatMessage({ id: 'BLOCK_BAME.success.description' })}
138   - extra={extra}
139   - actions={actions}
140   - style={{ marginTop: 48, marginBottom: 16 }}
141   - />
142   - </Card>
143   - </PageHeaderWrapper>
  131 + <Card bordered={false}>
  132 + <Result
  133 + type="success"
  134 + title={formatMessage({ id: 'BLOCK_BAME.success.title' })}
  135 + description={formatMessage({ id: 'BLOCK_BAME.success.description' })}
  136 + extra={extra}
  137 + actions={actions}
  138 + style={{ marginTop: 48, marginBottom: 16 }}
  139 + />
  140 + </Card>
144 141 );
... ...
注册登录 后发表评论