docs: Update 2.nuxt-page.md (#8761)

This commit is contained in:
cx33 2022-11-07 17:16:34 +08:00 committed by GitHub
parent fe433a4222
commit 2376c1147f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ For example, passing `static` key, `NuxtPage` component is rendered only once wh
```html
<!-- 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.
@ -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.
```html
<NuxtPage :foobar=“123” />
<NuxtPage :foobar="123" />
```
For example, in above example, value of `foobar` will be available using `attrs.foobar`.