import React, { Component } from 'react'; import '../content.less'; import LeftTab from './leftTab'; import UserList from './userList'; class Content extends Component { constructor() { super(); this.state = { loading: false, component:
, }; } componentWillMount() { if (window.location.hash) { this.getKey(window.location.hash.substr(1)); } else { this.getKey(window.showCustomer ? 'customerList' : 'userList'); }; } getKey(key) { switch (key) { case 'userList': require.ensure([], () => { const UserList = require('./userList').default; this.setState({ component: