\ No newline at end of file
diff --git a/src/components/Practice/PracticeWord/TypingWord2.vue b/src/components/Practice/PracticeWord/TypingWord2.vue
deleted file mode 100644
index 77be7201..00000000
--- a/src/components/Practice/PracticeWord/TypingWord2.vue
+++ /dev/null
@@ -1,431 +0,0 @@
-
-
-
-
-
-
-
-
{{ prevWord.name }}
-
-
-
-
{{ nextWord.name }}
-
-
-
-
-
-
-
- {{ input }}
- {{ wrong }}
-
- {{
- resetWord.split('').map(v => '_').join('')
- }}
- {{ resetWord }}
-
- {{ resetWord }}
-
-
-
-
{{ settingStore.wordSoundType === 'us' ? word.usphone : word.ukphone }}
-
-
-
-
-
\ No newline at end of file
diff --git a/src/components/Toolbar/DictModal.vue b/src/components/Toolbar/DictModal.vue
index 0055722f..26d34060 100644
--- a/src/components/Toolbar/DictModal.vue
+++ b/src/components/Toolbar/DictModal.vue
@@ -65,7 +65,7 @@ async function selectDict(item: DictResource) {
}
} else {
let data: Dict = {
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
...item,
}
diff --git a/src/components/VolumeIcon.vue b/src/components/VolumeIcon.vue
index 3b50747c..2f16778d 100644
--- a/src/components/VolumeIcon.vue
+++ b/src/components/VolumeIcon.vue
@@ -17,7 +17,7 @@ const emit = defineEmits(['click'])
function play(time = props.time) {
if (count === 0) {
- props?.cb()
+ props?.cb?.()
}
count++
setTimeout(() => {
diff --git a/src/stores/base.ts b/src/stores/base.ts
index c880740f..ba2e7e36 100644
--- a/src/stores/base.ts
+++ b/src/stores/base.ts
@@ -24,26 +24,26 @@ export const useBaseStore = defineStore('base', {
state: (): State => {
return {
collect: {
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
id: 'collect',
name: '收藏',
type: DictType.collect,
},
skip: {
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
id: 'skip',
name: '简单词',
type: DictType.skip,
},
wrong: {
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
id: 'wrong',
name: '错词本',
type: DictType.wrong,
},
myDicts: [
{
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
id: '新概念英语2-课文',
name: '新概念英语2-课文',
type: DictType.article,
@@ -52,7 +52,7 @@ export const useBaseStore = defineStore('base', {
language: 'en',
},
{
- ...DefaultDict,
+ ...cloneDeep(DefaultDict),
id: '新概念英语2',
name: '新概念英语2',
type: DictType.word,
@@ -63,9 +63,10 @@ export const useBaseStore = defineStore('base', {
}
],
current: {
- dictType: DictType.word,
- // dictType: DictType.article,
- index: 1,
+ // dictType: DictType.word,
+ // index: 1,
+ dictType: DictType.article,
+ index: 0,
editIndex: 0,
repeatNumber: 0,
},
diff --git a/src/stores/practice.ts b/src/stores/practice.ts
index 81fd44c0..8e531872 100644
--- a/src/stores/practice.ts
+++ b/src/stores/practice.ts
@@ -6,8 +6,8 @@ export interface PracticeState {
repeatNumber: number,
startDate: number,
total: number,
- index: number,
- inputWordNumber: number,
+ index: number,//当前输入的第几个,用于和total计算进度
+ inputWordNumber: number,//当前总输入了多少个单词(不包含跳过)
wrongWordNumber: number,
correctRate: number,
}