mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
docs: add note that layout root cannot be <slot />
(#4151)
This commit is contained in:
parent
7e0b30f66e
commit
114ec8982d
@ -13,7 +13,7 @@ Layouts are placed in the `layouts/` directory and will be automatically loaded
|
|||||||
If you only have a single layout in your application, we recommend to use [app.vue](/guide/directory-structure/app) instead.
|
If you only have a single layout in your application, we recommend to use [app.vue](/guide/directory-structure/app) instead.
|
||||||
|
|
||||||
::alert{type=warning}
|
::alert{type=warning}
|
||||||
Unlike other components, your layouts must have a single root element to allow Nuxt to apply transitions between layout changes.
|
Unlike other components, your layouts must have a single root element to allow Nuxt to apply transitions between layout changes - and this root element cannot be a `<slot />`.
|
||||||
::
|
::
|
||||||
|
|
||||||
## Example: Enabling layouts with `app.vue`
|
## Example: Enabling layouts with `app.vue`
|
||||||
|
Loading…
Reference in New Issue
Block a user