From 60e3975b3e619f8c63de9501749e9bb618a51dd8 Mon Sep 17 00:00:00 2001 From: zyronon Date: Sun, 12 Nov 2023 15:04:56 +0800 Subject: [PATCH] Modify the word list component --- Note.md | 1 + components.d.ts | 2 + src/App.vue | 3 +- src/assets/css/style.scss | 29 +- src/components/Modal/AddWordDialog.vue | 335 +++++++++--------- src/components/Practice/Panel.vue | 46 ++- src/components/Practice/Practice.vue | 2 +- .../Practice/PracticeWord/Typing.vue | 2 +- .../Practice/PracticeWord/TypingWord.vue | 37 +- src/components/list/CommonWordList.vue | 89 +++++ .../{WordList2.vue => VirtualWordList.vue} | 3 - src/components/list/WordList.vue | 2 +- src/utils/eventBus.ts | 2 + 13 files changed, 363 insertions(+), 190 deletions(-) create mode 100644 src/components/list/CommonWordList.vue rename src/components/list/{WordList2.vue => VirtualWordList.vue} (97%) diff --git a/Note.md b/Note.md index 5ecc6a7d..aa1756fb 100644 --- a/Note.md +++ b/Note.md @@ -54,3 +54,4 @@ http://enpuz.com/ 语法分析工具 点击句子播放的音乐,需要可暂停 footer 的输入数统计有问题,当在列表点一个,然后输入错误之后,不会统计到输入数里面(单词和文章的都有问题) + diff --git a/components.d.ts b/components.d.ts index 2b805ad6..5d9d6f95 100644 --- a/components.d.ts +++ b/components.d.ts @@ -17,6 +17,7 @@ declare module 'vue' { ChapterDetail: typeof import('./src/components/ChapterDetail.vue')['default'] ChapterList: typeof import('./src/components/list/ChapterList.vue')['default'] Close: typeof import('./src/components/icon/Close.vue')['default'] + CommonWordList: typeof import('./src/components/list/CommonWordList.vue')['default'] DictGroup: typeof import('./src/components/Toolbar/DictGroup.vue')['default'] DictList: typeof import('./src/components/list/DictList.vue')['default'] DictModal: typeof import('./src/components/Modal/DictModal.vue')['default'] @@ -64,6 +65,7 @@ declare module 'vue' { Typing: typeof import('./src/components/Practice/PracticeWord/Typing.vue')['default'] TypingArticle: typeof import('./src/components/Practice/PracticeArticle/TypingArticle.vue')['default'] TypingWord: typeof import('./src/components/Practice/PracticeWord/TypingWord.vue')['default'] + VirtualWordList: typeof import('./src/components/list/VirtualWordList.vue')['default'] VolumeIcon: typeof import('./src/components/icon/VolumeIcon.vue')['default'] VolumeSetting: typeof import('./src/components/Toolbar/VolumeSetting.vue')['default'] WordItem: typeof import('./src/components/list/WordItem.vue')['default'] diff --git a/src/App.vue b/src/App.vue index f784acde..a2a0150a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,7 +38,6 @@ watch(store.wrong.originWords, (n) => { store.wrong.chapterWords = [store.wrong.words] }) -useStartKeyboardEventListener() async function init() { console.time() @@ -54,6 +53,8 @@ onMounted(() => { init() }) +useStartKeyboardEventListener() +