图片预览
previewImage
参数说明
| 属性 | 类型 | 默认值 | 是否必填 | 说明 |
|---|---|---|---|---|
| current | number | 0 | 否 | 当前显示图片的index |
| urls | [] | 是 | 需要预览的图片链接列表 | |
success | function | 否 | 接口调用成功的回调函数 | |
fail | function | 否 | 接口调用失败的回调函数 | |
complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
代码示例
dsBridge.call(
'previewImage',
{
current: 2,
urls: [
'https://img.alicdn.com/tps/TB1sXGYIFXXXXc5XpXXXXXXXXXX.jpg',
'https://img.alicdn.com/tps/TB1pfG4IFXXXXc6XXXXXXXXXXXX.jpg',
'https://img.alicdn.com/tps/TB1h9xxIFXXXXbKXXXXXXXXXXXX.jpg'
]
}
)