-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
63 lines (60 loc) · 2.44 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
<div class="container" id="app">
<div class="row">
<div class="jumbotron">
<h1>GraphQL Client Test !</h1>
<div class="form-inline">
<div class="form-group">
<label>Name : </label>
<input type="text" class="form-control" placeholder="Name" v-model="productName">
</div>
<div class="form-group">
<label>Price : </label>
<input type="text" class="form-control" placeholder="10xx" v-model="productPrice">
</div>
<div class="form-group">
<label>Category</label>
<input type="text" class="form-control" placeholder="separate by commma ','" v-model="productCategory">
</div>
<button type="submit" class="btn btn-primary" v-on:click="addProduct">Submit</button>
</div>
</div>
</div>
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th>No.</th>
<th>Name</th>
<th>Price</th>
<th>Category</th>
<th>Tools</th>
</tr>
</thead>
<tbody>
<tr v-for="(product, index) in products">
<td>{{ index +1 }}</td>
<td>{{ product.name }}</td>
<td>{{ product.price }}</td>
<td>{{ product.category }}</td>
<td>
<button class="btn btn-danger" v-on:click="deleteProduct(product._id)">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script type="text/javascript" src="./dist/bundle.js"></script>
</body>
</html>