This commit is contained in:
zyronon
2024-06-02 03:20:23 +08:00
parent 380a13410e
commit e6165434f0
5 changed files with 4312 additions and 3519 deletions

7799
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -134,7 +134,6 @@ export function getCurrentStudyWord() {
data.review.push(item)
}
})
data.review = shuffle(data.review)
//取前天至再往前数3天的单词用于默写
Array.from({length: 4}).map((_, j) => {
@@ -155,8 +154,6 @@ export function getCurrentStudyWord() {
}
data.write = data.write.concat(d)
})
data.write = shuffle(data.write)
}
console.timeEnd()

View File

@@ -109,7 +109,7 @@ function next(isTyping: boolean = true) {
if (statStore.step === 1) {
settingStore.dictation = true
current.words = props.data.write.concat(props.data.new).concat(props.data.review)
current.words = shuffle(props.data.write.concat(props.data.new).concat(props.data.review))
statStore.step++
current.index = 0
}
@@ -117,7 +117,7 @@ function next(isTyping: boolean = true) {
if (statStore.step === 0) {
statStore.step++
if (props.data.review.length) {
current.words = props.data.review
current.words = shuffle(props.data.review)
settingStore.dictation = false
current.index = 0
} else {
@@ -281,11 +281,11 @@ const status = $computed(() => {
>
<div class="list-header">
<div class="flex items-center gap-1">
<Icon icon="material-symbols:hourglass-empty-rounded" />
<Icon icon="material-symbols:hourglass-empty-rounded"/>
<span class="text-sm"> {{ status }}</span>
</div>
<div class="flex items-center gap-2">
<span> {{ current.index}} / {{ current.words.length }}</span>
<span> {{ current.index }} / {{ current.words.length }}</span>
</div>
</div>
<WordList

View File

@@ -21,12 +21,12 @@ let open = $ref(false)
onMounted(() => {
emitter.on(EventKey.openStatModal, () => {
let data = {
startIndex: store.sword.lastLearnIndex,
endIndex: store.sword.lastLearnIndex + store.sword.perDayStudyNumber,
startIndex: store.currentStudyWordDict.lastLearnIndex,
endIndex: store.currentStudyWordDict.lastLearnIndex + store.currentStudyWordDict.perDayStudyNumber,
speed: statStore.speed,
startDate: statStore.startDate,
}
store.sword.lastLearnIndex = data.endIndex
store.currentStudyWordDict.lastLearnIndex = data.endIndex
store.currentStudyWordDict.statistics.push(data as any)
store.currentStudyWordDict.statistics.sort((a, b) => a.startDate - b.startDate)

View File

@@ -141,6 +141,19 @@ export const DefaultBaseState = (): BaseState => ({
},
],
wordDictList: [
{
...getDefaultDict(),
id: 'nce-new-2',
name: '新概念英语(新版)-2',
description: '新概念英语新版第二册',
category: '青少年英语',
tags: ['新概念英语'],
url: 'nce-new-2.json',
length: 862,
translateLanguage: 'common',
language: 'en',
type: DictType.word
},
{
...getDefaultDict(),
id: 'cet4',
@@ -158,7 +171,7 @@ export const DefaultBaseState = (): BaseState => ({
],
currentStudy: {
word: {
dictIndex: -1,
dictIndex: 0,
},
article: {
dictIndex: 0,