<el-table-column label="照片" align="center" prop="imgId">
<template slot-scope="scope">
<span v-html="getDownLink(scope.row)"></span>
</template>
</el-table-column>
这里点击“查看”图片在新页面显示,我想给他改成在本地面预览,然后点X关闭,如何修改
<el-table-column label="照片" align="center" prop="imgId">
<template slot-scope="scope">
<span v-html="getDownLink(scope.row)"></span>
</template>
</el-table-column>
这里点击“查看”图片在新页面显示,我想给他改成在本地面预览,然后点X关闭,如何修改
elementuI 的el-image 有previewSrcList 开启预览大图的功能。
<div class="demo-image__preview">
<el-image
style="width: 100px; height: 100px"
:src="url"
:preview-src-list="srcList">
</el-image>
</div>
<script>
export default {
data() {
return {
url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
srcList: [
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
]
}
}
}
</script>