Skip to content

🎉🎉🔥纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等

License

Notifications You must be signed in to change notification settings

tcly861204/lyfa-preview

Repository files navigation

lyfa-preview

纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等

在线体验

预览

使用

  1. 安装

npm i lyfa-preview

  1. 在script标签中使用
<script src="./dist/main.min.js"></script>
  1. 在模块代码中使用
import Preview from 'lyfa-preview'
import 'lyfa-preview/dist/style.min.css'
  1. 调用预览组件
new Preview({
  list: [
    {
      ext: 'jpeg',
      name: '预览图片',
      src: './public/meinv.jpeg'
    }, {
      ext: 'jpeg',
      name: '预览图片',
      src: './public/fengjin.jpeg'
    }
  ]
}).display(0) 

About

🎉🎉🔥纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published