
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@ks-web/image-preview
Advanced tools
npm install @ks-web/image-preview
Vue.use(imagePreview)
// 组件方式调用
<image-preview v-model="dialogShow"
:index.sync="dialogIndex"
:images="images"></image-preview>
// api方式调用
this.$dialogImagePreview({
index: 0,
images: [...images],
onClose () {
console.log('关闭')
},
onChange () {
console.log('滑动')
}
})
| 名称 | 说明 | 类型 | 是否必填 | 默认值 |
|---|---|---|---|---|
| index | 图片下标 | number | Y | 0 |
| lazyImage | 图片懒加载 | boolean | N | false |
| clickOnceClose | 点击任意区域一次关闭弹窗 | boolean | N | false |
| imageSwiper | 是否需要图片指示器,与clickOnceClose互斥 | boolean | N | true |
| lazySwiper | 图片指示器虚拟滚动 | boolean | N | false |
| images | 图片列表 | array | Y | [] |
| swiperImages | 图片指示器列表,如没有图片则取images中的对应图片 | array | N | [] |
| closeOnlyDialog | 使用物理返回键时,是否只关闭图片查看器弹窗,而不改变路由 | boolean | N | true |
| 名称 | 说明 | 类型 | 是否必填 | 默认值 |
|---|---|---|---|---|
| index | 图片下标 | number | Y | 0 |
| images | 图片列表 | array | Y | [] |
| onClose | 关闭时的回调 | function | N | undefined |
| onChange | 切换时的回调 | function | N | undefined |
https://doc.ky-tech.com.cn/docs/b1764a82be0c4992b5a2da1fc45ade58
FAQs
``` npm install @ks-web/image-preview ```
We found that @ks-web/image-preview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.