1 | import React from 'react';
|
2 | import PubSub from 'pubsub-js';
|
3 |
|
4 | import { Layout } from 'antd';
|
5 |
|
6 | const {Content} = Layout;
|
7 |
|
8 | import Render from './render';
|
9 |
|
10 |
|
11 | export default class ContentView extends React.Component {
|
12 |
|
13 | token;
|
14 |
|
15 | constructor(props) {
|
16 | super(props);
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | }
|
24 |
|
25 | componentWillUnmount() {
|
26 | PubSub.unsubscribe(this.token);
|
27 | }
|
28 |
|
29 | render() {
|
30 | console.log('================')
|
31 | console.log(this.props.match);
|
32 | const {match} = this.props;
|
33 | return (
|
34 | <Content style={{ background: '#fff', padding: 24, margin: 0, minHeight: 280 }}>
|
35 | <Render ref='render' pageName={match.pageName}/>
|
36 | </Content>
|
37 | )
|
38 | }
|
39 | } |
\ | No newline at end of file |