-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.html
46 lines (38 loc) · 1.01 KB
/
router.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>20180525_react</title>
<link rel="styleshee" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/antd/3.10.7/antd.css"/>
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<style>
.box {
padding: 20px;
border: 1px black dashed;
}
#root {
padding-bottom: 500px;
}
</style>
</head>
<body>
<div id="root">
</div>
<script type="text/babel">
class Router {
constructor(){
this.routes = {};
this.currentUrl = "";
}
init(router){
this.routes = router.map(route => {
return {
}
})
}
}
</script>
</body>
</html>