How to set up toolbar to be fixed in vuetify?

2019-08-04 08:44发布

问题:

In vuetify I use a toolbar

    <v-toolbar dark color="primary">
        <v-toolbar-side-icon @click.stop="drawer.drawer = !drawer.drawer"></v-toolbar-side-icon>
        <v-toolbar-title>{{drawer.title}}</v-toolbar-title>
    </v-toolbar>
    <router-view v-bind:page="pageData"></router-view>

But I want to make it fixed, and not overlap with the vuerouter contents. How can I do that? I tried putting fixed but it still overlaps.

Thanks

回答1:

  1. Add the app attribute to the toolbar
  2. Put your router outlet content inside a v-content element.
  3. Finally, make sure the whole shebang is inside a v-app element.