lanyun-image-preview

介绍

实现对图片的放大预览, 支持image的所有属性和方法,使用该组件需要安装UIPhotoViewer

使用方法

import "../../components/lanyun-image-preview/lanyun-image-preview.stml";

例子

<lanyun-image-preview
    @open="handleOpen"
    @close="handleClose"
    :options="previewOptions"
    current="0"
    class="image"
    src="https://img0.baidu.com/it/u=2183719465,1095124388&fm=26&fmt=auto&gp=0.jpg"
    mode="widthFix"
/>

props 属性

参数 说明 类型 默认值
options UIPhotoViewer中open方法的参数, 选填 object {}
current 当前要显示的图片在图片路径数组中的索引, 选填 number | string 0

events 事件

事件名 说明 回调参数
open 打开图片预览时触发 -
close 关闭图片预览时触发 -

依赖的原生插件

UIPhotoViewer

是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24