-
Notifications
You must be signed in to change notification settings - Fork 0
/
test7.html
46 lines (38 loc) · 1.07 KB
/
test7.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> Document</title>
<script src="F:/前端/vue-2.4.0/vue-2.4.0/dist/vue.js"></script>
</head>
<body>
<div id="app">
<p v-for="f in fruitlist" :key="f.id">
{{f.name}}------{{f.price | A}}
</p>
</div>
<script>
//vm对象是mvvm中的vm,调度者
Vue.filter("A",function(value){
return value*0.1;
})
var vm = new Vue({
el:"#app",
data:{
//m,数据区
fruitlist:[
{"id":"1","name":"apple","price":80},
{"id":"2","name":"pear","price":90},
{"id":"3","name":"orange","price":100}
],
"num1":0,
"num2":0,
"sign":"aaa",
"currentTime":new Date(),
},
methods:{
}
});
</script>
</body>
</html>