docs: use LinkExample as block component (#8459)

This commit is contained in:
Farnabaz 2022-10-25 11:33:09 +02:00 committed by GitHub
parent 452766e90e
commit 12c8949af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 32 additions and 16 deletions

View File

@ -239,7 +239,8 @@ useHead({
</script>
```
:LinkExample{link="/examples/composables/use-head"}
::LinkExample{link="/examples/composables/use-head"}
::
:ReadMore{link="/guide/directory-structure/pages/#page-metadata"}

View File

@ -32,7 +32,8 @@ const { data: count } = await useFetch('/api/count')
</template>
```
:LinkExample{link="/examples/composables/use-fetch"}
::LinkExample{link="/examples/composables/use-fetch"}
::
## `useLazyFetch`
@ -98,7 +99,8 @@ const { data } = await useAsyncData('count', () => $fetch('/api/count'))
</template>
```
:LinkExample{link="/examples/composables/use-async-data"}
::LinkExample{link="/examples/composables/use-async-data"}
::
## `useLazyAsyncData`

View File

@ -53,7 +53,8 @@ const counter = useState('counter', () => Math.round(Math.random() * 1000))
</template>
```
:LinkExample{link="/examples/composables/use-state"}
::LinkExample{link="/examples/composables/use-state"}
::
::ReadMore{link="/api/composables/use-state"}
::
@ -62,7 +63,8 @@ const counter = useState('counter', () => Math.round(Math.random() * 1000))
In this example, we use a composable that detects the user's default locale from the HTTP request headers and keeps it in a `locale` state.
:LinkExample{link="/examples/other/locale"}
::LinkExample{link="/examples/other/locale"}
::
## Shared State

View File

@ -158,4 +158,5 @@ If you navigate to another route, the error will be cleared automatically.
</template>
```
:LinkExample{link="/examples/app/error-handling"}
::LinkExample{link="/examples/app/error-handling"}
::

View File

@ -283,4 +283,5 @@ export default {
It will automatically import the components only if used and also support HMR when updating your components in `node_modules/awesome-ui/components/`.
:LinkExample{link="/examples/auto-imports/components"}
::LinkExample{link="/examples/auto-imports/components"}
::

View File

@ -46,7 +46,8 @@ const foo = useFoo()
</script>
```
:LinkExample{link="/examples/auto-imports/composables"}
::LinkExample{link="/examples/auto-imports/composables"}
::
## Examples

View File

@ -131,7 +131,8 @@ definePageMeta({
</script>
```
:LinkExample{link="/examples/routing/layouts"}
::LinkExample{link="/examples/routing/layouts"}
::
## Overriding a Layout on a Per-page Basis

View File

@ -94,4 +94,5 @@ definePageMeta({
Now, before navigation to that page can complete, the `auth` route middleware will be run.
:LinkExample{link="/examples/routing/middleware"}
::LinkExample{link="/examples/routing/middleware"}
::

View File

@ -220,7 +220,8 @@ definePageMeta({
</script>
```
:LinkExample{link="/examples/routing/pages"}
::LinkExample{link="/examples/routing/pages"}
::
## Page Metadata

View File

@ -179,4 +179,5 @@ export default defineNuxtPlugin((nuxtApp) => {
:ReadMore{link="https://vuejs.org/guide/reusability/custom-directives.html"}
:LinkExample{link="/examples/app/plugins"}
::LinkExample{link="/examples/app/plugins"}
::

View File

@ -157,4 +157,5 @@ export default defineEventHandler(event => {
})
```
:LinkExample{link="/examples/composables/use-cookie"}
::LinkExample{link="/examples/composables/use-cookie"}
::

View File

@ -111,4 +111,5 @@ const { data, pending, error, refresh } = await useFetch('/api/auth/login', {
:ReadMore{link="/getting-started/data-fetching"}
:LinkExample{link="/examples/composables/use-fetch"}
::LinkExample{link="/examples/composables/use-fetch"}
::

View File

@ -124,4 +124,5 @@ defineNuxtLink({
- **exactActiveClass**: A default class to apply on exact active links. Works the same as [Vue Router's `linkExactActiveClass` option](https://router.vuejs.org/api/#linkexactactiveclass). Defaults to Vue Router's default (`"router-link-exact-active"`)
- **prefetchedClass**: A default class to apply to links that have been prefetched.
:LinkExample{link="/examples/routing/nuxt-link"}
::LinkExample{link="/examples/routing/nuxt-link"}
::

View File

@ -37,4 +37,5 @@ The `to` target of [`<Teleport>`](https://vuejs.org/guide/built-ins/teleport.htm
</template>
```
:LinkExample{link="/examples/app/teleport"}
::LinkExample{link="/examples/app/teleport"}
::