赞
踩
- 1、安装依赖:
- npm install v-viewer --save
-
- 2、main.js 内引用并注册调用:
- import Viewer from 'v-viewer'
- import 'viewerjs/dist/viewer.css'
- Vue.use(Viewer);
- 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
- <viewer :images="item">
- <img :src="item">
- </viewer>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。