-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomputeData.html
55 lines (40 loc) · 1.27 KB
/
computeData.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
<html>
<heade>
<title>Teste6</title>
</heade>
<body>
<div id="root">
<h1>All Tasks</h1>
<ul>
<li v-for="task in tasks" v-text="task.description"></li>
</ul>
<h2>Completed Tasks</h2>
<ul>
<li v-for="task in completedTasks" v-text="task.description"></li>
</ul>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script>
new Vue({
el: '#root',
data: {
tasks: [
{ description: 'Go to the store', completed: false },
{ description: 'finish screen cast', completed: true },
{ description: 'learn no javascript', completed: true },
{ description: 'Give more atention for may mother', completed: false },
{ description: 'be happy', completed: false },
{ description: 'lost more weight', completed: false },
]
},
computed:{
completedTasks(){
return this.tasks.filter( task => task.completed);
}
},
methods: {
}
})
</script>
</body>
</html>