mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(docs): allow to pass layout src instead of full template in addLayout
This commit is contained in:
parent
2ecf9c915c
commit
c197617f65
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user