Skip to content
On this page

Image Preview 图片预览

点击开启大图预览

基本使用

v-model:visible 绑定一个布尔值来控制预览框的展示状态

img-list 需要传入一个图片的数组集合

开启

隐藏操作栏

通过 is-option 属性将操作栏隐藏

开启

Attributes

参数说明类型可选值默认值
v-model:visible是否展示预览框boolean——false
append-to-body是否追加到 bodyboolean——false
img-list图片集合array——[]
modal-close是否点击遮罩层关闭预览窗boolean——true
is-close-btn是否展示关闭按钮boolean——true
show-index图片预览展示的首张图的索引,从 0 开始number——0
z-index图片预览展示的 z-indexnumber————
is-option是否展示图片预览下面的操作栏boolean——true
round预览图的圆角,传入一个单位string————
on-close关闭之后触发的回调HandleMouse————

Interface

组件导出以下类型定义:

ts
import type { ImagePreviewInstance, ImagePreviewProps } from 'fighting-design'

Contributors