在專案中因為要經常用到圖片預覽效果,自己寫的話麻煩死啦(懶)
vue-photo-preview
一個基於
photoswipe
的
vue
圖片預覽外掛,支援移動端和PC端,支援各種手勢操作,放大縮小,體驗流暢。
gitHub:
https://github。com/826327700/vue-photo-preview
安裝
npm install vue-photo-preview ——save
引入
import preview from ‘vue-photo-preview’ import ‘vue-photo-preview/dist/skin。css’ Vue。use(preview)
使用
效果展示
移動端
pc端