From 99c18849ea5551df19791222cc850ec87bf47a42 Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:07:49 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UploadFile/src/UploadFile.vue | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 93457d5..c719db6 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -205,10 +205,10 @@ const SyncFiles = async () => { for (const Name of fileList.value) { const fName = Name as UploadUserFile & {page?: number,lodTxt?: String}; fName.lodTxt="10%" - // if (fName.page==100){ - // fName.lodTxt="完成" - // continue - // } + if (fName.page==100){ + fName.lodTxt="完成" + continue + } //判断是否全部上传 await delay(100); fName.page = 20; @@ -440,9 +440,11 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { if (uploadList.value.length == uploadNumber.value) { fileList.value.push(...uploadList.value) MysqlUrl.value.push(...uploadList.value) - const updatedFileStatus = [...props.fileStatus]; - updatedFileStatus.push(10); - emit('update:fileStatus', updatedFileStatus); + if (props.fileStatus){ + const updatedFileStatus = [...props.fileStatus]; + updatedFileStatus.push(0); + emit('update:fileStatus', updatedFileStatus); + } // console.log("updatedFileStatus",updatedFileStatus) // console.log("fileList.value",fileList.value) // console.log("MysqlUrl.value",MysqlUrl.value) @@ -574,7 +576,9 @@ watch( } val.forEach((item, index) => { fileList.value[index].page = item - if (item == 10 ){ + if (item == 0 ){ + fileList.value[index].lodTxt = "未同步" + }else if (item == 10){ fileList.value[index].lodTxt = "错误" }else{ fileList.value[index].lodTxt = "完成"