fix(docs): allow to pass layout src instead of full template in addLayout

This commit is contained in:
Andrey Yolkin 2023-08-30 12:51:22 +03:00
parent 2ecf9c915c
commit c197617f65
No known key found for this signature in database
GPG Key ID: 4A2899263001EA49

View File

@ -1505,7 +1505,7 @@ In Nuxt 2 `error` layout can also be registered using this utility. In Nuxt 3 `e
#### Type
```ts
function addLayout (layout: NuxtTemplate, name: string): void
function addLayout (layout: NuxtTemplate | string, name: string): void
interface NuxtTemplate {
src?: string
@ -1521,11 +1521,11 @@ interface NuxtTemplate {
##### `layout`
**Type**: `NuxtTemplate`
**Type**: `NuxtTemplate | string`
**Required**: `true`
A template object with the following properties:
A template object or a string with the path to the template. If a string is provided, it will be converted to a template object with `src` set to the string value. If a template object is provided, it must have the following properties:
- `src` (optional)