Vuetify—— v-img的使用

在这里插入图片描述
contain: 防止图像不合适时被裁剪
在这里插入图片描述

<v-img
  contain
  lazy-src="https://picsum.photos/id/11/10/6"
  max-height="97"
  max-width="250"
  src="https://picsum.photos/id/11/500/300"
></v-img>

在这里插入图片描述
当src路径失效或错误时,lazy-src就先起到一个占位显示的作用

<v-img
  src="https://bad.src/not/valid"
  lazy-src="https://picsum.photos/id/11/100/60"
  max-width="500"
  max-height="300"
>
</v-img>

猜你喜欢

转载自blog.csdn.net/Kiruthika/article/details/120776517