-
Notifications
You must be signed in to change notification settings - Fork 16
/
addTask.vue
61 lines (59 loc) · 1.3 KB
/
addTask.vue
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
<template>
<aside class="mx-auto flex justify-between mt-24 px-4">
<label for="add task" class="flex-1">
<input
type="text"
name="add task"
class="
todo-add-task-input
px-4
py-2
placeholder-blueGray-300
text-blueGray-600
bg-white
rounded
text-sm
border border-blueGray-300
outline-none
focus:outline-none focus:ring
w-full
"
placeholder="Enter Task"
/>
</label>
<button
type="button"
class="
todo-add-task
bg-transparent
hover:bg-green-500
text-green-700 text-sm
hover:text-white
px-3
py-2
border border-green-500
hover:border-transparent
rounded
"
@click="addTask"
>
Add Task
</button>
</aside>
</template>
<script>
import { defineComponent } from '@nuxtjs/composition-api'
export default defineComponent({
emits: ['newTask'],
methods: {
addTask() {
/**
* @todo Complete this function.
* @todo 1. Send the request to add the task to the backend server.
* @todo 2. Add the task in the dom.
* @hint use emit to make a event that parent can observe
*/
},
},
})
</script>