admin管理员组文章数量:1025244
If I add an v-autoplete
in v-app-bar
it appears at the top of the app bar, everything else in there is centered.
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
Is there some option I'm missing? Or some other element I should be wrapping around the autoplete? I'm trying to add as little custom CSS as possible so I can easily update later.
It looks like this:
If I add an v-autoplete
in v-app-bar
it appears at the top of the app bar, everything else in there is centered.
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
Is there some option I'm missing? Or some other element I should be wrapping around the autoplete? I'm trying to add as little custom CSS as possible so I can easily update later.
It looks like this:
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked May 23, 2020 at 18:34 himmiphimmip 1,8582 gold badges17 silver badges31 bronze badges 1- Can you provide a link to the running application? – Andy Hoffman Commented May 23, 2020 at 18:45
1 Answer
Reset to default 8This is because of details provided by this ponent. such as error message or hints. So if you want these features you can increase height
of app bar with height
property.
and if you don't need them you can add hide-details
to v-autoplete
.
This will put ponent fit to app bar and if you want smaller input you can add dense
to it. to bee smaller or increase height
of app bar.
So final code is:
<div id="app">
<v-app id="inspire">
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled dense hide-details
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
</v-app>
</div>
If I add an v-autoplete
in v-app-bar
it appears at the top of the app bar, everything else in there is centered.
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
Is there some option I'm missing? Or some other element I should be wrapping around the autoplete? I'm trying to add as little custom CSS as possible so I can easily update later.
It looks like this:
If I add an v-autoplete
in v-app-bar
it appears at the top of the app bar, everything else in there is centered.
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
Is there some option I'm missing? Or some other element I should be wrapping around the autoplete? I'm trying to add as little custom CSS as possible so I can easily update later.
It looks like this:
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked May 23, 2020 at 18:34 himmiphimmip 1,8582 gold badges17 silver badges31 bronze badges 1- Can you provide a link to the running application? – Andy Hoffman Commented May 23, 2020 at 18:45
1 Answer
Reset to default 8This is because of details provided by this ponent. such as error message or hints. So if you want these features you can increase height
of app bar with height
property.
and if you don't need them you can add hide-details
to v-autoplete
.
This will put ponent fit to app bar and if you want smaller input you can add dense
to it. to bee smaller or increase height
of app bar.
So final code is:
<div id="app">
<v-app id="inspire">
<v-app-bar app color="primary" dark>
<v-icon class="mr-3">mdi-chart-line</v-icon>
<v-toolbar-title>Centered title</v-toolbar-title>
<v-autoplete
filled dense hide-details
></v-autoplete>
<v-spacer />
<v-btn to="/products" nuxt text>
Centered button
</v-btn>
</v-app-bar>
</v-app>
</div>
本文标签: javascriptVuetify vertically center autocomplete in app barStack Overflow
版权声明:本文标题:javascript - Vuetify vertically center autocomplete in app bar? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745618171a2159415.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论