mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: provide example of exposing a pageRef
from a child page (#26806)
This commit is contained in:
parent
8feb5fe5a4
commit
9119475db2
@ -86,6 +86,18 @@ function logFoo () {
|
|||||||
</template>
|
</template>
|
||||||
````
|
````
|
||||||
|
|
||||||
|
````vue [my-page.vue]
|
||||||
|
<script setup lang="ts">
|
||||||
|
const foo = () => {
|
||||||
|
console.log('foo method called')
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
foo,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
````
|
||||||
|
|
||||||
## Custom Props
|
## Custom Props
|
||||||
|
|
||||||
In addition, `<NuxtPage>` also accepts custom props that you may need to pass further down the hierarchy.
|
In addition, `<NuxtPage>` also accepts custom props that you may need to pass further down the hierarchy.
|
||||||
|
Loading…
Reference in New Issue
Block a user