From a58d2e7b39b327814ea2b634e301f4c9ca3bb402 Mon Sep 17 00:00:00 2001 From: Bochkarev Ivan Date: Fri, 28 Jun 2024 17:49:16 +0600 Subject: [PATCH] docs: update links to `vue-router` docs (#27895) --- docs/3.api/1.components/4.nuxt-link.md | 2 +- docs/3.api/2.composables/use-route.md | 2 +- docs/3.api/3.utils/define-nuxt-route-middleware.md | 4 ++-- docs/3.api/3.utils/navigate-to.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/3.api/1.components/4.nuxt-link.md b/docs/3.api/1.components/4.nuxt-link.md index b623d1ce5a..009616779c 100644 --- a/docs/3.api/1.components/4.nuxt-link.md +++ b/docs/3.api/1.components/4.nuxt-link.md @@ -111,7 +111,7 @@ When you need to overwrite this behavior you can use the `rel` and `noRel` props When not using `external`, `` supports all Vue Router's [`RouterLink` props](https://router.vuejs.org/api/interfaces/RouterLinkProps.html) -- `to`: Any URL or a [route location object](https://router.vuejs.org/api/interfaces/RouteLocation.html) from Vue Router +- `to`: Any URL or a [route location object](https://router.vuejs.org/api/#RouteLocation) from Vue Router - `custom`: Whether `` should wrap its content in an `` element. It allows taking full control of how a link is rendered and how navigation works when it is clicked. Works the same as [Vue Router's `custom` prop](https://router.vuejs.org/api/interfaces/RouterLinkProps.html#Properties-custom) - `exactActiveClass`: A class to apply on exact active links. Works the same as [Vue Router's `exact-active-class` prop](https://router.vuejs.org/api/interfaces/RouterLinkProps.html#Properties-exactActiveClass) on internal links. Defaults to Vue Router's default `"router-link-exact-active"`) - `replace`: Works the same as [Vue Router's `replace` prop](https://router.vuejs.org/api/interfaces/RouteLocationOptions.html#Properties-replace) on internal links diff --git a/docs/3.api/2.composables/use-route.md b/docs/3.api/2.composables/use-route.md index 2ce1ad9bcd..853fecf83c 100644 --- a/docs/3.api/2.composables/use-route.md +++ b/docs/3.api/2.composables/use-route.md @@ -48,4 +48,4 @@ Apart from dynamic parameters and query parameters, `useRoute()` also provides t Browsers don't send [URL fragments](https://url.spec.whatwg.org/#concept-url-fragment) (for example `#foo`) when making requests. So using `route.fullPath` in your template can trigger hydration issues because this will include the fragment on client but not the server. :: -:read-more{icon="i-simple-icons-vuedotjs" to="https://router.vuejs.org/api/interfaces/RouteLocationNormalizedLoaded.html"} +:read-more{icon="i-simple-icons-vuedotjs" to="https://router.vuejs.org/api/#RouteLocationNormalizedLoaded"} diff --git a/docs/3.api/3.utils/define-nuxt-route-middleware.md b/docs/3.api/3.utils/define-nuxt-route-middleware.md index 590436f9ed..c75f0ffb74 100644 --- a/docs/3.api/3.utils/define-nuxt-route-middleware.md +++ b/docs/3.api/3.utils/define-nuxt-route-middleware.md @@ -28,7 +28,7 @@ interface RouteMiddleware { A function that takes two Vue Router's route location objects as parameters: the next route `to` as the first, and the current route `from` as the second. -Learn more about available properties of `RouteLocationNormalized` in the **[Vue Router docs](https://router.vuejs.org/api/interfaces/RouteLocationNormalized.html)**. +Learn more about available properties of `RouteLocationNormalized` in the **[Vue Router docs](https://router.vuejs.org/api/#RouteLocationNormalized)**. ## Examples @@ -53,7 +53,7 @@ Use [`useState`](/docs/api/composables/use-state) in combination with `navigateT ```ts [middleware/auth.ts] export default defineNuxtRouteMiddleware((to, from) => { const auth = useState('auth') - + if (!auth.value.isAuthenticated) { return navigateTo('/login') } diff --git a/docs/3.api/3.utils/navigate-to.md b/docs/3.api/3.utils/navigate-to.md index 6117a38c59..d6f8a3f27a 100644 --- a/docs/3.api/3.utils/navigate-to.md +++ b/docs/3.api/3.utils/navigate-to.md @@ -115,7 +115,7 @@ Make sure to always use `await` or `return` on result of `navigateTo` when calli ### `to` -**Type**: [`RouteLocationRaw`](https://router.vuejs.org/api/interfaces/RouteLocation.html) | `undefined` | `null` +**Type**: [`RouteLocationRaw`](https://router.vuejs.org/api/interfaces/RouteLocationOptions.html#Interface-RouteLocationOptions) | `undefined` | `null` **Default**: `'/'`