【发布时间】:2019-07-18 19:49:00
【问题描述】:
我在对话框中遇到了 Vuetify 列表的问题。我的目标是拥有可用的页眉/页脚,并且在其中有一个可滚动的列表,所有这些内容的最大高度为 600 像素,但在较小的屏幕上进行调整。
现在,我有一个问题,它在更大的屏幕高度 > 600 像素时可以正常工作(我可以滚动列表 + 我在底部看到按钮)但在较小的屏幕上无法正常工作(可以滚动列表但必须在最后滚动查看按钮)。
有人知道我忘了添加什么吗?
<!-- MovementsInput component -->
<template>
<v-form
ref="form"
v-model="valid"
lazy-validation>
<v-card
>
<v-card-title class="headline primary">
Add new movement
</v-card-title>
<v-card-text>
<v-list
style="max-height: 600px"
class="scroll-y">
<template
v-for="movement in movements">
<v-list-tile
:key="movement.name">
<v-list-tile-title>
{{movement.name}}
</v-list-tile-title>
</v-list-tile>
</template>
</v-list>
<!-- Ignore this autocomplete, forget to remove it from screenshot -->
<v-autocomplete
v-model="movement"
:items="movements"
:color=this.$vuetify.theme.secondary
hide-selected
item-text="name"
item-value="name"
label="Movement"
placeholder="Select movement from the list"
return-object
></v-autocomplete>
</v-card-text>
<v-card-actions>
<v-btn
color="grey"
@click="cancelClicked"
>
Cancel
<v-icon right>fa-undo</v-icon>
</v-btn>
<v-spacer></v-spacer>
<v-btn
:disabled="!valid"
:rules="[v => !!v || 'Everything has to be valid']"
required
color="primary"
@click="confirmClicked"
>
Confirm
<v-icon right>fa-check</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</v-form>
</template>
<!-- Other file, all this is for now called in simple Vuetify dialog -->
<v-dialog
persistent
:value="true"
>
<MovementsSelect />
</v-dialog>
【问题讨论】:
标签: vue.js vuetify.js