-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.html
51 lines (46 loc) · 1.51 KB
/
vue.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<link rel="stylesheet" href="https://bootswatch.com/5/slate/bootstrap.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="300" />
<title>First Page</title>
</head>
<body>
<div id="app" class="container text-center">
<div class="row">
<div class="col"></div>
<div class="col">
<div class="card">
<h1>Counter: {{ counter }}</h1>
<button @click="increment" class="btn btn-success">Increment</button>
<button @click="decrement" class="btn btn-danger">Decrement</button>
</div>
</div>
<div class="col"></div>
</div>
</div>
<script>
const app = Vue.createApp({
data() {
return {
counter: 0
};
},
methods: {
increment() {
this.counter++;
},
decrement() {
this.counter--;
}
}
});
app.mount('#app');
</script>
</body>
</html>