UNPKG

930 BJavaScriptView Raw
1import React from 'react';
2import styles from './App.css';
3// import 'antd/dist/antd.css';
4import {Button, DatePicker } from 'antd';
5import RM from 'react-dom';
6
7import {Comp, md, id} from './test.md';
8
9import JSON from './__md__.json';
10
11const path = require('path');
12
13
14const mid = './test.md';
15
16const MD = require(mid + '');
17
18
19
20
21// const MD2 = require(p.substr());
22const MD2 = require('../md')
23
24
25class App extends React.Component {
26 constructor(props) {
27 super(props);
28 }
29
30 componentDidMount() {
31 console.log('comp:', JSON);
32 RM.render(<MD.Comp />, document.getElementById(id));
33 }
34
35 render() {
36 return (
37 <div className={styles.app}>
38 <div
39 dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD2[0].md) }}
40 />
41
42 <div
43 dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD.md) }}
44 />
45 </div>
46 )
47 }
48}
49
50export default App;
\No newline at end of file