diff --git a/docs/content/docs/5.v9/2.guide/19.breaking-changes-in-v9.md b/docs/content/docs/5.v9/2.guide/19.breaking-changes-in-v9.md index dac7ba993..7c558a050 100644 --- a/docs/content/docs/5.v9/2.guide/19.breaking-changes-in-v9.md +++ b/docs/content/docs/5.v9/2.guide/19.breaking-changes-in-v9.md @@ -64,3 +64,17 @@ Some properties have changed or swapped names to better fit their functionality, ## SEO - `useLocaleHead` We have added a `addLangAttribute` property to the options parameter of `useLocaleHead` and `$localeHead`, originally this was not configurable on its own. If you want to keep the same behavior, if you were passing `addSeoAttributes`, you will also have to pass `addLangAttribute: true`. See [`useLocaleHead`](/docs/v9/api#useLocaleHead) + +## Nuxt context functions + +In v8 both the types and name of the injected context functions (such as `$localePath`, `$switchLocalePath` and [more](/docs/v9/api/nuxt)) did not work as intended. You may have found that these functions worked when using them without prefix (`$`) even when not assigning these functions from a composable. + +The types and names have been fixed in v9, if you have been using the unprefixed functions globally (without composable) in your project you will have to prefix these functions as they were originally intended. + +- `getRouteBaseName` -> `$getRouteBaseName` +- `resolveRoute` -> `$resolveRoute` +- `localePath` -> `$localePath` +- `localeRoute` -> `$localeRoute` +- `localeLocation` -> `$localeLocation` +- `switchLocalePath` -> `$switchLocalePath` +- `localeHead` -> `$localeHead` diff --git a/playground/pages/[...catch].vue b/playground/pages/[...catch].vue index c1f1b483f..8c99d4bbd 100644 --- a/playground/pages/[...catch].vue +++ b/playground/pages/[...catch].vue @@ -19,7 +19,7 @@ definePageMeta({

This page is catch all: '{{ route.params }}'

diff --git a/playground/pages/about/index.vue b/playground/pages/about/index.vue index 6c64a43e5..85f73ca60 100644 --- a/playground/pages/about/index.vue +++ b/playground/pages/about/index.vue @@ -40,11 +40,11 @@ export default defineComponent({ diff --git a/playground/pages/category/[id].vue b/playground/pages/category/[id].vue index fb326165d..e8a3005dd 100644 --- a/playground/pages/category/[id].vue +++ b/playground/pages/category/[id].vue @@ -19,7 +19,7 @@ definePageMeta({

This is cateory page on '{{ route.params.id }}'