diff --git a/src/layouts/GridContent.js b/src/components/PageHeaderWrapper/GridContent.js similarity index 100% rename from src/layouts/GridContent.js rename to src/components/PageHeaderWrapper/GridContent.js diff --git a/src/layouts/GridContent.less b/src/components/PageHeaderWrapper/GridContent.less similarity index 100% rename from src/layouts/GridContent.less rename to src/components/PageHeaderWrapper/GridContent.less diff --git a/src/layouts/PageHeaderLayout.js b/src/components/PageHeaderWrapper/index.js similarity index 84% rename from src/layouts/PageHeaderLayout.js rename to src/components/PageHeaderWrapper/index.js index a3f51c595464d395c3dd40be4fd975ce34f31b7d..1a8335904868c1d0ec86cfccb3e6c49c38a6d14a 100644 --- a/src/layouts/PageHeaderLayout.js +++ b/src/components/PageHeaderWrapper/index.js @@ -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 }) => (
{top} @@ -38,4 +38,4 @@ const PageHeaderLayout = ({ children, grid, wrapperClassName, top, ...restProps export default connect(({ setting }) => ({ grid: setting.grid, -}))(PageHeaderLayout); +}))(PageHeaderWrapper); diff --git a/src/layouts/PageHeaderLayout.less b/src/components/PageHeaderWrapper/index.less similarity index 100% rename from src/layouts/PageHeaderLayout.less rename to src/components/PageHeaderWrapper/index.less diff --git a/src/pages/Account/Center/Center.js b/src/pages/Account/Center/Center.js index dbc17364ae831dfc12a327b92829f719bbceef0e..0d699ecb9d185472cd1fd33df166bd7740fdfaba 100644 --- a/src/pages/Account/Center/Center.js +++ b/src/pages/Account/Center/Center.js @@ -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 }) => ({ diff --git a/src/pages/Account/Settings/Info.js b/src/pages/Account/Settings/Info.js index de7b86e42cc05072f93aa1c5990bc9405cefb12f..49fda8fe7b082d444ee7e790c553864cd2d639b1 100644 --- a/src/pages/Account/Settings/Info.js +++ b/src/pages/Account/Settings/Info.js @@ -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; diff --git a/src/pages/Dashboard/Analysis.js b/src/pages/Dashboard/Analysis.js index f0485d4e04d733ba0a3fc9d453c5feb4b56f20d8..8f87c575e904d455e108324d15c96fe778a1fc45 100644 --- a/src/pages/Dashboard/Analysis.js +++ b/src/pages/Dashboard/Analysis.js @@ -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'; diff --git a/src/pages/Dashboard/Monitor.js b/src/pages/Dashboard/Monitor.js index c6b5463fe29348e54b036a315462a609d1633d27..5709ca0af86bebcec7d9ee17b28725c4edbf3bc6 100644 --- a/src/pages/Dashboard/Monitor.js +++ b/src/pages/Dashboard/Monitor.js @@ -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'; diff --git a/src/pages/Dashboard/Workplace.js b/src/pages/Dashboard/Workplace.js index 0b79072dcd106bdc733423b11c5a6e549db9f986..8826bb3ff83b473e063772e7abf99565f44397ea 100644 --- a/src/pages/Dashboard/Workplace.js +++ b/src/pages/Dashboard/Workplace.js @@ -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 ( - - + ); } } diff --git a/src/pages/Forms/AdvancedForm.js b/src/pages/Forms/AdvancedForm.js index a7e7c289f71b67d7e27c4f86086116cb6df325de..595d522260a0d4fee8024ba5b11a6eb193914e27 100644 --- a/src/pages/Forms/AdvancedForm.js +++ b/src/pages/Forms/AdvancedForm.js @@ -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 ( - - + ); } } diff --git a/src/pages/Forms/BasicForm.js b/src/pages/Forms/BasicForm.js index b6067ecdca340de9a25f1f408814a1f8651cea00..9c851533ebcccf46653fa881703205d6373366cf 100644 --- a/src/pages/Forms/BasicForm.js +++ b/src/pages/Forms/BasicForm.js @@ -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 ( - @@ -196,7 +196,7 @@ export default class BasicForms extends PureComponent { - + ); } } diff --git a/src/pages/Forms/StepForm/index.js b/src/pages/Forms/StepForm/index.js index 8ea12024566d178d6a50812c7caad510e5f8ad17..4ebb6177254bc221398449c0ee9f8afe15267758 100644 --- a/src/pages/Forms/StepForm/index.js +++ b/src/pages/Forms/StepForm/index.js @@ -1,6 +1,6 @@ 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 ( - - + ); } } diff --git a/src/pages/List/BasicList.js b/src/pages/List/BasicList.js index e1df16f2723cbee65bd521b84b261e629092fe23..9618db8100272e44cf04e072ac9d1d4795033264 100644 --- a/src/pages/List/BasicList.js +++ b/src/pages/List/BasicList.js @@ -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 ( - +
@@ -332,7 +332,7 @@ export default class BasicList extends PureComponent { > {getModalContent()} - + ); } } diff --git a/src/pages/List/CardList.js b/src/pages/List/CardList.js index 2c6c8baa1031f2934d465eb11f3056a9abdc8f9a..72f14d3889c9eb1e02a067138a0b65e0d07c3a82 100644 --- a/src/pages/List/CardList.js +++ b/src/pages/List/CardList.js @@ -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 ( - +
-
+ ); } } diff --git a/src/pages/List/List.js b/src/pages/List/List.js index 7bad3488409623dc86f195d90e527359d80677e8..a747e5cb0b0de5f94af78f125fa9622b6f93637d 100644 --- a/src/pages/List/List.js +++ b/src/pages/List/List.js @@ -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 ( - ))} */} - + ); } } diff --git a/src/pages/List/TableList.js b/src/pages/List/TableList.js index 894c6f8990a2fd21cf65c6f6f583dc3a8203de9b..a5465d05925bd48031d90034a020a71643591871 100644 --- a/src/pages/List/TableList.js +++ b/src/pages/List/TableList.js @@ -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 ( - +
{this.renderForm()}
@@ -667,7 +667,7 @@ export default class TableList extends PureComponent { values={stepFormValues} /> ) : null} - + ); } } diff --git a/src/pages/Profile/AdvancedProfile.js b/src/pages/Profile/AdvancedProfile.js index 37dfbefb71bbff65ade4cc8dc33aaababfef05cb..711d2f4d2ac31a3849afce5b7cec45b2cc5e4331 100644 --- a/src/pages/Profile/AdvancedProfile.js +++ b/src/pages/Profile/AdvancedProfile.js @@ -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 ( - @@ -345,7 +345,7 @@ export default class AdvancedProfile extends Component { > {contentList[operationkey]} - + ); } } diff --git a/src/pages/Profile/BasicProfile.js b/src/pages/Profile/BasicProfile.js index ea457288b9a21dd9fddf1b3927fd28856585bb8b..ff2c7bc10d9953b9fa8f9ff84ca0376b8340118f 100644 --- a/src/pages/Profile/BasicProfile.js +++ b/src/pages/Profile/BasicProfile.js @@ -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 ( - + 1000000000 @@ -177,7 +177,7 @@ export default class BasicProfile extends Component { columns={progressColumns} /> - + ); } } diff --git a/src/pages/Result/Error.js b/src/pages/Result/Error.js index 6d8aafcff0f73c7f41f3391a12dcf0cc56c6305a..b5fd5abc5a341657134b82a222bd35da690cd867 100644 --- a/src/pages/Result/Error.js +++ b/src/pages/Result/Error.js @@ -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 = ( @@ -51,7 +51,7 @@ const actions = ( ); export default () => ( - + ( style={{ marginTop: 48, marginBottom: 16 }} /> - + ); diff --git a/src/pages/Result/Success.js b/src/pages/Result/Success.js index 12e38452456b4026eb2cfecfc28f43fb3bf23c27..10cf6b1d0142f04aa5a30df97f1bcac08bc2faa6 100644 --- a/src/pages/Result/Success.js +++ b/src/pages/Result/Success.js @@ -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 () => ( - + ( style={{ marginTop: 48, marginBottom: 16 }} /> - + );