1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import React from 'react';
- import { Menu, Icon } from 'antd';
- import '../leftTab.less';
- const SubMenu = Menu.SubMenu;
- const MenuItemGroup = Menu.ItemGroup;
- const LeftTab = React.createClass({
- getInitialState() {
- return {
- current: 'patent',
- };
- },
- handleClick(e) {
- this.props.handlekey(e.key);
- this.setState({
- current: e.key,
- });
- },
- componentWillMount() {
- if (window.location.hash) {
- this.state.current = window.location.hash.substr(1);
- };
- },
- render() {
- return (
- <Menu onClick={this.handleClick}
- selectedKeys={[this.state.current]}
- defaultOpenKeys={['sub1']}
- mode="vertical"
- className="account-left"
- mode="inline"
- >
- <SubMenu key="sub1" title={<span>知识产权申请</span>}>
- <Menu.Item key="patent">
- 专利申请
- </Menu.Item>
- <Menu.Item key="software">
- 软著申请
- </Menu.Item>
- </SubMenu>
- <Menu.Item key="company">
- 高企认定
- </Menu.Item>
- <Menu.Item key="technology">
- 科技项目申报
- </Menu.Item>
- </Menu>
- );
- }
- });
- export default LeftTab;
|