From 6d8927bcfb9c9f2236109009920f56b18dcdfe1d Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Wed, 9 Apr 2025 22:40:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E4=BC=A0=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/UploadList.tsx | 14 ++++++++++++-- src/services/mobileWsType.ts | 2 +- src/store/features/contextSlice.ts | 4 +--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/pages/UploadList.tsx b/src/pages/UploadList.tsx index 57291d5..794a5e3 100644 --- a/src/pages/UploadList.tsx +++ b/src/pages/UploadList.tsx @@ -39,7 +39,7 @@ export default function UploadList() { key: 'clear', onClick: () => { setShowMenu(false); - if (!context.syncProgress.finish) { + if (context.syncProgress.status === 'uploading') { Dialog.confirm({ content: '存在未完成的任务,确定清空?', onConfirm: () => { @@ -128,6 +128,16 @@ export default function UploadList() { ); + const statusText = () => { + if (context.syncProgress.status === 'finished') { + return '完成'; + } else if (context.syncProgress.status === 'paused') { + return '暂停'; + } else if (context.syncProgress.status === 'uploading') { + return '上传中'; + } + }; + return (
@@ -138,7 +148,7 @@ export default function UploadList() { 剩余任务{context.syncProgress.remaining}个 失败{context.syncProgress.fail}个 -

{context.syncProgress.finish ? '完成' : '上传中'}

+

{statusText()}