0.1.14 • Published 2 years ago
@abc3971139/imgpre v0.1.14
Vue 图片预览插件
安装
npm i @abc3971139/imgpre -S
main.js 里引入
import imgPre from "@abc3971139/imgpre";
import "@abc3971139/imgpre/dist/imgPre.css";
挂载 Vue 原型链
Vue.prototype.$imgPre = imgPre;
页面中使用
this.$imgPre(options);
options说明
{ imgList: Array, // 展示的图片数组 index: Number, // 当前展示图片的下标 showPrint: true // 是否需要打印 }