Commit f2497cb0 authored by ddcat1115's avatar ddcat1115

open user pages in current tag

parent 14fa2965
...@@ -36,7 +36,6 @@ function userAdapter(userData) { ...@@ -36,7 +36,6 @@ function userAdapter(userData) {
userAdapter(item); userAdapter(item);
} else { } else {
const userItem = item; const userItem = item;
userItem.target = '_blank';
userItem.noRoute = true; userItem.noRoute = true;
} }
}); });
......
...@@ -79,7 +79,7 @@ class BasicLayout extends React.PureComponent { ...@@ -79,7 +79,7 @@ class BasicLayout extends React.PureComponent {
} }
return ( return (
<Menu.Item key={item.key || item.path}> <Menu.Item key={item.key || item.path}>
<Link to={itemPath} target={item.target || '_self'}> <Link to={itemPath}>
<Icon type={item.icon} /> <Icon type={item.icon} />
<span>{item.name}</span> <span>{item.name}</span>
</Link> </Link>
......
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Link } from 'dva/router';
import DocumentTitle from 'react-document-title'; import DocumentTitle from 'react-document-title';
import { Icon } from 'antd'; import { Icon } from 'antd';
import GlobalFooter from '../components/GlobalFooter'; import GlobalFooter from '../components/GlobalFooter';
...@@ -44,10 +45,12 @@ class UserLayout extends React.PureComponent { ...@@ -44,10 +45,12 @@ class UserLayout extends React.PureComponent {
<div className={styles.container}> <div className={styles.container}>
<div className={styles.top}> <div className={styles.top}>
<div className={styles.header}> <div className={styles.header}>
<Link to="/">
<img alt="" className={styles.logo} src="https://gw.alipayobjects.com/zos/rmsportal/NGCCBOENpgTXpBWUIPnI.svg" /> <img alt="" className={styles.logo} src="https://gw.alipayobjects.com/zos/rmsportal/NGCCBOENpgTXpBWUIPnI.svg" />
<span className={styles.title}>Ant Design</span> <span className={styles.title}>Ant Design</span>
</Link>
</div> </div>
<p className={styles.desc}>Ant Design 东半球最具影响力的 Web 设计规范</p> <p className={styles.desc}>Ant Design 西湖区最具影响力的 Web 设计规范</p>
</div> </div>
{children} {children}
<GlobalFooter className={styles.footer} links={links} copyright={copyright} /> <GlobalFooter className={styles.footer} links={links} copyright={copyright} />
......
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