-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollection.html
81 lines (80 loc) · 2.96 KB
/
collection.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
77
78
79
80
81
<!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>Data Collection</title>
</head>
<body>
<div id="app">
<table border="1">
<tr>
<th>Image</th>
<th>Title</th>
<th>Description</th>
<th>Authors</th>
<th>Price</th>
</tr>
<!-- menampilkan seluruh buku -->
<!-- <tr v-for="book of books"> -->
<!-- menampilan buku yg harganya hanya sama atau lebih dari 100000 -->
<tr v-for="(book, index) of books" :key="index" v-if="book.price >= 100000">
<td>
<!-- menggunakan v-bind -->
<img :src="'images/' + book.image" widht="30" height="30" alt="image book">
</td>
<td>{{ book.title}}</td>
<td>{{ book.description }}</td>
<td>{{ book.authors }}</td>
<td>{{ book.price }}</td>
</tr>
</table>
</div>
<script src="lib/vue.js"></script>
<script>
var vm = new Vue({
el: '#app',
data: {
books: [{
id: 99,
title: 'C++ High Performance',
description: 'Write code that scales across CPU registers, multicore and machine clusters',
authors: 'Viktor Sehr, Björn Andrist',
publish_year: 2018,
price: 100000,
image: 'app.png'
},
{
id: 102,
title: 'Python Programming Blueprints',
description: 'How to build useful, real-world applications in the Python programming language',
authors: 'Daniel Furtado, Marcus Pennington',
publish_year: 2017,
price: 75000,
image: 'bumi.jpg'
},
{
id: 102,
title: 'Python Programming Blueprints',
description: 'How to build useful, real-world applications in the Python programming language',
authors: 'Daniel Furtado, Marcus Pennington',
publish_year: 2017,
price: 150000,
image: 'garuda.jpg'
},
{
id: 102,
title: 'Python Programming Blueprints',
description: 'How to build useful, real-world applications in the Python programming language',
authors: 'Daniel Furtado, Marcus Pennington',
publish_year: 2017,
price: 80000,
image: 'luffy.jpg'
},
]
}
})
</script>
</body>
</html>