css - 如何在 vuetify 中设置如下链接图像的图像?
问题描述
我想量化我的v-img
喜欢你在下图中看到的那个。
有没有办法制作类似于您使用 vuetify 看到的图像的东西v-img
。
<div class="row">
<v-img style="margin:2px" max-height="301" max-width="380"
:key="index" v-for="(image, index) in post.userPostImg"
:src="$store.state.baseURL + '/news/' + image"> </v-img>
</div>
解决方案
使用 prop 创建两行no-gutters
,第一行包含一个图像,另一行包含包含 3 个图像的三列:
<v-row no-gutters>
<v-col cols="12">
<v-img :src="`https://picsum.photos/500/300?image=51`" aspect-ratio="1">
</v-img>
</v-col>
</v-row>
<v-row no-gutters>
<v-col cols="4">
<v-img :src="`https://picsum.photos/500/300?image=52`" aspect-ratio="1">
</v-img>
</v-col>
<v-col cols="4">
<v-img :src="`https://picsum.photos/500/300?image=53`" aspect-ratio="1">
</v-img>
</v-col>
<v-col cols="4">
<v-img :src="`https://picsum.photos/500/300?image=54`" aspect-ratio="1">
</v-img>
</v-col>
</v-row>
推荐阅读
- c++ - 将 nlohmann::basic_json<> 转换为 std::tuple c++
- angular - 在带有 Angular 的 Storybook 6 中使用 TailwindCss
- javascript - 带有西里尔 URI 的 Nuxt 完全静态生成的页面问题
- linux - 在 bash 脚本中更改进程标题/名称
- node.js - 当数据实际准备好进行流式传输时,如何获得通知?
- iis - 24 小时内在特定时间(即晚上 10 点)出现 502 错误
- apache-spark - 如何在 Spark 中增加参数列表的大小?
- c# - C# 自动将路径中的正斜杠替换为反斜杠...为什么?
- javascript - 循环遍历多维数组并拆分 | Google Apps 脚本
- javascript - 单击提交按钮后,如何将表单的状态设置为用户输入?