优化图片上传组件

This commit is contained in:
hooray
2021-10-08 16:22:57 +08:00
parent 616ebc600a
commit 4d792cfca7
+5 -1
View File
@@ -22,7 +22,7 @@
<el-image :src="url" :style="`width:${width}px;height:${height}px;`" fit="fill" />
<div class="mask">
<div class="actions">
<span title="预览" @click.stop="imageViewerVisible = true">
<span title="预览" @click.stop="preview">
<i class="el-icon-zoom-in" />
</span>
<span title="移除" @click.stop="remove">
@@ -105,6 +105,10 @@ const data = ref({
}
})
// 预览
function preview() {
data.value.imageViewerVisible = true
}
// 关闭预览
function previewClose() {
data.value.imageViewerVisible = false