[Vuejs]-I cannot find the defaultLayout in VUE 3

0👍

In nuxt 3, you need to create the layouts folder.

To add a default layout:

  1. Create layouts folder to the root of your nuxt 3 app (path: /layouts).
  2. Create a default.vue (path: /layouts/default.vue).
  3. Add your code to your default layout.

To use the default layout in your app/page:

<template>
  <NuxtLayout>
    some page content
  </NuxtLayout>
</template>

Reference: https://nuxt.com/docs/guide/directory-structure/layouts

Leave a comment