From f2497cb0ea460e87601c443890d28ad2e565536a Mon Sep 17 00:00:00 2001 From: ddcat1115 Date: Tue, 29 Aug 2017 15:45:23 +0800 Subject: [PATCH] open user pages in current tag --- src/common/nav.js | 1 - src/layouts/BasicLayout.js | 2 +- src/layouts/UserLayout.js | 9 ++++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/nav.js b/src/common/nav.js index 263190c1..2a7abe15 100644 --- a/src/common/nav.js +++ b/src/common/nav.js @@ -36,7 +36,6 @@ function userAdapter(userData) { userAdapter(item); } else { const userItem = item; - userItem.target = '_blank'; userItem.noRoute = true; } }); diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 3738e444..75db512d 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -79,7 +79,7 @@ class BasicLayout extends React.PureComponent { } return ( - + {item.name} diff --git a/src/layouts/UserLayout.js b/src/layouts/UserLayout.js index 4ae73853..dba34085 100644 --- a/src/layouts/UserLayout.js +++ b/src/layouts/UserLayout.js @@ -1,5 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { Link } from 'dva/router'; import DocumentTitle from 'react-document-title'; import { Icon } from 'antd'; import GlobalFooter from '../components/GlobalFooter'; @@ -44,10 +45,12 @@ class UserLayout extends React.PureComponent {
- - Ant Design + + + Ant Design +
-

Ant Design 是东半球最具影响力的 Web 设计规范

+

Ant Design 是西湖区最具影响力的 Web 设计规范

{children} -- GitLab