正在显示
3 个修改的文件
包含
10 行增加
和
49 行删除
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; |
@@ -2,7 +2,6 @@ import React, { Fragment } from 'react'; | @@ -2,7 +2,6 @@ import React, { Fragment } from 'react'; | ||
2 | import { formatMessage, FormattedMessage } from 'umi/locale'; | 2 | import { formatMessage, FormattedMessage } from 'umi/locale'; |
3 | import { Button, Row, Col, Icon, Steps, Card } from 'antd'; | 3 | import { Button, Row, Col, Icon, Steps, Card } from 'antd'; |
4 | import { Result } from 'ant-design-pro'; | 4 | import { Result } from 'ant-design-pro'; |
5 | -import PageHeaderWrapper from './components/PageHeaderWrapper'; | ||
6 | 5 | ||
7 | const { Step } = Steps; | 6 | const { Step } = Steps; |
8 | 7 | ||
@@ -129,16 +128,14 @@ const actions = ( | @@ -129,16 +128,14 @@ const actions = ( | ||
129 | ); | 128 | ); |
130 | 129 | ||
131 | export default () => ( | 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 | ); |
请
注册
或
登录
后发表评论