14.09 Transitions - Animate the Showing & Hiding of Components

This commit is contained in:
Fredrick W Warren committed 2021-02-11 13:36:28 -08:00
1 parent 18b8d365ae
commit 2f86fc56ce
5 files changed
+74 -51

No files matched your search

+18 -12
View File
@@ -1,16 +1,22 @@
<template>
<q-banner class="bg-grey-3">
<template v-slot:avatar>
<q-icon name="check" color="primary" />
</template>
No tasks to do today!
<template v-slot:action>
<q-btn
@click="$root.$emit('showAddTask')"
flat color="primary"
label="Add Task" />
</template>
</q-banner>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut absolute-top"
>
<q-banner class="bg-grey-3">
<template v-slot:avatar>
<q-icon name="check" color="primary" />
</template>
No tasks to do today!
<template v-slot:action>
<q-btn
@click="$root.$emit('showAddTask')"
flat color="primary"
label="Add Task" />
</template>
</q-banner>
</transition>
</template>
<script>
+19 -13
View File
@@ -1,18 +1,24 @@
<template>
<div class="q-mt-lg">
<list-header bgColor="bg-green-4">Completed</list-header>
<q-list
separator
bordered>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut"
>
<div class="q-mt-lg">
<list-header bgColor="bg-green-4">Completed</list-header>
<q-list
separator
bordered>
<task
v-for="(task, key) in tasksCompleted"
:key="key"
:task="task"
:id="key"
></task>
</q-list>
</div>
<task
v-for="(task, key) in tasksCompleted"
:key="key"
:task="task"
:id="key"
></task>
</q-list>
</div>
</transition>
</template>
<script>
+19 -13
View File
@@ -1,19 +1,25 @@
<template>
<div>
<list-header bgColor="bg-orange-4">Todo</list-header>
<q-list
separator
bordered>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut absolute-top"
>
<div>
<list-header bgColor="bg-orange-4">Todo</list-header>
<q-list
separator
bordered>
<task
v-for="(task, key) in tasksTodo"
:key="key"
:task="task"
:id="key"
></task>
<task
v-for="(task, key) in tasksTodo"
:key="key"
:task="task"
:id="key"
></task>
</q-list>
</div>
</q-list>
</div>
</transition>
</template>
<script>
+14 -12
View File
@@ -6,20 +6,22 @@
<sort />
</div>
<p
v-if="search && !Object.keys(tasksTodo).length && !Object.keys(tasksCompleted).length">
No Search Results
</p>
<noTasks
v-if="!Object.keys(tasksTodo).length && !search" />
<div class="relative-position">
<p
v-if="search && !Object.keys(tasksTodo).length && !Object.keys(tasksCompleted).length">
No Search Results
</p>
<noTasks
v-if="!Object.keys(tasksTodo).length && !search" />
<tasks-todo
v-if="Object.keys(tasksTodo).length"
:tasksTodo="tasksTodo" />
<tasks-todo
v-if="Object.keys(tasksTodo).length"
:tasksTodo="tasksTodo" />
<tasks-completed
v-if="Object.keys(tasksCompleted).length"
:tasksCompleted="tasksCompleted" />
<tasks-completed
v-if="Object.keys(tasksCompleted).length"
:tasksCompleted="tasksCompleted" />
</div>
<div class="absolute-bottom text-center q-mb-lg">
<q-btn