bf
This commit is contained in:
1
components.d.ts
vendored
1
components.d.ts
vendored
@@ -13,7 +13,6 @@ declare module 'vue' {
|
||||
Close: typeof import('./src/components/icon/Close.vue')['default']
|
||||
DeleteIcon: typeof import('./src/components/icon/DeleteIcon.vue')['default']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
|
||||
@@ -70,5 +70,6 @@
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import WordList from "@/pages/pc/components/list/WordList.vue";
|
||||
import Empty from "@/components/Empty.vue";
|
||||
import {Icon} from "@iconify/vue";
|
||||
import router from "@/router.ts";
|
||||
import Typing from "@/pages/pc/components/practice-word/Typing.vue";
|
||||
import Typing from "@/pages/pc/components/Typing.vue";
|
||||
import {usePracticeStore} from "@/stores/practice.ts";
|
||||
|
||||
const store = useBaseStore()
|
||||
|
||||
@@ -10,7 +10,7 @@ import {useOnKeyboardEventListener, useWindowClick} from "@/hooks/event.ts";
|
||||
import {Icon} from "@iconify/vue";
|
||||
import Tooltip from "@/pages/pc/components/Tooltip.vue";
|
||||
import Options from "@/pages/pc/word/Options.vue";
|
||||
import Typing from "@/pages/pc/components/practice-word/Typing.vue";
|
||||
import Typing from "@/pages/pc/components/Typing.vue";
|
||||
import Panel from "@/pages/pc/components/Panel.vue";
|
||||
import {useRuntimeStore} from "@/stores/runtime.ts";
|
||||
import {useWordOptions} from "@/hooks/dict.ts";
|
||||
@@ -134,8 +134,8 @@ function next(isTyping: boolean = true) {
|
||||
}
|
||||
|
||||
function wordWrong() {
|
||||
if (!store.wrong2.find((v: Word) => v.word.toLowerCase() === word.word.toLowerCase())) {
|
||||
store.wrong2.push(word)
|
||||
if (!store.wrong.words.find((v: Word) => v.word.toLowerCase() === word.word.toLowerCase())) {
|
||||
store.wrong.words.push(word)
|
||||
}
|
||||
if (!current.wrongWords.find((v: Word) => v.word.toLowerCase() === word.word.toLowerCase())) {
|
||||
current.wrongWords.push(word)
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Word
|
||||
} from "@/types.ts";
|
||||
import {cloneDeep} from "lodash-es";
|
||||
import TypingWord from "@/pages/pc/components/practice-word/TypingWord.vue";
|
||||
import TypingWord from "@/pages/pc/components/TypingWord.vue";
|
||||
import Panel from "../../components/Panel.vue";
|
||||
import {onMounted, onUnmounted, watch} from "vue";
|
||||
import {renewSectionTexts, renewSectionTranslates} from "@/hooks/translate.ts";
|
||||
|
||||
@@ -39,18 +39,13 @@ onMounted(() => {
|
||||
runtimeStore.editDict = cloneDeep(store.collectWord)
|
||||
break
|
||||
case 1:
|
||||
runtimeStore.editDict = cloneDeep({
|
||||
...cloneDeep(DefaultDict),
|
||||
id: nanoid(),
|
||||
name: '错词本', words: store.wrong2
|
||||
})
|
||||
runtimeStore.editDict = cloneDeep(store.wrong)
|
||||
break
|
||||
case 2:
|
||||
runtimeStore.editDict = cloneDeep({
|
||||
...cloneDeep(DefaultDict),
|
||||
id: nanoid(),
|
||||
name: '简单词', words: store.simple2
|
||||
})
|
||||
runtimeStore.editDict = cloneDeep(store.simple)
|
||||
break
|
||||
case 3:
|
||||
runtimeStore.editDict = cloneDeep(store.master)
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -14,7 +14,7 @@ import {ShortcutKey, Word} from "@/types.ts";
|
||||
import DictModal from "@/pages/pc/components/dialog/DictDiglog.vue";
|
||||
import {useStartKeyboardEventListener} from "@/hooks/event.ts";
|
||||
import useTheme from "@/hooks/theme.ts";
|
||||
import TypingWord from "@/pages/pc/components/practice-word/TypingWord.vue";
|
||||
import TypingWord from "@/pages/pc/components/TypingWord.vue";
|
||||
import {getCurrentStudyWord, syncMyDictList} from "@/hooks/dict.ts";
|
||||
import {cloneDeep, shuffle} from "lodash-es";
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@ export interface BaseState {
|
||||
simpleWords: string[],
|
||||
load: boolean
|
||||
|
||||
collectArticle?: Article[],
|
||||
collectWord?: Word[],
|
||||
simple2?: Word[],
|
||||
wrong2?: Word[],
|
||||
master?: Word[],
|
||||
articleDictList?: Dict[]
|
||||
|
||||
commonDictList: any[],
|
||||
@@ -41,11 +36,6 @@ export interface BaseState {
|
||||
}
|
||||
|
||||
export const DefaultBaseState = (): BaseState => ({
|
||||
collectWord: [],
|
||||
collectArticle: [],
|
||||
simple2: [],
|
||||
wrong2: [],
|
||||
master: [],
|
||||
commonDictList: [
|
||||
{
|
||||
...getDefaultDict(),
|
||||
|
||||
Reference in New Issue
Block a user