From 1e5c5e15abeb93d0b57d7f614524f66194722ab4 Mon Sep 17 00:00:00 2001 From: zyronon Date: Wed, 29 May 2024 22:19:26 +0800 Subject: [PATCH] bf --- src/pages/pc/components/toolbar/index.vue | 4 +- src/pages/pc/practice/Statistics.vue | 5 + .../pc/practice/practice-word/TypingWord.vue | 9 +- src/pages/pc/word/WordHome.vue | 136 +++++++++++------- src/stores/base.ts | 8 +- 5 files changed, 95 insertions(+), 67 deletions(-) diff --git a/src/pages/pc/components/toolbar/index.vue b/src/pages/pc/components/toolbar/index.vue index e01feac8..22eb5f1c 100644 --- a/src/pages/pc/components/toolbar/index.vue +++ b/src/pages/pc/components/toolbar/index.vue @@ -80,9 +80,7 @@ const {nav} = useNav() :title="`单词本(${settingStore.shortcutKeyMap[ShortcutKey.TogglePanel]})`" icon="tdesign:menu-unfold"/> -
- {{ statisticsStore.step ? '复习' : '学习新词'}} -
+ { open = true }) + let data = cloneDeep(statStore) + delete data.step + delete data.correctRate + store.currentStudyWordDict.statistics.push(data as any) + const close = () => { open = false } diff --git a/src/pages/pc/practice/practice-word/TypingWord.vue b/src/pages/pc/practice/practice-word/TypingWord.vue index 082e1285..a9463c2d 100644 --- a/src/pages/pc/practice/practice-word/TypingWord.vue +++ b/src/pages/pc/practice/practice-word/TypingWord.vue @@ -94,11 +94,12 @@ const nextWord: Word = $computed(() => { function next(isTyping: boolean = true) { if (current.index === current.words.length - 1) { if (current.wrongWords.length) { - console.log('当前背完了,但还有错词') + console.log('学完了,但还有错词') current.words = cloneDeep(current.wrongWords) + current.index = 0 current.wrongWords = [] } else { - console.log('这章节完了', statisticsStore.total) + console.log('学完了,没错词', statisticsStore.total) isTyping && statisticsStore.inputWordNumber++ statisticsStore.speed = Date.now() - statisticsStore.startDate if (statisticsStore.step) { @@ -267,7 +268,9 @@ onUnmounted(() => { v-loading="!store.load" >
-
{{ current.words.length }}个单词
+
+ {{ statisticsStore.step ? '复习' : '学习'}} + {{ current.words.length }}个单词
{