Home > front end >  I cant see index page in nuxt2
I cant see index page in nuxt2

Time:01-21

I'm having trouble solving one of the problems I've been given. I can't see my index page in the pages folder, where could the problem come from?

index.vue

<template>
 <h1>
  Hello world
 </h1>
</template>

I made another page with about address but it still had this problem.

Update default.vue

<template>
    <v-app :dark="setTheme"  :rtl="true">
      <v-toolbar
        dense
        flat
        color="#fafafa00"
        style="position: fixed; top: 0px; right: 0px; z-index: 5;"
      >
        <v-menu offset-y transition="slide-y-transition">
          <template #activator="{ on }">
            <v-btn  small text icon v-on="on">
              <v-icon>mdi-apps</v-icon>
            </v-btn>
            <template>
              <my-menu-app/>
            </template>
          </template>
          <menuCard/>
        </v-menu>
      </v-toolbar>
    </v-app>
</template>

CodePudding user response:

Your problem is your layout. add Nuxt tag for render your page.

<template>
    <v-app :dark="setTheme"  :rtl="true">
      <v-toolbar
        dense
        flat
        color="#fafafa00"
        style="position: fixed; top: 0px; right: 0px; z-index: 5;"
      >
        <v-menu offset-y transition="slide-y-transition">
          <template #activator="{ on }">
            <v-btn  small text icon v-on="on">
              <v-icon>mdi-apps</v-icon>
            </v-btn>
            <template>
              <my-menu-app/>
            </template>
          </template>
          <menuCard/>
        </v-menu>
      </v-toolbar>
<Nuxt/>                     // add Nuxt tag in your layout
    </v-app>
</template>
  • Related