docs: update docs for <NuxtLoadingIndicator> (#21952)

This commit is contained in:
Muhamad Jamil 2023-07-05 16:35:59 +07:00 committed by GitHub
parent e70ff83e72
commit 02a6aecd4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,13 +11,15 @@ Add `<NuxtLoadingIndicator/>` in your `app.vue` or layouts.
```vue [app.vue]
<template>
<NuxtLayout>
<NuxtLoadingIndicator /> <!-- here -->
<NuxtPage />
<div>
<NuxtLoadingIndicator /> <!-- here -->
<NuxtPage />
</div>
</NuxtLayout>
</template>
```
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/nuxt/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank}
:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/examples/tree/main/routing/pages?file=app.vue&terminal=dev" 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.