From c8413334e55da2420a0248b11c4a16f9371d804c Mon Sep 17 00:00:00 2001 From: zyronon Date: Fri, 3 Nov 2023 16:49:48 +0800 Subject: [PATCH] fix bug --- Note.md | 4 -- src/components/Backgorund.vue | 2 +- .../Practice/PracticeWord/PracticeWord.vue | 6 +- .../Practice/PracticeWord/TypingWord.vue | 2 + src/components/Toolbar/DictModal.vue | 60 +++++++++++++------ src/components/WordList.vue | 10 +++- src/components/WordListModal.vue | 2 - src/stores/base.ts | 9 +++ src/types.ts | 2 + 9 files changed, 64 insertions(+), 33 deletions(-) diff --git a/Note.md b/Note.md index 17441191..a7127dc8 100644 --- a/Note.md +++ b/Note.md @@ -41,8 +41,6 @@ A cold welcome 有bug [EditAbleText.vue](src%2Fcomponents%2FEditAbleText.vue) 不能自动聚焦 -在文章模式下,背单词时不能调出面板 - 单词发音,点击第二遍时减速 http://enpuz.com/ 语法分析工具 @@ -51,8 +49,6 @@ http://enpuz.com/ 语法分析工具 加载单词列表时需要loading -背单词页面div,位置应该恒定,不应该随翻译内容变动而跳动 - 点击句子播放的音乐,需要可暂停 footer 的输入数统计有问题,当在列表点一个,然后输入错误之后,不会统计到输入数里面(单词和文章的都有问题) diff --git a/src/components/Backgorund.vue b/src/components/Backgorund.vue index d59ae80e..11531c51 100644 --- a/src/components/Backgorund.vue +++ b/src/components/Backgorund.vue @@ -12,7 +12,7 @@ import {onMounted} from "vue" const canvas = $ref() onMounted(() => { - console.log('canvas;', canvas) + // console.log('canvas;', canvas) let ctx = canvas.getContext("2d"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; diff --git a/src/components/Practice/PracticeWord/PracticeWord.vue b/src/components/Practice/PracticeWord/PracticeWord.vue index fd5e8dc1..df8f165b 100644 --- a/src/components/Practice/PracticeWord/PracticeWord.vue +++ b/src/components/Practice/PracticeWord/PracticeWord.vue @@ -18,10 +18,8 @@ let wordData = $ref({ watch([ () => store.load, - () => store.current.index, - () => store.current.dictType, () => store.currentDict.chapterIndex, - () => store.currentDict.chapterWordNumber, + () => store.currentDict.words, ], n => { getCurrentPractice() }) @@ -36,7 +34,7 @@ function getCurrentPractice() { } wordData.words = cloneDeep(store.chapter) wordData.index = 0 - console.log('wordData', wordData) + // console.log('wordData', wordData) } onMounted(() => { diff --git a/src/components/Practice/PracticeWord/TypingWord.vue b/src/components/Practice/PracticeWord/TypingWord.vue index 6ab3488e..382ba858 100644 --- a/src/components/Practice/PracticeWord/TypingWord.vue +++ b/src/components/Practice/PracticeWord/TypingWord.vue @@ -237,6 +237,8 @@ useOnKeyboardEventListener(onKeyDown, onKeyUp) class="word-list" :is-active="active" @change="(i:number) => data.index = i" + :show-word="!settingStore.dictation" + :show-translate="settingStore.translate" :list="data.words" :activeIndex="data.index"/> diff --git a/src/components/Toolbar/DictModal.vue b/src/components/Toolbar/DictModal.vue index 6e9af2c7..0a50d192 100644 --- a/src/components/Toolbar/DictModal.vue +++ b/src/components/Toolbar/DictModal.vue @@ -1,9 +1,9 @@