Commit e235ca5d authored by afc163's avatar afc163 Committed by 偏右

move out PageHeaderLayout and rename to PageHeaderWrapper

parent 4c3eef15
......@@ -4,10 +4,10 @@ import Link from 'umi/link';
import PageHeader from '@/components/PageHeader';
import { connect } from 'dva';
import GridContent from './GridContent';
import styles from './PageHeaderLayout.less';
import MenuContext from './MenuContext';
import styles from './index.less';
import MenuContext from '@/layouts/MenuContext';
const PageHeaderLayout = ({ children, grid, wrapperClassName, top, ...restProps }) => (
const PageHeaderWrapper = ({ children, grid, wrapperClassName, top, ...restProps }) => (
<div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
{top}
<MenuContext.Consumer>
......@@ -38,4 +38,4 @@ const PageHeaderLayout = ({ children, grid, wrapperClassName, top, ...restProps
export default connect(({ setting }) => ({
grid: setting.grid,
}))(PageHeaderLayout);
}))(PageHeaderWrapper);
......@@ -3,7 +3,7 @@ import { connect } from 'dva';
import Link from 'umi/link';
import router from 'umi/router';
import { Card, Row, Col, Icon, Avatar, Tag, Divider, Spin, Input } from 'antd';
import GridContent from '@/layouts/GridContent';
import GridContent from '@/components/PageHeaderWrapper/GridContent';
import styles from './Center.less';
@connect(({ loading, user, project }) => ({
......
......@@ -3,7 +3,7 @@ import { connect } from 'dva';
import router from 'umi/router';
import { FormattedMessage } from 'umi/locale';
import { Menu } from 'antd';
import GridContent from '@/layouts/GridContent';
import GridContent from '@/components/PageHeaderWrapper/GridContent';
import styles from './Info.less';
const { Item } = Menu;
......
......@@ -27,7 +27,7 @@ import {
import Trend from '@/components/Trend';
import NumberInfo from '@/components/NumberInfo';
import numeral from 'numeral';
import GridContent from '@/layouts/GridContent';
import GridContent from '@/components/PageHeaderWrapper/GridContent';
import Yuan from '@/utils/Yuan';
import { getTimeDistance } from '@/utils/utils';
......
......@@ -6,7 +6,7 @@ import NumberInfo from '@/components/NumberInfo';
import CountDown from '@/components/CountDown';
import ActiveChart from '@/components/ActiveChart';
import numeral from 'numeral';
import GridContent from '@/layouts/GridContent';
import GridContent from '@/components/PageHeaderWrapper/GridContent';
import Authorized from '@/utils/Authorized';
import styles from './Monitor.less';
......
......@@ -6,7 +6,7 @@ import { Row, Col, Card, List, Avatar } from 'antd';
import { Radar } from '@/components/Charts';
import EditableLinkGroup from '@/components/EditableLinkGroup';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './Workplace.less';
......@@ -156,7 +156,7 @@ export default class Workplace extends PureComponent {
);
return (
<PageHeaderLayout
<PageHeaderWrapper
loading={currentUserLoading}
content={pageHeaderContent}
extraContent={extraContent}
......@@ -248,7 +248,7 @@ export default class Workplace extends PureComponent {
</Card>
</Col>
</Row>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -14,7 +14,7 @@ import {
} from 'antd';
import { connect } from 'dva';
import FooterToolbar from '@/components/FooterToolbar';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import TableForm from './TableForm';
import styles from './style.less';
......@@ -142,7 +142,7 @@ export default class AdvancedForm extends PureComponent {
};
const { width } = this.state;
return (
<PageHeaderLayout
<PageHeaderWrapper
title="高级表单"
content="高级表单常见于一次性输入和提交大批量数据的场景。"
wrapperClassName={styles.advancedForm}
......@@ -303,7 +303,7 @@ export default class AdvancedForm extends PureComponent {
提交
</Button>
</FooterToolbar>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -12,7 +12,7 @@ import {
Icon,
Tooltip,
} from 'antd';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './style.less';
const FormItem = Form.Item;
......@@ -64,7 +64,7 @@ export default class BasicForms extends PureComponent {
};
return (
<PageHeaderLayout
<PageHeaderWrapper
title="基础表单"
content="表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。"
>
......@@ -196,7 +196,7 @@ export default class BasicForms extends PureComponent {
</FormItem>
</Form>
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
import React, { PureComponent, Fragment } from 'react';
import { Card, Steps } from 'antd';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from '../style.less';
// import { Route, Redirect, Switch } from 'dva/router';
......@@ -28,7 +28,7 @@ export default class StepForm extends PureComponent {
render() {
const { location, children } = this.props;
return (
<PageHeaderLayout
<PageHeaderWrapper
title="分步表单"
tabActiveKey={location.pathname}
content="将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。"
......@@ -43,7 +43,7 @@ export default class StepForm extends PureComponent {
{children}
</Fragment>
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -21,7 +21,7 @@ import {
Select,
} from 'antd';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Result from '@/components/Result';
import styles from './BasicList.less';
......@@ -253,7 +253,7 @@ export default class BasicList extends PureComponent {
);
};
return (
<PageHeaderLayout>
<PageHeaderWrapper>
<div className={styles.standardList}>
<Card bordered={false}>
<Row>
......@@ -332,7 +332,7 @@ export default class BasicList extends PureComponent {
>
{getModalContent()}
</Modal>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -3,7 +3,7 @@ import { connect } from 'dva';
import { Card, Button, Icon, List } from 'antd';
import Ellipsis from '@/components/Ellipsis';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './CardList.less';
......@@ -61,7 +61,7 @@ export default class CardList extends PureComponent {
);
return (
<PageHeaderLayout title="卡片列表" content={content} extraContent={extraContent}>
<PageHeaderWrapper title="卡片列表" content={content} extraContent={extraContent}>
<div className={styles.cardList}>
<List
rowKey="id"
......@@ -93,7 +93,7 @@ export default class CardList extends PureComponent {
}
/>
</div>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import router from 'umi/router';
import { connect } from 'dva';
import { Input } from 'antd';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
@connect()
export default class SearchList extends Component {
......@@ -54,7 +54,7 @@ export default class SearchList extends Component {
const { match, children, location } = this.props;
return (
<PageHeaderLayout
<PageHeaderWrapper
title="搜索列表"
content={mainSearch}
tabList={tabList}
......@@ -67,7 +67,7 @@ export default class SearchList extends Component {
<Route key={item.key} path={item.path} component={item.component} exact={item.exact} />
))}
</Switch> */}
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -22,7 +22,7 @@ import {
Radio,
} from 'antd';
import StandardTable from '@/components/StandardTable';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './TableList.less';
......@@ -630,7 +630,7 @@ export default class TableList extends PureComponent {
handleUpdate: this.handleUpdate,
};
return (
<PageHeaderLayout title="查询表格">
<PageHeaderWrapper title="查询表格">
<Card bordered={false}>
<div className={styles.tableList}>
<div className={styles.tableListForm}>{this.renderForm()}</div>
......@@ -667,7 +667,7 @@ export default class TableList extends PureComponent {
values={stepFormValues}
/>
) : null}
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -19,7 +19,7 @@ import {
} from 'antd';
import classNames from 'classnames';
import DescriptionList from '@/components/DescriptionList';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './AdvancedProfile.less';
const { Step } = Steps;
......@@ -257,7 +257,7 @@ export default class AdvancedProfile extends Component {
};
return (
<PageHeaderLayout
<PageHeaderWrapper
title="单号:234231029431"
logo={
<img alt="" src="https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png" />
......@@ -345,7 +345,7 @@ export default class AdvancedProfile extends Component {
>
{contentList[operationkey]}
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'dva';
import { Card, Badge, Table, Divider } from 'antd';
import DescriptionList from '@/components/DescriptionList';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './BasicProfile.less';
const { Description } = DescriptionList;
......@@ -142,7 +142,7 @@ export default class BasicProfile extends Component {
},
];
return (
<PageHeaderLayout title="基础详情页">
<PageHeaderWrapper title="基础详情页">
<Card bordered={false}>
<DescriptionList size="large" title="退款申请" style={{ marginBottom: 32 }}>
<Description term="取货单号">1000000000</Description>
......@@ -177,7 +177,7 @@ export default class BasicProfile extends Component {
columns={progressColumns}
/>
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
}
}
......@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
import { formatMessage, FormattedMessage } from 'umi/locale';
import { Button, Icon, Card } from 'antd';
import Result from '@/components/Result';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
const extra = (
<Fragment>
......@@ -51,7 +51,7 @@ const actions = (
);
export default () => (
<PageHeaderLayout>
<PageHeaderWrapper>
<Card bordered={false}>
<Result
type="error"
......@@ -62,5 +62,5 @@ export default () => (
style={{ marginTop: 48, marginBottom: 16 }}
/>
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
......@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
import { formatMessage, FormattedMessage } from 'umi/locale';
import { Button, Row, Col, Icon, Steps, Card } from 'antd';
import Result from '@/components/Result';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
const { Step } = Steps;
......@@ -128,7 +128,7 @@ const actions = (
);
export default () => (
<PageHeaderLayout>
<PageHeaderWrapper>
<Card bordered={false}>
<Result
type="success"
......@@ -139,5 +139,5 @@ export default () => (
style={{ marginTop: 48, marginBottom: 16 }}
/>
</Card>
</PageHeaderLayout>
</PageHeaderWrapper>
);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment