content.jsx 807 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from 'react';
  2. import { Spin, Button, Tabs, Table, message, Modal, Tooltip } from 'antd';
  3. import '../content.less';
  4. // import './content.less';
  5. const TabPane = Tabs.TabPane;
  6. const Content = React.createClass({
  7. getInitialState() {
  8. return {
  9. loading: false,
  10. component: '<div></div>'
  11. };
  12. },
  13. componentWillMount() {
  14. let Module = require('./contacts/index').default;
  15. require.ensure([], () => {
  16. this.setState({
  17. component: <Module />,
  18. });
  19. });
  20. },
  21. render() {
  22. return (
  23. <div className="manage-content">
  24. <Spin spinning={this.state.loading} className='spin-box'>
  25. <div className="index-content">
  26. {this.state.component}
  27. </div>
  28. </Spin>
  29. </div>
  30. )
  31. }
  32. });
  33. export default Content;