vue-preview,一個vue集成PhotoSwipe圖片預覽插件(移動端)

使用步驟: 注意事項:img標籤上的class類不能去掉,每個圖片數據對象中,必須有 w 和 h 屬性 安裝 npm i vue-preview -S .在main.js文件中導入該組件,並掛載到Vue身上 import VuePreview from ‘vue-preview’; Vue.use(VuePreview); 3.在組件中使用 在放縮略圖的位置放入模板 <img class=「pre
相關文章
相關標籤/搜索