We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
代码 <Viewer class="images" v-show="false" ref="imagesDiv" :images="images" :options="viewOptions" @inited="inited" > <template #default="scope">
The text was updated successfully, but these errors were encountered:
可以指定初始索引 https://github.com/fengyuanchen/viewerjs?tab=readme-ov-file#initialviewindex
Sorry, something went wrong.
在我的上面代码,在viewoption上添加initialviewindex起不到作用。我的组件是开始隐藏v-show,后面点击按钮动态给组件预览图传的图片数据。切换下一张过后,关闭,再点击还是打开是从第二个位置开始的。
默认v-viewer会使用viewer的update方法来更新图片列表,也会保留原来的数据。 initialviewindex只在初始化时生效,v-show不会销毁v-viewer实例。
如果你的需求是点击动作打开一组图片,不需要在页面里渲染出图片列表,那可以直接改用api方式。 如果用原来的方式,也可以把点击事件改为执行view(index)方法,指定想要打开的图片索引。
No branches or pull requests
代码 <Viewer
class="images"
v-show="false"
ref="imagesDiv"
:images="images"
:options="viewOptions"
@inited="inited"
>
<template #default="scope">
{{ scope.options }}
The text was updated successfully, but these errors were encountered: