From b93d28231033a7e35263e37acf8978c586ef4d9d Mon Sep 17 00:00:00 2001 From: Prison <742435081@qq.com> Date: Sun, 10 Mar 2024 20:56:36 +0000 Subject: [PATCH] =?UTF-8?q?update=20packages/component/src/component/uploa?= =?UTF-8?q?d/index.vue.=20=E5=8F=AA=E6=9C=89=E5=BC=80=E5=90=AF=E4=B8=94?= =?UTF-8?q?=E8=83=BD=E8=A3=81=E5=89=AA=E6=97=B6=E6=89=8DfiletoDataURL->rea?= =?UTF-8?q?dAsDataURL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Prison <742435081@qq.com> --- packages/component/src/component/upload/index.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/component/src/component/upload/index.vue b/packages/component/src/component/upload/index.vue index e8e4dc4a..c9121dd3 100644 --- a/packages/component/src/component/upload/index.vue +++ b/packages/component/src/component/upload/index.vue @@ -406,18 +406,21 @@ const uploadChange = (e: any) => { } } } - for (let item of _files) { - activeUploadFiles.value.push(item); - filetoDataURL(item, function (res: any) { - activeUploadFilesImgs.value.push(res); - }); - } let arm1 = props.cut && props.acceptMime.indexOf("image") != -1 && props.multiple == false; + if(arm1){ + for (let item of _files) { + activeUploadFiles.value.push(item); + filetoDataURL(item, function (res: any) { + activeUploadFilesImgs.value.push(res); + }); + } + } + let arm2 = props.cut && props.acceptMime.indexOf("image") != -1 && -- Gitee