如何在 Card 中插入 row/column(使用 v-for)?
How can I insert row/column (with v-for) in Card?
我正在尝试使用 Vuetify 和 Vue 构建一个简单的页面。
在这个页面上,我也会有几张卡片。所以我需要固定这张卡片的宽度和高度。
我需要 v-card 中的这些项目,也可以滚动。我该怎么做?
<v-container>
<v-col cols="12" sm="16" md="8" lg="4">
<v-card height="720px">
<v-card-title class="unselectable" primary-title>
Card Title
</v-card-title>
<v-spacer></v-spacer>
<v-card-text>
<v-container>
<v-row class="pa-2">
<v-col
v-for="(item, i) in items"
:key="i"
class="d-flex child-flex"
cols="6"
>
<v-card>
<v-img
:src="getImage(item)"
height="130px"
class="grey lighten-2"
>
<template v-slot:placeholder>
<v-row
class="fill-height ma-0"
align="center"
justify="center"
>
<v-progress-circular
indeterminate
color="grey lighten-5"
/>
</v-row>
</template>
</v-img>
<v-card-text class="unselectable text-center font-weight-bold">
{{ item.title }}
</v-card-text>
</v-card>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-col>
</v-container>
尝试将 属性 overflow-y:auto
添加到卡片样式中,例如:
<v-card height="720px" style="overflow-y:auto">
我正在尝试使用 Vuetify 和 Vue 构建一个简单的页面。
在这个页面上,我也会有几张卡片。所以我需要固定这张卡片的宽度和高度。
我需要 v-card 中的这些项目,也可以滚动。我该怎么做?
<v-container>
<v-col cols="12" sm="16" md="8" lg="4">
<v-card height="720px">
<v-card-title class="unselectable" primary-title>
Card Title
</v-card-title>
<v-spacer></v-spacer>
<v-card-text>
<v-container>
<v-row class="pa-2">
<v-col
v-for="(item, i) in items"
:key="i"
class="d-flex child-flex"
cols="6"
>
<v-card>
<v-img
:src="getImage(item)"
height="130px"
class="grey lighten-2"
>
<template v-slot:placeholder>
<v-row
class="fill-height ma-0"
align="center"
justify="center"
>
<v-progress-circular
indeterminate
color="grey lighten-5"
/>
</v-row>
</template>
</v-img>
<v-card-text class="unselectable text-center font-weight-bold">
{{ item.title }}
</v-card-text>
</v-card>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-col>
</v-container>
尝试将 属性 overflow-y:auto
添加到卡片样式中,例如:
<v-card height="720px" style="overflow-y:auto">