vue项目中图片放大
// 全局挂在
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
defaultOptions: {
zIndex: 9999
},
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"
}
})
//页面使用
<viewer>
<el-carousel height="500px">
<el-carousel-item
v-for="(item, index) of carousellist"
:key="index"
>
<img
:src="item.img"
alt=""
/>
</el-carousel-item>
</el-carousel>
</viewer>