0
votes

I'm trying to create a navbar for Vue application, I'm using Vuetify, on large screen there is toolbar, on small there is hamburger icon which opens the navigation drawer.

It works, but there is an overlay that comes in front of drawer and I can't change a page.

Here is the code:

<template>
  <div>
    <v-app-bar dark>
      <v-app-bar-nav-icon class="hidden-md-and-up" @click="sidebar = !sidebar"></v-app-bar-nav-icon>
      <v-navigation-drawer v-model="sidebar" app>
        <v-list>
          <v-list-item v-for="(item, i) in menuItems" exact :key="i" :to="item.path">{{item.title}}</v-list-item>
        </v-list>
      </v-navigation-drawer>
      <v-toolbar-title>Jobify</v-toolbar-title>

      <v-spacer></v-spacer>

      <v-toolbar-items class="hidden-sm-and-down">
        <v-btn text v-for="item in menuItems" :key="item.title">
          <router-link :to="item.path">{{item.title}}</router-link>
        </v-btn>
      </v-toolbar-items>
    </v-app-bar>
  </div>
</template>

<script>
export default {
  data: function() {
    return {
      sidebar: false,
      menuItems: [
        { path: "/jobs", name: "jobs", title: "Jobs" },
        { path: "/companies", name: "companies", title: "Companies" },
        { path: "/jobs/new", name: "new-job", title: "Add job" }
      ]
    };
  }
};
</script>

<style>
</style> 

Only Vuetify components that I'm using are here, there is, actually, v-app in App component.

1

1 Answers

5
votes

Try to add hide-overlay prop to the v-navigation-drawer component in order to hide the overlay :

 <v-navigation-drawer v-model="sidebar" app hide-overlay >