UNPKG

929 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// const MD2 = require(p.substr());
21const MD2 = require('../md')
22
23
24class App extends React.Component {
25 constructor(props) {
26 super(props);
27 }
28
29 componentDidMount() {
30 console.log('comp:', JSON);
31 RM.render(<MD.Comp />, document.getElementById(id));
32 }
33
34 render() {
35 return (
36 <div className={styles.app}>
37 <div
38 dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD2[0].md) }}
39 />
40
41 <div
42 dangerouslySetInnerHTML={{ __html: decodeURIComponent(MD.md) }}
43 />
44 </div>
45 )
46 }
47}
48
49export default App;
\No newline at end of file