@nuxt/docs-nightly 4.7.0-2611271444-2a79232 → 4.7.0-2611271617-fe710d0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,6 +63,9 @@ The boundary catches everything thrown while rendering its default slot, includi
|
|
|
63
63
|
<!-- ... -->
|
|
64
64
|
<template #error="{ error, clearBoundaryError }">
|
|
65
65
|
<p>An error occurred: {{ error }}</p>
|
|
66
|
+
<p v-if="error.status">
|
|
67
|
+
{{ error.status }} {{ error.statusText }}
|
|
68
|
+
</p>
|
|
66
69
|
|
|
67
70
|
<button @click="clearBoundaryError">
|
|
68
71
|
Clear error
|
|
@@ -72,6 +75,8 @@ The boundary catches everything thrown while rendering its default slot, includi
|
|
|
72
75
|
</template>
|
|
73
76
|
```
|
|
74
77
|
|
|
78
|
+
The `error` prop is an `Error` that may also carry `status`, `statusText`, `data`, `cause` and `fatal`. A server-side error is always a `NuxtError`, so the fields exist, though `statusText`, `data` and `cause` are `undefined` when Nuxt does not know them. An error thrown on the client is passed through as it was thrown, so the fields are only present when the thrown error carried them, for example an error created with [`createError`](/docs/api/utils/create-error).
|
|
79
|
+
|
|
75
80
|
::warning
|
|
76
81
|
The slot also exposes `clearError` as a deprecated alias of `clearBoundaryError`. Use `clearBoundaryError`: if a template does not destructure `clearError` from the slot props, it calls the auto-imported [`clearError`](/docs/api/utils/clear-error) instead, which clears the **global** error.
|
|
77
82
|
::
|
|
@@ -151,7 +151,7 @@ interface PageMeta {
|
|
|
151
151
|
|
|
152
152
|
- **Type**: `boolean | (to: RouteLocationNormalized, from: RouteLocationNormalized) => boolean`
|
|
153
153
|
|
|
154
|
-
Tell Nuxt to scroll to the top before rendering the page or not. Navigation is independent from rendering, so scroll behavior is always triggered even when the page doesn't re-render (e.g. when using a fixed
|
|
154
|
+
Tell Nuxt to scroll to the top before rendering the page or not. Navigation is independent from rendering, so scroll behavior is always triggered even when the page doesn't re-render (e.g. when using a fixed `key`). Set `scrollToTop: false` to disable scrolling in such cases. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/router.options.ts` (see [custom routing](/docs/guide/recipes/custom-routing#using-routeroptions)) for more info.
|
|
155
155
|
|
|
156
156
|
**`[key: string]`**
|
|
157
157
|
|