14.09 Transitions - Animate the Showing & Hiding of Components

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

View File

@ -106,7 +106,10 @@ module.exports = function (/* ctx */) {
// animations: 'all', // --- includes all animations // animations: 'all', // --- includes all animations
// https://quasar.dev/options/animations // https://quasar.dev/options/animations
animations: [], animations: [
'zoomIn',
'zoomOut'
],
// https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr // https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: { ssr: {

View File

@ -1,4 +1,9 @@
<template> <template>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut absolute-top"
>
<q-banner class="bg-grey-3"> <q-banner class="bg-grey-3">
<template v-slot:avatar> <template v-slot:avatar>
<q-icon name="check" color="primary" /> <q-icon name="check" color="primary" />
@ -11,6 +16,7 @@
label="Add Task" /> label="Add Task" />
</template> </template>
</q-banner> </q-banner>
</transition>
</template> </template>
<script> <script>

View File

@ -1,4 +1,9 @@
<template> <template>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut"
>
<div class="q-mt-lg"> <div class="q-mt-lg">
<list-header bgColor="bg-green-4">Completed</list-header> <list-header bgColor="bg-green-4">Completed</list-header>
<q-list <q-list
@ -13,6 +18,7 @@
></task> ></task>
</q-list> </q-list>
</div> </div>
</transition>
</template> </template>
<script> <script>

View File

@ -1,4 +1,9 @@
<template> <template>
<transition
appear
enter-active-class="animated zoomIn"
leave-active-class="animated zoomOut absolute-top"
>
<div> <div>
<list-header bgColor="bg-orange-4">Todo</list-header> <list-header bgColor="bg-orange-4">Todo</list-header>
<q-list <q-list
@ -14,6 +19,7 @@
</q-list> </q-list>
</div> </div>
</transition>
</template> </template>
<script> <script>

View File

@ -6,6 +6,7 @@
<sort /> <sort />
</div> </div>
<div class="relative-position">
<p <p
v-if="search && !Object.keys(tasksTodo).length && !Object.keys(tasksCompleted).length"> v-if="search && !Object.keys(tasksTodo).length && !Object.keys(tasksCompleted).length">
No Search Results No Search Results
@ -20,6 +21,7 @@
<tasks-completed <tasks-completed
v-if="Object.keys(tasksCompleted).length" v-if="Object.keys(tasksCompleted).length"
:tasksCompleted="tasksCompleted" /> :tasksCompleted="tasksCompleted" />
</div>
<div class="absolute-bottom text-center q-mb-lg"> <div class="absolute-bottom text-center q-mb-lg">
<q-btn <q-btn