-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetCode.html
67 lines (58 loc) · 1.49 KB
/
netCode.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.testAtrribute{
width: 200px;
height: 400px;
/*float: left;*/
display: flex;
/*flex-wrap: nowrap;*/
background:#3771bb;
}
</style>
</head>
<body>
<div id='app'>
<my-cnp></my-cnp>
<my-cnp2></my-cnp2>
</div>
<div class='testAtrribute'></div>
<span>sdfawef</span>
<div class='testAtrribute'></div>
<div class='testAtrribute'></div>
</body>
<!-- 开发环境版本,包含了有帮助的命令行警告 --> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
const myCnp2 = Vue.extend({
template:`
<div>
<h1>I'm Vue</h1>
<h3>Hello world!</h3>
</div>
`
})
const myCnp1 = Vue.extend({
template:`
<div>
<h1>I'm Huangchengcheng</h1>
<h3>Nice to meet you!</h3>
<innerCnp></innerCnp>
</div>
`,
components:{
"innerCnp":myCnp2
}
})
const app=new Vue({
el:"#app",
components:{
"my-cnp":myCnp1,
'my-cnp2':myCnp2
}
})
</script>
</html>