Skip to content

Commit

Permalink
docs: fix suspense example
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Sep 29, 2021
1 parent 5dd5f47 commit a56fce2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/api/index.md
Expand Up @@ -168,21 +168,21 @@ If you add a `target="_blank"` to your `a` element, you must omit the `@click="n
`<router-view>` exposes a `v-slot` API mainly to wrap your route components with `<transition>` and `<keep-alive>` components.

```html
<Suspense>
<template #default>
<router-view v-slot="{ Component, route }">
<transition :name="route.meta.transition || 'fade'" mode="out-in">
<keep-alive>
<router-view v-slot="{ Component, route }">
<transition :name="route.meta.transition || 'fade'" mode="out-in">
<keep-alive>
<suspense>
<template #default>
<component
:is="Component"
:key="route.meta.usePathKey ? route.path : undefined"
/>
</keep-alive>
</transition>
</router-view>
</template>
<template #fallback> Loading... </template>
</Suspense>
</template>
<template #fallback> Loading... </template>
</suspense>
</keep-alive>
</transition>
</router-view>
```

- `Component`: VNodes to be passed to a `<component>`'s `is` prop.
Expand Down

0 comments on commit a56fce2

Please sign in to comment.