How to set up toolbar to be fixed in vuetify?

微笑、不失礼 提交于 2019-12-24 07:02:36

问题


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:


Since version 2.0.0 v-toolbar isn't fixable use v-app-bar https://vuetifyjs.com/en/components/app-bars




回答2:


  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.


来源:https://stackoverflow.com/questions/53217709/how-to-set-up-toolbar-to-be-fixed-in-vuetify

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!