|
|
@@ -1,10 +1,10 @@
|
|
|
import React, { Fragment } from 'react';
|
|
|
import { Link } from 'dva/router';
|
|
|
-import DocumentTitle from 'react-document-title';
|
|
|
+// import DocumentTitle from 'react-document-title';
|
|
|
import { Icon } from 'antd';
|
|
|
-import GlobalFooter from '../components/GlobalFooter';
|
|
|
+import GlobalFooter from '../../components/GlobalFooter';
|
|
|
import styles from './UserLayout.less';
|
|
|
-import logo from '../assets/logo.svg';
|
|
|
+import logo from '../../assets/logo.svg';
|
|
|
|
|
|
// TODO:remove
|
|
|
// import { getRoutes, getPageQuery, getQueryPath } from '../utils/utils';
|
|
|
@@ -42,33 +42,34 @@ const copyright = (
|
|
|
// }
|
|
|
|
|
|
class UserLayout extends React.PureComponent {
|
|
|
- getPageTitle() {
|
|
|
- const { routerData, location } = this.props;
|
|
|
- const { pathname } = location;
|
|
|
- let title = 'Ant Design Pro';
|
|
|
- if (routerData[pathname] && routerData[pathname].name) {
|
|
|
- title = `${routerData[pathname].name} - Ant Design Pro`;
|
|
|
- }
|
|
|
- return title;
|
|
|
- }
|
|
|
+ // TODO title
|
|
|
+ // getPageTitle() {
|
|
|
+ // const { routerData, location } = this.props;
|
|
|
+ // const { pathname } = location;
|
|
|
+ // let title = 'Ant Design Pro';
|
|
|
+ // if (routerData[pathname] && routerData[pathname].name) {
|
|
|
+ // title = `${routerData[pathname].name} - Ant Design Pro`;
|
|
|
+ // }
|
|
|
+ // return title;
|
|
|
+ // }
|
|
|
|
|
|
render() {
|
|
|
const { children } = this.props;
|
|
|
return (
|
|
|
- <DocumentTitle title={this.getPageTitle()}>
|
|
|
- <div className={styles.container}>
|
|
|
- <div className={styles.content}>
|
|
|
- <div className={styles.top}>
|
|
|
- <div className={styles.header}>
|
|
|
- <Link to="/">
|
|
|
- <img alt="logo" className={styles.logo} src={logo} />
|
|
|
- <span className={styles.title}>Ant Design</span>
|
|
|
- </Link>
|
|
|
- </div>
|
|
|
- <div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div>
|
|
|
+ // TODO <DocumentTitle title={this.getPageTitle()}>
|
|
|
+ <div className={styles.container}>
|
|
|
+ <div className={styles.content}>
|
|
|
+ <div className={styles.top}>
|
|
|
+ <div className={styles.header}>
|
|
|
+ <Link to="/">
|
|
|
+ <img alt="logo" className={styles.logo} src={logo} />
|
|
|
+ <span className={styles.title}>Ant Design</span>
|
|
|
+ </Link>
|
|
|
</div>
|
|
|
- {children}
|
|
|
- {/* <Switch>
|
|
|
+ <div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div>
|
|
|
+ </div>
|
|
|
+ {children}
|
|
|
+ {/* <Switch>
|
|
|
{getRoutes(match.path, routerData).map(item => (
|
|
|
<Route
|
|
|
key={item.key}
|
|
|
@@ -79,10 +80,10 @@ class UserLayout extends React.PureComponent {
|
|
|
))}
|
|
|
<Redirect from="/user" to={getLoginPathWithRedirectPath()} />
|
|
|
</Switch> */}
|
|
|
- </div>
|
|
|
- <GlobalFooter links={links} copyright={copyright} />
|
|
|
</div>
|
|
|
- </DocumentTitle>
|
|
|
+ <GlobalFooter links={links} copyright={copyright} />
|
|
|
+ </div>
|
|
|
+ // </DocumentTitle>
|
|
|
);
|
|
|
}
|
|
|
}
|