mirari / v-viewer

Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
https://mirari.cc/v-viewer/
MIT License
2.46k stars 292 forks source link

缩略图与原图 #333

Closed zhanbinbin closed 2 months ago

zhanbinbin commented 2 months ago

需求:缩略图链接已在数组中,原图链接能否在viewer弹出后再进行请求并填充至data-sorce,看了API有设置url属性,但是需要配合img使用,我当前使用的是纯API方式实现:如下,想问下如果不适用url 方法替换,只是用参数配置能处理吗? viewerApi({ images: images, options: { title: false, button: false, rebuild: true, scalable: false } })

zhanbinbin commented 2 months ago

一直在找设置缩略图的属性,原来就是src,然后设置下url对应的属性名,把这俩属性设置到images里就可以了

mirari commented 2 months ago

是的,demo最底下的例子就是缩略图 https://vue3-viewer.mirari.cc/