vuetify v-flex xs12 只填充一半的宽度

vuetify v-flex xs12 only fill half the width

我正在尝试使用 vuetify v-flex 制作卡片列表,这里是代码

    <div id="app">
    <v-app>
    <v-content>
        <v-container fill-height fluid>
        <v-layout>
            
            <v-flex xs12>
            <v-card dark color="grey">
                <v-card-title>
                <div>
                    <h2>Top Questions</h2>
                </div>
                </v-card-title>
            </v-card>
            </v-flex>
            
            <v-flex xs12>
            <v-card v-for="item in items" :key="item._id">
                <v-card-title>
                <h3>{{ item.title }}</h3>
                <p>{{ item.content }}</p>
                </v-card-title>
            </v-card>
            </v-flex>
        </v-layout>        
        </v-container>
    </v-content>
    </v-app>
</div> 

我希望每个 v-flex 都填满该行的 100%。然而,他们只填了一半。
https://codepen.io/anon/pen/mKBMEW

不过,我可以在 v-layout 中添加道具 d-inline-block。我只是想知道我之前的第一个代码发生了什么。

我认为您需要将 column 属性添加到 v-layout

当我使用 Ikbel 的列解决方案时,我的 flex-components max-width 被覆盖为始终为 100%。我所做的是将 row wrap 属性赋予 v-layout.

对于再次通过此的人。

在最新的 vuetify 中(来自 v2.x,例如 2.4),v-col 上不再有 xs,而是使用 cols=12。

相关post: