Results 103 comments of mirari

Please provide an online code example, please refer to this: https://codepen.io/mirari/pen/NWpwVdd or https://codesandbox.io/s/v-viewer-api-nxh1g

Maybe you can try turning off the viewer's `focus` option first, which is a feature added by viewerjs in the new version and maybe not stable enough.

是指令引用还是组件引用? 先用组件试一下,只要图片数组不变,不应该有卡顿

可以在获取到viewerjs对象后监听view事件,或者在options里传递view回调 https://github.com/fengyuanchen/viewerjs#view 回调的写法可以参考 https://codepen.io/mirari/pen/ZwpGBO

抱歉之前没看到,最好能用在线例子复现一下 参考[https://codepen.io/mirari/pen/PePrVq](https://codepen.io/mirari/pen/PePrVq)

> 我用element中的el-image组件,打开后再关闭就会出现body中出现overflow:hidden viewer源码中没有overflow相关的操作,影响body的只有一个padding-right。 最好排查下是不是其他组件的干扰,比如开启了el-image的预览功能,这跟viewer是冲突的。 https://codepen.io/mirari/pen/MWmGyEV 在这个例子里用el-image没有复现。

看了下源码,语言跟momentjs不一样,moment简体中文是zh-cn,这里只能写zh,而且只有中英法3语 ` ` 文档上写locale,实际上是lang

@rohith217 At present, there seems to be no official solution. I can only provide this idea without practice: 1. Save the `ratio` value on [`zoomed`](https://github.com/fengyuanchen/viewerjs#zoom-1) event, and do the same...

@rohith217 Save the value on [`moved`](https://github.com/fengyuanchen/viewerjs#move-1) event.