docs: add props to special metadata (#29708)

This commit is contained in:
xjccc 2024-11-02 17:41:15 +08:00 committed by GitHub
parent 0ecb42b81d
commit 5f330ad025
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,6 +323,10 @@ You may define a name for this page's route.
You may define a path matcher, if you have a more complex pattern than can be expressed with the file name. See [the `vue-router` docs](https://router.vuejs.org/guide/essentials/route-matching-syntax.html#custom-regex-in-params) for more information. You may define a path matcher, if you have a more complex pattern than can be expressed with the file name. See [the `vue-router` docs](https://router.vuejs.org/guide/essentials/route-matching-syntax.html#custom-regex-in-params) for more information.
#### `props`
Allows accessing the route `params` as props passed to the page component. See[the `vue-router` docs](https://router.vuejs.org/guide/essentials/passing-props) for more information.
### Typing Custom Metadata ### Typing Custom Metadata
If you add custom metadata for your pages, you may wish to do so in a type-safe way. It is possible to augment the type of the object accepted by `definePageMeta`: If you add custom metadata for your pages, you may wish to do so in a type-safe way. It is possible to augment the type of the object accepted by `definePageMeta`: