admin管理员组文章数量:1384497
I have this template for a Vue ponent (See it in CODEPEN):
<div class="some-class">
<v-form >
<v-container @click="someMethod()">
<v-row>
<v-col cols="3" sm="3" v-for="p in placeholders" :key="p">
<v-text-field :placeholder="p" single-line outlined >
</v-text-field>
</v-col>
</v-row>
</v-container>
</v-form>
</div>
where placeholders
is an array like:
['Title 1', 'Title 2', 'Title 3',...'Title 21']
and some-class
is in the style section of the ponent:
<style>
div.some-class {
display: inline-block;
max-width: 100%;
overflow-x: auto;
}
</style>
I would like to have them all on one line so I can scroll horizontally. But instead I get this:
How can I tweak the style to see all the text fields on one line?
I have this template for a Vue ponent (See it in CODEPEN):
<div class="some-class">
<v-form >
<v-container @click="someMethod()">
<v-row>
<v-col cols="3" sm="3" v-for="p in placeholders" :key="p">
<v-text-field :placeholder="p" single-line outlined >
</v-text-field>
</v-col>
</v-row>
</v-container>
</v-form>
</div>
where placeholders
is an array like:
['Title 1', 'Title 2', 'Title 3',...'Title 21']
and some-class
is in the style section of the ponent:
<style>
div.some-class {
display: inline-block;
max-width: 100%;
overflow-x: auto;
}
</style>
I would like to have them all on one line so I can scroll horizontally. But instead I get this:
How can I tweak the style to see all the text fields on one line?
Share Improve this question edited Oct 8, 2019 at 15:57 Manuel Perez Heredia asked Oct 8, 2019 at 15:36 Manuel Perez HerediaManuel Perez Heredia 2,3573 gold badges20 silver badges26 bronze badges1 Answer
Reset to default 5Vuetify uses a flex grid. The reason that it's not overflowing is that you have to set the flex-wrap
to nowrap
.
Basically, just add the styles below to your v-row
:
.nowrap-overflow {
flex-wrap: nowrap;
overflow-x: auto;
}
Modified codepen here: https://codepen.io/CodingDeer/pen/zYYGOGd
本文标签: javascriptVuetify text fields on one lineStack Overflow
版权声明:本文标题:javascript - Vuetify text fields on one line - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744516332a2610182.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论