From e8ca86e89916b05d4451ae9ad63e8ee98cb0c251 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 17 Nov 2025 17:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E9=80=89?= =?UTF-8?q?=E5=8F=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/task/AttachmentFileUploader.vue | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/components/task/AttachmentFileUploader.vue b/components/task/AttachmentFileUploader.vue index 6a8ed74..c476117 100644 --- a/components/task/AttachmentFileUploader.vue +++ b/components/task/AttachmentFileUploader.vue @@ -72,12 +72,12 @@ const handleChooseFiles = async () => { } try { - // #ifdef H5 || MP-WEIXIN || APP-PLUS - await chooseFilesWithUni(remainingCount); + // #ifdef APP-PLUS + await chooseFilesNative(remainingCount); // #endif - // #ifndef H5 || MP-WEIXIN || APP-PLUS - await chooseFilesNative(remainingCount); + // #ifndef APP-PLUS + await chooseFilesWithUni(remainingCount); // #endif } catch (error) { console.error('选择文件失败:', error); @@ -104,13 +104,8 @@ const chooseFilesWithUni = (remainingCount) => { reject(error); } }, - fail: async () => { - try { - await chooseFilesNative(remainingCount); - resolve(); - } catch (nativeError) { - reject(nativeError); - } + fail: () => { + reject(new Error('文件选择被取消或失败')); } }); });