gpt4 book ai didi

vue.js - Vuetify App Bar 太高 - 占据了屏幕的一半

转载 作者:搜寻专家 更新时间:2023-10-30 22:54:22 27 4
gpt4 key购买 nike

当我有一个带有 v-app-bar 的空应用时在v-app里面容器,应用栏占据了页面的一半。

<v-app>

<v-app-bar color="deep-purple" dark >
<v-toolbar-title>Page title</v-toolbar-title>
</v-app-bar>

<v-content>
Hello Vue
</v-content>

</v-app>

Demo in Codepen

Screenshot Example

我已经尝试为 denseshortheight 添加选项,但它们似乎没有任何影响。

文档中有很多代码示例都带有这个 App Bar 标记,所以我想找出问题所在。

最佳答案

您需要将 app 属性添加到 v-app-bar 中,如下所示:

<v-app>

<v-app-bar color="deep-purple" dark <b><i>app</i></b> >
<v-toolbar-title>Page title</v-toolbar-title>
</v-app-bar>

<v-content>
Hello Vue
</v-content>

</v-app>

这里的关键是App组件中的所有子元素都必须指明是否应该使用app布局

来自 Vuetify > Components > Application > Default Markup :

You can place your layout elements anywhere, as long as you apply the app property.

来自 Vuetify > Components > App Bar > API :

app
Designates the component as part of the application layout. Used for dynamically adjusting content sizing. Components using this prop should reside outside of v-content component to function properly.

Screenshot of Fix

关于vue.js - Vuetify App Bar 太高 - 占据了屏幕的一半,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57300983/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com