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 | const path = require('path');
|
10 |
|
11 |
|
12 | const mid = './test.md';
|
13 |
|
14 | const MD = require(mid + '');
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | const MD2 = require('../md')
|
20 |
|
21 |
|
22 | class App extends React.Component {
|
23 | constructor(props) {
|
24 | super(props);
|
25 |
|
26 | this.state = {
|
27 |
|
28 | }
|
29 | }
|
30 |
|
31 |
|
32 |
|
33 | componentDidMount() {
|
34 | RM.render(<MD.Comp />, document.getElementById(id));
|
35 | }
|
36 |
|
37 | render() {
|
38 | return (
|
39 | <div className={styles.app}>
|
40 | <div
|
41 | dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD2[0].md) }}
|
42 | />
|
43 |
|
44 | <div
|
45 | dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD.md) }}
|
46 | />
|
47 | </div>
|
48 | )
|
49 | }
|
50 | }
|
51 |
|
52 | export default App; |
\ | No newline at end of file |