vue.js - 在 Vuetify 中调整 v-list-tile 的高度

标签 vue.js vuetify.js

CodePen

相关部分是:

<v-list-tile>
  <v-list-tile-content>
    <div>
      This is some content that's a little tall.<br />
      Maybe there's a lot of stuff that goes here.<br />
      Or maybe I'm using a third party control.<br />
      Either way, how can I adjust the height?
    </div>
  </v-list-tile-content>
</v-list-tile>

我有一个包含列表的 Vuetify 菜单。其中一个列表项比基本样式中设置的 48px 高。有没有办法在标记中优雅地调整它?还是需要用css来调整?

最佳答案

根据文档,您可以增加 <v-list> 中项目的大小与 two-linethree-line

除此之外,建议您使用卡片:

For three line lists, the subtitle will clamp vertically at 2 lines and then ellipsis. If you need more than 3 lines, it is advised to use a card.

v-list 的目的是强制重复元素的高度统一,所以如果你需要超过三行来表达一个特定的点,使用可以覆盖更多区域的重复卡片元素可能是有意义的并使用例。

关于vue.js - 在 Vuetify 中调整 v-list-tile 的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51522343/

相关文章:

javascript - axios 未在 vue js cli 中定义

firebase - 使用 Firebase 托管部署 Vue.js 应用程序

vue.js - validateAll 不适用于 v-for 生成的输入

css - 如何为更大的屏幕尺寸减少 Vuetify Grid 列宽

javascript - 尝试从数据库获取数据并填充 vuetify 数据表时找不到 items.sort

javascript - vue.js .sync 无法读取未定义的属性

vue.js - 从 Vuejs 中的动态表单获取所有输入值

twitter-bootstrap - 如何在卡组 Bootstrap vue 上设置行中的列?

vue.js - 组件未显示在 Vue DevTools 中

javascript - 如何在Vuejs中将按钮显示延迟到2秒