123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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: window.showCustomer ? 'customerList' : 'userList',
- };
- },
- 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]}
- mode="vertical"
- className="account-left" >
- <Menu.Item key="userList">
- 个人用户列表
- </Menu.Item>
- <Menu.Item key="orgList">
- 组织用户列表
- </Menu.Item>
- <Menu.Item key="customerList">
- 我的客户列表
- </Menu.Item>
- <Menu.Item key="levelSet">
- 会员等级设置
- </Menu.Item>
- <Menu.Item key="customerSearch">
- 客户查询
- </Menu.Item>
- <Menu.Item key="highTechSearch">
- 高企查询
- </Menu.Item>
- </Menu>
- );
- },
- });
- export default LeftTab;
|