VUE图片放大缩小插件v-viewer使用

1、先安装依赖
npm install v-viewer --save
2、main.js内引用并注册调用

//main.js
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

Vue.use(Viewer,{
    defaultOptions: {
        zIndex: 9999
    }
});
Viewer.setDefaults({
  Options: { "inline": true, "button": true, "navbar": true, "title": true, "toolbar": true, "tooltip": true, "movable": true, "zoomable": true, "rotatable": true, "scalable": true, "transition": true, "fullscreen": true, "keyboard": true, "url": "data-source" }
});

3、代码中使用xxx.vue



你可能感兴趣的:(VUE图片放大缩小插件v-viewer使用)