点击后
一、介绍
vue-preview 是一款简单易用的一款图片预览组件
二、安装
1. 在终端输入 npm install vue-preview -S
2.在min.js文件中导入 并挂载到vue上
// 引入图片预览插件
import ViewPreview from 'vue2-preview';
Vue.use(ViewPreview);
3.在自己需要的组件内使用
<template>
<div class="boxMax-card">
<div class="_plateNumber">
// 这里就是你要放大的 脱氨
<vue-preview
:list="imgs"
:thumbImageStyle="{width: '120px', height: '50px'}"
:tapToClose="true"
/>
</div>
</div>
</template>
<script>
import imgSrc1 from '../../../../assets/img/lpr1.png';
export default {
data(){
return{
imgs: [
{
src: imgSrc1,
w: 800,
h: 600
}
]
}
},
}
</script>