add page transition

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2022-12-22 01:57:55 +06:00
parent e2d3b00816
commit 7949eaa67a
2 changed files with 14 additions and 0 deletions

11
app.vue
View File

@@ -6,3 +6,14 @@
</NuxtLayout>
</div>
</template>
<style>
.page-enter-active,
.page-leave-active {
transition: all 0.4s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
</style>

View File

@@ -1,5 +1,8 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
pageTransition: { name: "page", mode: "out-in" },
},
typescript: {
strict: true,
},