1 | import React from 'react';
|
2 | import styles from './App.css';
|
3 |
|
4 | import {Button, DatePicker } from 'antd';
|
5 | import RM from 'react-dom';
|
6 |
|
7 | import Comp, {md, id} from './test.md';
|
8 |
|
9 |
|
10 | class App extends React.Component {
|
11 | constructor(props) {
|
12 | super(props);
|
13 | }
|
14 |
|
15 | componentDidMount() {
|
16 | console.log('comp:', Comp);
|
17 | RM.render(<Comp />, document.getElementById(id));
|
18 | }
|
19 |
|
20 | render() {
|
21 | return (
|
22 | <div className={styles.app}>
|
23 | <div
|
24 | dangerouslySetInnerHTML={{ __html: decodeURIComponent(md) }}
|
25 | />
|
26 | </div>
|
27 | )
|
28 | }
|
29 | }
|
30 |
|
31 | export default App; |
\ | No newline at end of file |