UNPKG

893 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
9const path = require('path');
10
11
12const mid = './test.md';
13
14const MD = require(mid + '');
15
16
17
18// const MD2 = require(p.substr());
19const MD2 = require('../md')
20
21
22class 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
52export default App;
\No newline at end of file