Skip to content

Image 图片 ​

可预览图片展示组件,基于原生 <dialog> 实现灯箱放大、缩小、左右旋转、翻转以及 VbImagePreviewGroup 多图切换。

可预览图片 ​

VoBo UI Logo
vue
<template>
  <VbImagePreviewGroup>
    <VbImage src="/logo.svg" alt="预览图片" :width="120" :height="120" />
  </VbImagePreviewGroup>
</template>

API ​

属性名说明类型默认值
src图片地址string—
alt图片替代文本string''
width / height图片宽高number | string—
fitCSS object-fit 填充方式'cover' | 'contain' | 'fill' | 'none' | 'scale-down''cover'
preview是否允许点击打开灯箱预览booleantrue
fallback加载失败时的兜底图片地址string—

基于 MIT 协议开源发布 · @vobo-design/ui v0.5.0