-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (73 loc) · 1.48 KB
/
index.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
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.red{
color: red;
}
.green{
color: green;
}
</style>
</head>
<body>
<div id="test">
name:{{name}}
age:{{age}}
<span>
年龄:{{age}}
</span>
<p>
省份:{{address.province}}
城市:{{address.city}}
</p>
请输入:<input type="text" v-model="address.city">
<ul>
<li v-for="(item) in list">
a:{{item.a}}
b:{{item.b}}
</li>
</ul>
<img :src="text"></img>
<div>
<span :class="{red: name === 'xiaoliu'}">{{text}}</span>
<span :class="{green: age > 2}">{{text}}</span>
</div>
</div>
<script type="module">
import Due from './index.js'
const test = new Due({
el: 'test',
data: {
name: 'liushuaiyang',
age: 20,
address: {
province: '河南省',
city: '郑州市',
},
text:"这是一段文本",
list: [
{
a: 1,
b: 2
},
{
a:2,
b:3
},
]
},
methods:{
enter(){
console.log('enter',this)
}
}
});
window.test = test;
</script>
</body>
</html>