问题
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:
- Add the
app
attribute to the toolbar - Put your router outlet content inside a
v-content
element. - 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