
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
vue-image-viewer
Advanced tools
a simple and lightweight picture viewer. Demo
一个用于Vue2.0的简单且轻量化的图片查看器。
npm install vue-image-viewer --save
import imageViewer from "vue-image-viewer";
Vue.use(imageViewer);
export default {
data() {
return {
images : [
{
name : "image1",
url : "/static/images/1.jpg"
},
{
name : "image2",
url : "/static/images/2.png"
},
{
url : "/static/images/3.gif"
}
]
}
},
created() {
this.$imageViewer.images(this.images);
},
methods : {
imageView(index) {
this.$imageViewer.index(index);
this.$imageViewer.show();
}
}
}
<img v-for="(item,index) in images" :key="index" :src="item.url" @click="imageView(index)">
Name | Params | Type | Description |
---|---|---|---|
show | - | - | Open picture viewer. |
hide | - | - | Close picture viewer. |
index | num | Number | Which image to show first. |
page | num | Number | The page of the thumbnail list. |
images | data | Array | Set image list. |
FAQs
a simple and lightweight image viewer.
The npm package vue-image-viewer receives a total of 53 weekly downloads. As such, vue-image-viewer popularity was classified as not popular.
We found that vue-image-viewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.