-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (51 loc) · 2.04 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
64
65
66
67
68
69
70
<!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">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="app">
<!--v-for loop-->
<ul>
<li v-for="(item,index) in items">{{ index }} || {{ item.name }} || {{ item.price }} || {{ item.quantity }}</li>
</ul>
<!--if else-if condition-->
<h1 v-if="count > 10">Greater than 10</h1>
<h1 v-else-if="count > 5">Greater than 5</h1>
<!--modifier here alt shift is key of keyboard-->
<button @click.alt="message2">Click</button>
<button @click.shift="message2">Click</button>
<a v-bind:href="link" @click.prevent>Google</a>
<!--2 way data binding-->
My name is : {{ name }} <br>
<input type="text" v-model="name">
<!--Key up event (like on change event syn mode)-->
<input type="text" @keyup="show">
<!--Key press (like on change event asyn mode)-->
<input type="text" @keypress="show2">
<!--Event object-->
<div class="canvas" @mousemove="over">{{ log.x }},{{ log.y }}</div>
<!--Double Click event with method-->
<h1>Count : {{ count }}</h1>
<button @dblclick="amount(5)">Increase 5</button>
<button @dblclick="amount(-5)">Decrease 5</button>
<!--Click event without method-->
<h1>Count : {{ count }}</h1>
<button @click="count++">Increase</button>
<button @click="count--">Decrease</button>
<!--one way data binding-->
<a v-bind:href="link">Google</a>
<h2 :class="classes">Sajeeb Chakraborty</h2>
<h1>{{ message }}</h1>
<h2>{{ myOutcome() }}</h2>
<h2>{{ myAge() }}</h2>
<h3>{{ myAge2(25) }}</h3>
</div>
<script src="app.js"></script>
</body>
</html>