2018-01-17 08:48:51 +00:00
|
|
|
# `<keep-alive>` with Nuxt.js
|
2018-01-17 08:46:48 +00:00
|
|
|
|
2018-11-24 18:49:19 +00:00
|
|
|
Introduced in v1.2.0, you can add the `keep-alive` prop to `<Nuxt/>` or `<NuxtChild/>` to "keep alive" the pages.
|
2018-01-17 08:46:48 +00:00
|
|
|
|
|
|
|
`layouts/default.vue`:
|
|
|
|
|
|
|
|
```vue
|
|
|
|
<template>
|
2018-11-24 18:49:19 +00:00
|
|
|
<Nuxt keep-alive/>
|
2018-01-17 08:46:48 +00:00
|
|
|
</template>
|
|
|
|
```
|
2018-01-17 08:52:58 +00:00
|
|
|
|
|
|
|
Screenshot:
|
|
|
|
|
|
|
|

|