docs: add warning about definePageMeta issues with transitions and NuxtLoadingIndicator (#9055)

Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
Conner 2022-11-16 15:06:36 +01:00 committed by GitHub
parent 780b17b196
commit 3aadc57be5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,10 @@ export default defineNuxtConfig({
}) })
``` ```
::alert{type=warning}
If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition.
::
To start adding transition between your pages, add the following CSS to your [`app.vue`](/docs/guide/directory-structure/app): To start adding transition between your pages, add the following CSS to your [`app.vue`](/docs/guide/directory-structure/app):
::code-group ::code-group

View File

@ -19,6 +19,10 @@ Add `<NuxtLoadingIndicator/>` in your `app.vue` or layouts.
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank} :button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank}
::alert{type=warning}
If you are changing layouts as well as page, the page transition you set here will not run. Instead, you should set a layout transition.
::
## Slots ## Slots
You can pass custom HTML or components through the loading indicator's default slot. You can pass custom HTML or components through the loading indicator's default slot.