-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (25 loc) · 817 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue-ToDo</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<div id="app">
<input type="text" v-model="newTask">
<button @click="addTask">Add task</button>
<div>
<ul v-for="task in tasks" v-if="task.show">
<li v-text="task.description" :class="{ completed: task.completed }"></li>
<button v-show="!task.completed" @click="markCompleted(task)">Mark as completed</button>
</ul>
</div>
<button @click="filterOpen">Only show open Tasks</button>
<button @click="filterCompleted">Only show completed Tasks</button>
<button @click="showAllTasks">Show All Tasks</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="main.js"></script>
</body>
</html>