From f7dc9f207e918ff1cae5a3f12c0d0c138bfeb379 Mon Sep 17 00:00:00 2001 From: zyronon Date: Tue, 29 Jul 2025 01:18:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=A4=8D=E4=B9=A0?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E6=96=B0=E8=AF=8D=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=BC=80=E5=A7=8B=E7=9A=84bug=EF=BC=9B?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0complete=E5=AD=97=E6=AE=B5=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=AD=A6=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/pc/components/Book.vue | 10 ++++++-- src/pages/pc/word/Statistics.vue | 10 ++++---- src/pages/pc/word/StudyWord.vue | 39 +++++++++++++++++++++++++------- src/types.ts | 3 ++- 4 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/pages/pc/components/Book.vue b/src/pages/pc/components/Book.vue index 2f53a1ef..df2eb0bd 100644 --- a/src/pages/pc/components/Book.vue +++ b/src/pages/pc/components/Book.vue @@ -15,8 +15,14 @@ defineEmits<{ }>() const progress = $computed(() => { + if (props.item.complete) return 100 return Number(((props.item?.lastLearnIndex / props.item?.length) * 100).toFixed()) }) + +const studyProgress = $computed(() => { + if (props.item.complete) return props.item?.length + '/' + return props.item?.lastLearnIndex ? props.item?.lastLearnIndex + '/' : '' +})