Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ks-web/image-preview

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ks-web/image-preview

### 安装 ``` npm install @ks-web/image-preview ```

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
3
Weekly downloads
 
Created
Source

image-preview

安装

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('滑动')
  }
})

Props

名称说明类型是否必填默认值
index图片下标numberY0
lazyImage图片懒加载booleanNfalse
clickOnceClose点击任意区域一次关闭弹窗booleanNfalse
imageSwiper是否需要图片指示器,与clickOnceClose互斥booleanNtrue
lazySwiper图片指示器虚拟滚动booleanNfalse
images图片列表arrayY[]
swiperImages图片指示器列表,如没有图片则取images中的对应图片arrayN[]
closeOnlyDialog使用物理返回键时,是否只关闭图片查看器弹窗,而不改变路由booleanNtrue

option(api方式调用)

名称说明类型是否必填默认值
index图片下标numberY0
images图片列表arrayY[]
onClose关闭时的回调functionNundefined
onChange切换时的回调functionNundefined

文档链接

https://doc.ky-tech.com.cn/docs/b1764a82be0c4992b5a2da1fc45ade58

FAQs

Package last updated on 31 May 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc