From 8b94d8b689fc31d75d802cca16eb5aced6a81833 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Mon, 17 Mar 2025 11:51:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=89=8B=E8=BD=A6=E4=BA=A4=E6=98=93?= =?UTF-8?q?=EF=BC=8Cweb=E7=AB=AF=E6=9F=A5=E7=9C=8B=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=8F=98=E5=9B=9E=E5=8E=9F=E6=9C=AC=E6=A0=B7?= =?UTF-8?q?=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../secondHandCar/components/upload-common.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/views/secondHandCar/components/upload-common.vue b/src/views/secondHandCar/components/upload-common.vue index a0c2520d..f7ff44de 100644 --- a/src/views/secondHandCar/components/upload-common.vue +++ b/src/views/secondHandCar/components/upload-common.vue @@ -71,21 +71,16 @@ export default { methods: { // 点击预览图片时触发 handlePreviewClick(file, detail) { - console.log('点击了预览图片', file, detail); - // 在这里实现自定义逻辑,例如全屏预览 - this.showFullScreenPreview(file.url); + this.showFullScreenPreview(file.url || file.content,detail); }, // 全屏预览 - showFullScreenPreview(imageUrl) { - const images = this.filesList.map(file => file.url); // 所有图片的 URL - const index = this.filesList.findIndex(file => file.url === imageUrl); // 当前点击图片的索引 + showFullScreenPreview(imageUrl,detail) { + const images = this.filesList.map(file => file.url || file.content); // 所有图片的 URL ImagePreview({ images, - startPosition: index, // 从当前点击的图片开始预览 + startPosition: detail.index, // 从当前点击的图片开始预览 closeable: true, - onClose: () => { - console.log('全屏预览已关闭'); - } + onClose: () => {} }); }, async deleteHandle(file, detail) {