11.2 Add the Search Bar Markup

This commit is contained in:
Fredrick W Warren 2021-02-10 12:13:14 -08:00
parent 4cbf3f043a
commit cbd65f1b0c
3 changed files with 44 additions and 2 deletions

View File

@ -5,7 +5,10 @@
</template> </template>
No tasks to do today! No tasks to do today!
<template v-slot:action> <template v-slot:action>
<q-btn flat color="primary" label="Add Task" /> <q-btn
@click="$root.$emit('showAddTask')"
flat color="primary"
label="Add Task" />
</template> </template>
</q-banner> </q-banner>
</template> </template>

View File

@ -0,0 +1,32 @@
<template>
<q-input
outlined
v-model="searchField"
class="col"
label="Search" >
<template v-slot:append>
<q-icon
v-if="searchField !== ''"
name="close"
@click="searchField = ''"
clas="cursor-pointer" />
<q-icon name="search" />
</template>
</q-input>
</template>
<script>
export default {
name: 'Search',
data () {
return {
searchField: ''
}
}
}
</script>
<style>
</style>

View File

@ -1,5 +1,10 @@
<template> <template>
<q-page class="q-pa-md"> <q-page class="q-pa-md">
<div class="row q-mb-lg">
<search />
</div>
<noTasks <noTasks
v-if="!Object.keys(tasksTodo).length" /> v-if="!Object.keys(tasksTodo).length" />
@ -34,6 +39,7 @@ import tasksTodo from 'components/Tasks/TasksTodo.vue'
import noTasks from 'components/Tasks/NoTasks.vue' import noTasks from 'components/Tasks/NoTasks.vue'
import tasksCompleted from 'components/Tasks/TasksCompleted.vue' import tasksCompleted from 'components/Tasks/TasksCompleted.vue'
import addTask from 'components/Tasks/Modals/AddTask.vue' import addTask from 'components/Tasks/Modals/AddTask.vue'
import search from 'components/Tasks/Tools/Search.vue'
export default { export default {
name: 'PageTodo', name: 'PageTodo',
@ -41,7 +47,8 @@ export default {
tasksTodo, tasksTodo,
tasksCompleted, tasksCompleted,
addTask, addTask,
noTasks noTasks,
search
}, },
data () { data () {
return { return {