-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (79 loc) · 3.08 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
71
72
73
74
75
76
77
78
79
80
81
82
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Template • TodoMVC</title>
<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
<!-- CSS overrides - remove if you don't need it -->
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<section id="app" class="todoapp">
<header class="header">
<h1>todos</h1>
<input
v-focus
class="new-todo"
placeholder="What needs to be done?"
v-model="newTodo"
@keyup.enter="addTodo">
</header>
<section class="main" v-if="dataList.length">
<input id="toggle-all" class="toggle-all" type="checkbox" v-model="toggleAll">
<label for="toggle-all">Mark all as complete</label>
<ul class="todo-list">
<li
:class="{completed:item.isFinish}"
v-for="(item,index) in dataList"
:key="item.id"
ref="edit"
@dblclick.prevent="editTodo(index)">
<div class="view">
<input class="toggle" type="checkbox" :checked="item.isFinish" v-model="item.isFinish">
<label>{{ item.content }}</label>
<button class="destroy" @click="delTodo(index)">
</button>
</div>
<input class="edit" @keyup.enter="updateTodo(index)" @keyup.esc="escTodo(index)" v-model="item.content" v-focus>
</li>
</ul>
</section>
<footer class="footer" v-if="dataList.length">
<span class="todo-count">
<strong>{{ activeNum }}</strong> item left</span>
<ul class="filters">
<li>
<a :class="{selected: activeBtn === 1}" href="#/">All</a>
</li>
<li>
<a :class="{selected: activeBtn === 2}" href="#/active">Active</a>
</li>
<li>
<a :class="{selected: activeBtn === 3}" href="#/completed">Completed</a>
</li>
</ul>
<button
class="clear-completed"
v-if="activeNum !== dataList.length"
@click.prevent="delAllTodo">Clear completed</button>
</footer>
</section>
<footer class="info">
<p>Double-click to edit a todo</p>
<p>Template by
<a href="http://sindresorhus.com">Sindre Sorhus</a>
</p>
<p>Created by
<a href="http://todomvc.com">you</a>
</p>
<p>Part of
<a href="http://todomvc.com">TodoMVC</a>
</p>
</footer>
<script src="node_modules/todomvc-common/base.js"></script>
<script src="node_modules/vue/dist/vue.js"></script>
<script src="js/app.js"></script>
</body>
</html>