Преглед изворни кода

move pro doc link to header

afc163 пре 8 година
родитељ
комит
5ba91f2019
3 измењених фајлова са 11 додато и 6 уклоњено
  1. 0 5
      src/common/menu.js
  2. 10 1
      src/components/GlobalHeader/index.js
  3. 1 0
      src/components/GlobalHeader/index.less

+ 0 - 5
src/common/menu.js

@@ -113,11 +113,6 @@ const menuData = [{
     name: '注册结果',
     path: 'register-result',
   }],
-}, {
-  name: '使用文档',
-  icon: 'book',
-  path: 'http://pro.ant.design/docs/getting-started',
-  target: '_blank',
 }];
 
 function formatter(data, parentPath = '', parentAuthority) {

+ 10 - 1
src/components/GlobalHeader/index.js

@@ -1,5 +1,5 @@
 import React, { PureComponent } from 'react';
-import { Menu, Icon, Spin, Tag, Dropdown, Avatar, Divider } from 'antd';
+import { Menu, Icon, Spin, Tag, Dropdown, Avatar, Divider, Tooltip } from 'antd';
 import moment from 'moment';
 import groupBy from 'lodash/groupBy';
 import Debounce from 'lodash-decorators/debounce';
@@ -94,6 +94,15 @@ export default class GlobalHeader extends PureComponent {
               console.log('enter', value); // eslint-disable-line
             }}
           />
+          <Tooltip title="使用文档">
+            <Link
+              target="_blank"
+              to="http://pro.ant.design/docs/getting-started"
+              className={styles.action}
+            >
+              <Icon type="question-circle-o" />
+            </Link>
+          </Tooltip>
           <NoticeIcon
             className={styles.action}
             count={currentUser.notifyCount}

+ 1 - 0
src/components/GlobalHeader/index.less

@@ -61,6 +61,7 @@ i.trigger {
     > i {
       font-size: 16px;
       vertical-align: middle;
+      color: @text-color;
     }
     &:hover,
     &:global(.ant-popover-open) {