-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (26 loc) · 1.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
<!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>TodoList</title>
<link rel="stylesheet" href="style.css">
<script src="https://cn.vuejs.org/js/vue.js"></script>
</head>
<body>
<div id="app">
<input type="text" placeholder="What todo" v-model="todo" @keyup.enter="add(todo)">
<ul>
<li v-for="item in list" >
<span :class="{ crossline : item.done}">{{item.content}}</span>
<a href="#" @click.prevent="remove(item)">Remove</a>
<input type="checkbox" v-model="item.done">
</li>
</ul>
<button type="button" @click.prevent="removeall()">Delete all</button>
<button type="button" @click.prevent="checkall()">All Done</button>
<button type="button" @click.prevent="uncheckall()">All Undone</button>
<script src="app.js"></script>
</body>
</html>