-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
29 lines (28 loc) · 959 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Vue Js ToDo UI</title>
<link rel="stylesheet" href="style.css">
<script src="https://unpkg.com/vue@3"></script>
</head>
<body>
<h1>Simple To Do List in Vue-JS 3</h1>
<div id="app">
<input v-model="newTodo"></input>
<button @click="addTodo()">Add Task</button>
<ul>
<li v-for="todo in filteredList" :key="todo.id">
<input type="checkbox" v-model="todo.done">
<span :class="{ completed: todo.done }">{{ todo.text }}</span>
<button @click="removeTodo(todo)">Remove</button>
</li>
</ul>
<button @click="hideCompleted = !hideCompleted">
{{ hideCompleted ? "Show All Tasks" : "Hide Completed Tasks"}}
</button>
</div>
</body>
<script src="app.js"></script>
</html>