From 9af8a347b2899825e5bc520ae7dba1c0fe7bf57a Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Fri, 24 Oct 2025 13:55:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=89=A7=E8=A1=8C=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E7=9A=84=E9=80=80=E6=AC=BE=E6=98=8E=E7=BB=86=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/moneyManage/executor/executor.vue | 32 ++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/views/moneyManage/executor/executor.vue b/src/views/moneyManage/executor/executor.vue index 3c9a305..8b02a32 100644 --- a/src/views/moneyManage/executor/executor.vue +++ b/src/views/moneyManage/executor/executor.vue @@ -91,7 +91,7 @@ @@ -477,6 +477,36 @@ const currencies = ref([ label: '越南盾' } ]) + +// 预览图片函数 +const previewImage = (imageUrl) => { + // 使用 element-plus 的 el-image 组件实现图片预览功能 + const imageElement = document.createElement('img'); + imageElement.src = imageUrl; + imageElement.style.maxWidth = '80vw'; + imageElement.style.maxHeight = '80vh'; + + const viewer = document.createElement('div'); + viewer.style.position = 'fixed'; + viewer.style.top = '0'; + viewer.style.left = '0'; + viewer.style.width = '100vw'; + viewer.style.height = '100vh'; + viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)'; + viewer.style.display = 'flex'; + viewer.style.justifyContent = 'center'; + viewer.style.alignItems = 'center'; + viewer.style.zIndex = '9999'; + viewer.style.overflow = 'auto'; + + viewer.appendChild(imageElement); + document.body.appendChild(viewer); + + viewer.addEventListener('click', () => { + document.body.removeChild(viewer); + }); +}; + const handleImageChange = (file) => { uploadRef.value.submit() }