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>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745618172a4636360.html
评论列表(0条)