mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
docs: Update 2.nuxt-page.md (#8761)
This commit is contained in:
parent
fe433a4222
commit
2376c1147f
@ -31,7 +31,7 @@ For example, passing `static` key, `NuxtPage` component is rendered only once wh
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- static key -->
|
<!-- static key -->
|
||||||
<NuxtPage page-key=“static” />
|
<NuxtPage page-key="static" />
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, `pageKey` can be passed as a `key` value via `definePageMeta` from the `<script>` section of your Vue component in the `/pages` directory.
|
Alternatively, `pageKey` can be passed as a `key` value via `definePageMeta` from the `<script>` section of your Vue component in the `/pages` directory.
|
||||||
@ -51,7 +51,7 @@ definePageMeta({
|
|||||||
In addition, `NuxtPage` also accepts custom props that you may need to pass further down the hierarchy. These custom props are accessible via `attrs` in the Nuxt app.
|
In addition, `NuxtPage` also accepts custom props that you may need to pass further down the hierarchy. These custom props are accessible via `attrs` in the Nuxt app.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<NuxtPage :foobar=“123” />
|
<NuxtPage :foobar="123" />
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, in above example, value of `foobar` will be available using `attrs.foobar`.
|
For example, in above example, value of `foobar` will be available using `attrs.foobar`.
|
||||||
|
Loading…
Reference in New Issue
Block a user