https://github.com/tcly861204/lyfa-preview
🎉🎉🔥纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等
https://github.com/tcly861204/lyfa-preview
html image-preview js scss typescript vite webpack5
Last synced: about 2 months ago
JSON representation
🎉🎉🔥纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等
- Host: GitHub
- URL: https://github.com/tcly861204/lyfa-preview
- Owner: tcly861204
- License: mit
- Created: 2022-01-07T07:37:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-08T02:10:55.000Z (about 3 years ago)
- Last Synced: 2025-02-06T07:46:05.836Z (over 1 year ago)
- Topics: html, image-preview, js, scss, typescript, vite, webpack5
- Language: TypeScript
- Homepage: https://tcly861204.github.io/lyfa-preview/
- Size: 3.42 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## lyfa-preview
纯js实现的图片预览脚本库,可支持局部放大、旋转,全屏等
## 在线体验
[预览](https://tcly861204.github.io/lyfa-preview/)
## 使用
1. 安装
> npm i lyfa-preview
2. 在script标签中使用
>
>
3. 在模块代码中使用
```
import Preview from 'lyfa-preview'
import 'lyfa-preview/dist/style.min.css'
```
4. 调用预览组件
```
new Preview({
list: [
{
ext: 'jpeg',
name: '预览图片',
src: './public/meinv.jpeg'
}, {
ext: 'jpeg',
name: '预览图片',
src: './public/fengjin.jpeg'
}
]
}).display(0)
```