feat:save
This commit is contained in:
@@ -55,6 +55,7 @@ watch(model, (newVal) => {
|
||||
total: statStore.total,
|
||||
wrong: statStore.wrong,
|
||||
new: statStore.newWordNumber,
|
||||
review: statStore.reviewWordNumber + statStore.writeWordNumber
|
||||
}
|
||||
//这里不知为啥会卡,打开有延迟
|
||||
requestIdleCallback(() => {
|
||||
@@ -102,11 +103,11 @@ function options(emitType: string) {
|
||||
</div>
|
||||
<div class="flex-1 flex flex-col items-center">
|
||||
<div class="text-sm color-gray">复习数</div>
|
||||
<div class="text-4xl font-bold">{{ statStore.newWordNumber }}</div>
|
||||
<div class="text-4xl font-bold">{{ statStore.reviewWordNumber }}</div>
|
||||
</div>
|
||||
<div class="flex-1 flex flex-col items-center">
|
||||
<div class="text-sm color-gray">默写数</div>
|
||||
<div class="text-4xl font-bold">{{ statStore.newWordNumber }}</div>
|
||||
<div class="text-4xl font-bold">{{ statStore.writeWordNumber }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -116,7 +116,9 @@ watch(() => studyData, () => {
|
||||
statStore.inputWordNumber = 0
|
||||
statStore.wrong = 0
|
||||
statStore.total = studyData.review.length + studyData.new.length + studyData.write.length
|
||||
statStore.newWordNumber = store.sdict.complete ? studyData.review.length : studyData.new.length
|
||||
statStore.newWordNumber = studyData.new.length
|
||||
statStore.reviewWordNumber = studyData.review.length
|
||||
statStore.writeWordNumber = studyData.write.length
|
||||
statStore.index = 0
|
||||
})
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ let currentStudy = $ref({
|
||||
write: []
|
||||
})
|
||||
|
||||
//todo 当选完词返回时,计算今日任务时,还是老的词典
|
||||
onMounted(init)
|
||||
watch(() => store.load, init)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user