实现思路
根据el-element的el-image组件点击图片实现放大缩小功能来实现
首先需要引入插件
import ElImageViewer from ‘element-ui/packages/image/src/image-viewer’
整体封装代码
```html
<template>
<div>
<el-image-viewer
:on-close="closeViewer"
:url-list="urlList"
></el-image-viewer>
</div>
</template>
<script>
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
export default {
components: {
ElImageViewer,
},
props: {
urlList: {
type: Array,
default: function () {
return []
},
},