text: import React, { Component } from 'react';
  import { withRouter } from 'react-router';
  import { Link } from 'react-router-dom';
  // import Menu from './Menu'
  // import menus from './menus'
  const navData = [{
    key: 'home',
    title: '首页',
    path: '/',
  }, {
    key: 'library',
    title: '组件库',
    path: '/library',
  }, {
    key: 'wiki',
    title: '知识库',
    path: '/wiki',
  }, {
    key: 'labs',
    title: '实验室',
    path: '/labs',
  }];
  const NavList = withRouter(({ location }) => {
    const curPath = location.pathname;
    return (
      <nav className="f-fr">
        {navData.map(nav =>
          <Link className={curPath === nav.path ? 'active' : ''} key={nav.key} to={nav.path} title={nav.title}>{nav.title}</Link>)}
      </nav>
    );
  });
  export default class Header extends Component {
    render() {
      return (
        <div id="header">
          <div className="g-ctn f-cb">
            <div className="logo f-fl">
              <Link to="" title="FEGO前端官网">
                <svg id="logo" data-name="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 585 270" height="60px">
                  <title>fego</title>
                  <path fill="#7a7a7a" d="M301,196.19h-8.83V125h43v8H301v24.46h31.35v7.89H301Z" />
                  <path fill="#7a7a7a" d="M393.52,188.2v8H349.66V125h43.86v8h-35v22.83H391.7v7.89H358.49V188.2Z" />
                  <path fill="#7a7a7a" d="M460.68,189.85q-8.24,8-21.83,8-14.67,0-23.37-10.11t-8.71-27.17q0-16.86,8.78-27t23.3-10.18q11.77,0,19.75,6.14a26.17,26.17,0,0,1,9.88,16.74h-9A20.45,20.45,0,0,0,452,135.29q-5.25-3.75-13.15-3.75a20.28,20.28,0,0,0-16.75,7.89q-6.25,7.89-6.25,21.15,0,13.46,6.21,21.28t16.85,7.82q9.52,0,15.38-5.57t5.86-14.59v-1.73H440.22V160h28.7v8.68Q468.92,181.84,460.68,189.85Z" />
                  <path fill="#7a7a7a" d="M538,133.42q8.63,10.06,8.63,27.17t-8.61,27.17q-8.61,10.11-23.77,10.11t-23.87-10.11q-8.66-10.11-8.66-27.17t8.76-27.19q8.76-10,23.77-10T538,133.42Zm-40.86,6q-6.33,7.84-6.33,21.2t6.21,21.15q6.21,7.94,17.24,7.94t17.1-7.94q6.21-7.94,6.21-21.15t-6.23-21.2q-6.23-7.84-17.07-7.84T497.17,139.39Z" />
                  <path fill="#7a7a7a" d="M296,235.67h-2.38V216.45h11.61v2.16H296v6.61h8.47v2.13H296Z" />
                  <path fill="#7a7a7a" d="M311.53,228.07v7.61h-2.38V216.45h7.3a6.2,6.2,0,0,1,4.43,1.57,5.44,5.44,0,0,1,1.66,4.16,5.93,5.93,0,0,1-1,3.48,5.27,5.27,0,0,1-2.82,2l4.43,8h-2.8l-4.1-7.61Zm0-9.48v7.35h4.71a4,4,0,0,0,2.84-1,3.58,3.58,0,0,0,1-2.72,3.51,3.51,0,0,0-1-2.7,4.1,4.1,0,0,0-2.9-1Z" />
                  <path fill="#7a7a7a" d="M341.34,218.72a12.73,12.73,0,0,1,0,14.68,8.94,8.94,0,0,1-12.87,0,10.9,10.9,0,0,1-2.34-7.34,10.79,10.79,0,0,1,2.37-7.35,8.09,8.09,0,0,1,6.42-2.71A8,8,0,0,1,341.34,218.72Zm-11,1.61a8.86,8.86,0,0,0-1.71,5.73,9,9,0,0,0,1.68,5.71,6.09,6.09,0,0,0,9.28,0,10.58,10.58,0,0,0,0-11.44,5.57,5.57,0,0,0-4.61-2.12A5.63,5.63,0,0,0,330.3,220.33Z" />
                  <path fill="#7a7a7a" d="M350.17,235.67h-2.36V216.45h2.32l10.38,15h.21v-15h2.36v19.22h-2.32l-10.38-14.91h-.21Z" />
                  <path fill="#7a7a7a" d="M375.31,235.67h-2.39V218.61h-6.16v-2.16h14.71v2.16h-6.16Z" />
                  <path fill="#7a7a7a" d="M404.67,233.52v2.16H392.82V216.45h11.85v2.16H395.2v6.17h9v2.13h-9v6.61Z" />
                  <path fill="#7a7a7a" d="M411.35,235.67H409V216.45h2.32l10.38,15h.21v-15h2.36v19.22h-2.32l-10.38-14.91h-.21Z" />
                  <path fill="#7a7a7a" d="M429.13,216.45h6.56a8.68,8.68,0,0,1,6.64,2.53,11.7,11.7,0,0,1,0,14.15,8.67,8.67,0,0,1-6.65,2.54h-6.56Zm2.38,2.16v14.91h4a6.36,6.36,0,0,0,5-2,9.37,9.37,0,0,0,0-11,6.35,6.35,0,0,0-5-2Z" />
                  <path fill="#7a7a7a" d="M470.32,234a8.1,8.1,0,0,1-5.9,2.17,7.91,7.91,0,0,1-6.31-2.73,12.53,12.53,0,0,1,0-14.65,7.9,7.9,0,0,1,6.29-2.75,8.48,8.48,0,0,1,5.33,1.66,7.07,7.07,0,0,1,2.67,4.52H470a5.52,5.52,0,0,0-2-3,6,6,0,0,0-3.55-1,5.48,5.48,0,0,0-4.53,2.13,10.6,10.6,0,0,0,0,11.46,5.5,5.5,0,0,0,4.55,2.11,5.78,5.78,0,0,0,4.16-1.5,5.19,5.19,0,0,0,1.58-3.94V228H464.8v-2.1h7.75v2.34A7.61,7.61,0,0,1,470.32,234Z" />
                  <path fill="#7a7a7a" d="M491.22,218.72a12.73,12.73,0,0,1,0,14.68,8.94,8.94,0,0,1-12.87,0,10.9,10.9,0,0,1-2.34-7.34,10.79,10.79,0,0,1,2.37-7.35,8.09,8.09,0,0,1,6.42-2.71A8,8,0,0,1,491.22,218.72Zm-11,1.61a8.86,8.86,0,0,0-1.71,5.73,9,9,0,0,0,1.68,5.71,6.09,6.09,0,0,0,9.28,0,10.58,10.58,0,0,0,0-11.44,5.57,5.57,0,0,0-4.61-2.12A5.63,5.63,0,0,0,480.18,220.33Z" />
                  <path fill="#7a7a7a" d="M519.81,218.72a12.73,12.73,0,0,1,0,14.68,8.94,8.94,0,0,1-12.87,0,10.9,10.9,0,0,1-2.34-7.34,10.79,10.79,0,0,1,2.37-7.35A8.09,8.09,0,0,1,513.4,216,8,8,0,0,1,519.81,218.72Zm-11,1.61a8.86,8.86,0,0,0-1.71,5.73,9,9,0,0,0,1.68,5.71,6.09,6.09,0,0,0,9.28,0,10.58,10.58,0,0,0,0-11.44,5.57,5.57,0,0,0-4.61-2.12A5.63,5.63,0,0,0,508.77,220.33Z" />
                  <path fill="#7a7a7a" d="M528.64,235.67h-2.36V216.45h2.32l10.38,15h.21v-15h2.36v19.22h-2.32l-10.38-14.91h-.21Z" />
                  <path fill="#f99841" d="M281.21,71.45a2.47,2.47,0,0,0-.54.15c-.64.26-1.32.5-2,.71a19.82,19.82,0,0,1-5.67.83,20.08,20.08,0,0,1-8.6-1.93,23.93,23.93,0,0,1-8.71-7.11,27.15,27.15,0,0,1-2.49-3.83,2.5,2.5,0,0,0-.21-.32,34.1,34.1,0,0,0-3.43-3.88A29.43,29.43,0,0,0,229,47.39c-.64,0-1.25,0-1.86.06a37.68,37.68,0,0,0-17.23-17.7,2.5,2.5,0,0,0-3.06.72c-7.6,9.84-10.66,23.41-8.17,36.29.24,1.21.51,2.39.82,3.53a42.45,42.45,0,0,0-2,19.22,42.88,42.88,0,0,0,.77,4.33,31.88,31.88,0,0,1,.21,3.77,33.11,33.11,0,0,1-.88,7.6,29.89,29.89,0,0,1-5.08,10.93c-1.89,1.71-3.75,3.55-5.52,5.47-12,13-20.32,29.84-24.08,48.15a107,107,0,0,0-18.58-2.2c-1.1,0-2.19-.05-3.29-.05s-1.93,0-2.89.05a35.45,35.45,0,0,0,5.19-4.52,35.94,35.94,0,0,0,9.16-18,38.63,38.63,0,0,0,.75-7.51c0-20.57-16.45-37.3-36.67-37.3a36.63,36.63,0,0,0-29.33,15A16.34,16.34,0,0,1,87,84.16a15.82,15.82,0,0,1,2.58-.65,2.47,2.47,0,0,0,.51-.14,14.46,14.46,0,0,0,8.68-9.5h0A14.55,14.55,0,0,0,81.14,55.73a14.07,14.07,0,0,0-2.75,1,33.31,33.31,0,0,0,3.68,62.68c.72.21,1.44.38,2.17.54a37.14,37.14,0,0,0-3.46,9.43,2.54,2.54,0,0,0-.12.41,77.36,77.36,0,0,1-20.6,38.84,2.53,2.53,0,0,0-.4.54,93,93,0,0,0-23.56,62.07c0,1.57.11,3.18.22,4.74l.07,1s0,.06,0,.08a2.46,2.46,0,0,0,0,.25c0,.08,0,.16.06.23s0,.14.08.21a2.44,2.44,0,0,0,.11.23l.11.19.15.21.15.17.18.17.17.13.24.15.1.06.07,0a2.47,2.47,0,0,0,.36.13l.15,0a2.49,2.49,0,0,0,.47.05H39a2.5,2.5,0,0,0,.51-.09h0a2.47,2.47,0,0,0,.52-.23l.14-.09a2.5,2.5,0,0,0,.4-.33l.08-.08a2.5,2.5,0,0,0,.35-.52l0-.05C50.78,218.21,65,201.74,82.2,190.31a106.34,106.34,0,0,1,39.47-16A70.86,70.86,0,0,0,104.24,221c0,.77,0,1.54,0,2.29v.39a27.74,27.74,0,0,0,.21,3.28,13.69,13.69,0,0,0,3,6.59A14.65,14.65,0,0,0,119,239.17a2.5,2.5,0,1,0,0-5,9.67,9.67,0,0,1-7.6-3.71,8.79,8.79,0,0,1-2-4.19,23.57,23.57,0,0,1-.16-2.7v-.36s0-.07,0-.1c0-.71,0-1.4,0-2.11a65.85,65.85,0,0,1,17.42-44.82c1.18-1.09,2.41-2.12,3.67-3.13a106.29,106.29,0,0,1,10.7-.55c1.06,0,2.11,0,3.15,0A102,102,0,0,1,162,174.67a110.5,110.5,0,0,0-1.38,17.26,108.79,108.79,0,0,0,10,45.79,2.5,2.5,0,1,0,4.53-2.12,103.75,103.75,0,0,1-9.5-43.68,105.64,105.64,0,0,1,1.21-15.81c18.57,6.89,33.29,23.29,39.78,44.6l.18.62c.2.69.35,1.19.47,1.54a100.46,100.46,0,0,0,4.86,14.75,2.5,2.5,0,0,0,4.61-1.93,97.88,97.88,0,0,1-7.47-37.94c0-41,24.77-76.51,58.93-84.58a24.39,24.39,0,0,0,3.87-.8l.11,0a26.43,26.43,0,0,0,6.49-2.93c7.52-4.7,12.77-12.93,14.39-22.56a35.42,35.42,0,0,0,.46-3.82,2.49,2.49,0,0,0,0-.27C293.19,75.77,287.63,70.4,281.21,71.45Zm-217,8.09A28.2,28.2,0,0,1,80.4,61.33l.15-.07a9.19,9.19,0,0,1,1.84-.69,9.36,9.36,0,0,1,2.38-.31A9.56,9.56,0,0,1,94,72.48a9.49,9.49,0,0,1-5.47,6.14,20.78,20.78,0,0,0-3.1.8A21.34,21.34,0,0,0,73,109,28.36,28.36,0,0,1,64.17,79.54Zm15.27,106.6a123.86,123.86,0,0,0-38.25,41.11,87.84,87.84,0,0,1,22.56-55.14,2.54,2.54,0,0,0,.28-.38A82.34,82.34,0,0,0,85.47,131.2a2.48,2.48,0,0,0,.11-.38,32.2,32.2,0,0,1,4.57-11.06,2.48,2.48,0,0,0,.38-.58,31.65,31.65,0,0,1,26-13.92c17.46,0,31.67,14.49,31.67,32.3a33.61,33.61,0,0,1-.65,6.53,31,31,0,0,1-13.25,20,70.31,70.31,0,0,0-6,4.1A111.16,111.16,0,0,0,79.44,186.14ZM288.11,86c-1.38,8.24-5.8,15.23-12.11,19.17a21.41,21.41,0,0,1-5.17,2.35l-.1,0a19.37,19.37,0,0,1-3.27.67l-.28,0c-36.46,8.53-62.92,46.16-62.92,89.48q0,2.56.12,5.09c-8.48-15-21.39-26.31-36.66-31.72,3.53-17.56,11.45-33.73,22.93-46.14,1.72-1.87,3.53-3.65,5.36-5.3a2.49,2.49,0,0,0,.32-.34,34.87,34.87,0,0,0,6.11-13,38.12,38.12,0,0,0,1-8.76,36.45,36.45,0,0,0-.27-4.51,2.35,2.35,0,0,0,0-.26,38.11,38.11,0,0,1-.71-4,37.39,37.39,0,0,1,2-17.61,2.5,2.5,0,0,0,.06-1.58c-.36-1.23-.67-2.53-.94-3.87a41.07,41.07,0,0,1,6-30.58,33.55,33.55,0,0,1,13.75,15.89,2.49,2.49,0,0,0,2.64,1.48,21.88,21.88,0,0,1,3-.2,24.47,24.47,0,0,1,17.06,7.25,29.36,29.36,0,0,1,2.81,3.17,32.09,32.09,0,0,0,2.84,4.35,28.93,28.93,0,0,0,10.54,8.57,25,25,0,0,0,17.83,1.37c.75-.22,1.49-.48,2.19-.76a4.71,4.71,0,0,1,.54,0c3,0,5.47,2.87,5.68,6.56A30.49,30.49,0,0,1,288.11,86Z" />
                </svg>
              </Link>
            </div>
            <NavList />
          </div>
          <hr />
        </div>
      );
    }
  }
  