vue.js - Vuetify 2.0:如何从 Vuetify 1.5 实现这种布局?
问题描述
你好!
我最近开始使用 Vuetify 2.0,我发现自己被困在了我在 Vuetify 1.5 上能够轻松实现的事情上。我觉得我错过了一些非常明显的东西。
请帮助我从这个 Vuetify 1.5 模板中获得这个结果:
<div id="app">
<v-app>
<v-content>
<v-container fluid fill-height class="grey darken-4">
<v-layout fill-height column wrap>
<v-flex>
<v-card height="100%">
<v-card-title>I fill the whole available vertical space.</v-card-title>
</v-card>
</v-flex>
<v-flex shrink>
<v-card>
<v-card-title>I'm shrinked to content vertically.</v-card-title>
</v-card>
</v-flex>
</v-layout>
</v-container>
</v-content>
</v-app>
</div>
解决方案
column
不再特定于网格,它现在是一个通用flex-column
类shrink
应该替换为flex-grow-0
阻止元素增长但不允许它缩小到其原始大小以下
除此之外,一切都非常相似:
<v-container fluid class="fill-height grey darken-4">
<v-row dense class="fill-height flex-column">
<v-col>
<v-card height="100%">
<v-card-title>I fill the whole available vertical space.</v-card-title>
</v-card>
</v-col>
<v-col class="flex-grow-0">
<v-card>
<v-card-title>I'm shrinked to content vertically.</v-card-title>
</v-card>
</v-col>
</v-row>
</v-container>
推荐阅读
- javascript - TypeError:在节点内使用crypto.js时无法读取未定义的属性'stringify'
- python - 在kivy中播放/停止音乐
- python - 如何在 VSCode 中查找当前上下文?
- php - PHP 数组元素中的 HTML
- r - R - dplyr - 从 left_join 调用返回真/假(或类似)
- javascript - 在 typescript 中为 Map 定义的列表中的动态键名称
- math - 如何在 OPL 中使用 atan(tan 逆)。我试过 Math.atan 和 Opl.atan
- swift - tvOS 按钮更新对 Uiview 内焦点的约束?
- javascript - 每当我运行“node index.js”时,我的不和谐机器人都无法连接
- javascript - 读取时刻完整时区名称