vue.js - Vuetify Flex Layout - 没有填充高度
问题描述
我已经使用以下代码尝试了许多不同的选项,但是,我无法让它填充剩余的高度。(第二个布局应该填充剩余的高度)我在这里做错了什么?
<template>
<div class="earnIndex">
<v-container fluid fill-height>
<v-layout row wrap>
<v-flex
v-for="(offer, index) in offers"
:key="index"
xs2
class="pa-1"
>
<SiteButton
:site-name="offer.siteName"
/>
</v-flex>
</v-layout>
<v-layout column fill-height>
<v-flex grow>
<v-card>
<p>
test
</p>
</v-card>
</v-flex>
</v-layout>
</v-container>
</div>
</template>
编辑:
所以这是我的新代码:
<template>
<v-layout column wrap>
<v-flex>
<v-layout row wrap class="red">
<v-flex
v-for="(offer, index) in offers"
:key="index"
class="pa-1"
xs2
>
<SiteButton
:site-name="offer.siteName"
/>
</v-flex>
</v-layout>
</v-flex>
<v-flex grow align-content-start>
<v-card height="100%">
<p>
test
</p>
</v-card>
</v-flex>
</v-layout>
</template>
我希望带有“测试”的卡片在顶部的链接之后直接开始,然后填充其余的高度。
提前感谢您的帮助!
问候,乔什
解决方案
尝试column fill-height
在右侧使用,然后grow
在v-flex
...
<v-container fluid fill-height>
<v-layout row wrap>
<v-flex v-for="(offer, index) in offers" :key="index" xs2 class="pa-1">
<v-btn>{{ offer.siteName }}</v-btn>
</v-flex>
</v-layout>
<v-layout column fill-height>
<v-flex grow>
<v-card class="fill-height">
<p> test </p>
</v-card>
</v-flex>
</v-layout>
</v-container>
推荐阅读
- php - 如何在类别页面上显示产品子类别
- kubernetes - kubectl 仅获取 pod 的事件
- c# - 如何在不执行查询的情况下访问相关模型
- javascript - 使用 LOOPS 从字符串创建各种数组
- c# - 如何为 UWP 包安装程序添加 Microsoft.NET.CoreRuntime.2.1?
- c# - MassTransit 自定义消息类型名称
- python - 是否有一种矢量化方式来访问另一列中明确指示的列值?
- python - 我想使用 python 代码更新特定 xml 标记的值?
- javascript - Flask-SocketIO 握手失败
- haproxy - HAPROXY 外部健康检查不起作用