降低 Vuetify 下拉菜单的高度 [英] Reducing the height of Vuetify dropdown
问题描述
我无法降低 Vuetify 下拉组件 v-select
的高度.我尝试使用道具 dense
但它只会降低要选择的选项的高度,并且对关闭的下拉列表没有任何影响.
I am not able to reduce the height of the Vuetify dropdown component v-select
. I tried using the props dense
but it only reduces the height of the options to select and doesn't show any effect on the closed dropdown.
我尝试了以下模板代码:
I tried the following template code:
<v-select :items="selectableYears" dense outlined></v-select>
文档中的示例代码非常相似:
The example code from the documenation is very similar:
<v-select
:items="items"
label="Outlined style"
dense
outlined
></v-select>
文档:https://vuetifyjs.com/en/components/selects>
推荐答案
我使用的 Vuetify 版本 (2.0.5) 似乎只提供了部分密集道具.使用 :dense="true"
作为道具时,将版本升级到 2.1.0 会降低关闭下拉列表的高度.
It seems like that the dense props is only partially available with the Vuetify version I used (2.0.5). Upgrading the version to 2.1.0 reduces the height of the closed dropdown when using :dense="true"
as a prop.
这篇关于降低 Vuetify 下拉菜单的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!