123456789101112131415161718192021222324252627282930313233343536 |
- import React from 'react';
- import '../../content.less';
- import LeftTab from '../leftTab.jsx';
- import Contract from './contract.jsx';
- const Content = React.createClass({
- getInitialState() {
- return {
- loading: false,
- leftKey: 'contract',
- };
- },
- handlekey(key) {
- this.setState({
- leftKey: key,
- });
- window.location.hash = key;
- },
- componentWillMount(){
- if ( window.location.hash ) {
- this.handlekey(window.location.hash.substr(1));
- };
- },
- render() {
- return (
- <div className="manage-content">
- <LeftTab handlekey={this.handlekey} />
- <div className="content-right">
- <Contract />
- </div>
- </div>
- )
- }
- });
- export default Content;
|