显示照片预览用的配置对象

interface PreviewImageConfig {
    current: string;
    urls: string[];
    cancel?(): void;
    complete?(res?: any): void;
    fail?(error?: any): void;
    success?(res?: any): void;
}

层级 (查看完整内容)

属性

current: string

当前显示图片的 http 链接

urls: string[]

需要预览的图片 http 链接列表

方法

  • 用户点击取消时的回调函数,仅部分有用户取消操作的api才会用到

    返回 void

  • 接口调用完成时执行的回调函数,无论成功或失败都会执行

    参数

    • 可选res: any

    返回 void

  • 接口调用失败时执行的回调函数

    参数

    • 可选error: any

    返回 void

  • 接口调用成功时执行的回调函数

    参数

    • 可选res: any

    返回 void