Browse Source

liguoqing

JERRY\15194 4 years ago
parent
commit
b83329964d
2 changed files with 6 additions and 2 deletions
  1. 1 1
      boniu/.eslintcache
  2. 5 1
      boniu/src/components/Navbar/navbar.jsx

File diff suppressed because it is too large
+ 1 - 1
boniu/.eslintcache


+ 5 - 1
boniu/src/components/Navbar/navbar.jsx

@@ -22,6 +22,9 @@ class NavBar extends Component {
       userInfo: {}
     };
   }
+  navDeFault = (info) => {
+    this.props.history.push({pathname: info.url, state: info})
+  }
   render() {
     // let { match } = this.props;
     const pathNames = this.props.history.location.pathname;
@@ -43,7 +46,8 @@ class NavBar extends Component {
               <Menu.Item key="overview" icon={<UserOutlined />}>
                 <Link to="/overview">总体说明</Link>
               </Menu.Item>
-              <SubMenu key="stocks" icon={<LaptopOutlined />} title="股票接口">
+              <SubMenu key="stocks" icon={<LaptopOutlined />} title="股票接口"
+                onTitleClick={ () => this.navDeFault(stocksApiList[0]) }>
                 {stocksApiList.map((item) => {
                   return (
                     <Menu.Item key={item.key}>